From e0c6872cf40896c7be36b11dcc744620f10adf1d Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 2 Sep 2019 13:46:59 +0900 Subject: Initial commit --- .../xassoccnt_coupledcounters_example.tex | 206 +++++++++++++++++++++ 1 file changed, 206 insertions(+) create mode 100644 macros/latex/contrib/xassoccnt/xassoccnt_coupledcounters_example.tex (limited to 'macros/latex/contrib/xassoccnt/xassoccnt_coupledcounters_example.tex') diff --git a/macros/latex/contrib/xassoccnt/xassoccnt_coupledcounters_example.tex b/macros/latex/contrib/xassoccnt/xassoccnt_coupledcounters_example.tex new file mode 100644 index 0000000000..a7eda584dc --- /dev/null +++ b/macros/latex/contrib/xassoccnt/xassoccnt_coupledcounters_example.tex @@ -0,0 +1,206 @@ +%% LaTeX package xassoccnt - version 1.7 (2018/12/28 -- 06:45:16) +%% Example file for coupled counters file for xassoccnt.sty +%% +%% +%% ------------------------------------------------------------------------------------------- +%% Copyright (c) 2016 -- 2018 by Dr. Christian Hupfer +%% ------------------------------------------------------------------------------------------- +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +%% +%% +%% This work has the LPPL maintenance status `author-maintained` +%% +%% + +\documentclass{article} + +\usepackage{caption} +\usepackage{xassoccnt} +\usepackage{blindtext} + + +\usepackage{hyperref} + +\DeclareCoupledCountersGroup{figuretablebundle} + +\DeclareCoupledCounters[name=figuretablebundle,multiple=false]{figure,table} + +\DeclareCoupledCounters[name=figuretablebundle,multiple=false]{figure,table,figure} + +\DeclareCoupledCounters[name=sectionequationbundle]{section,equation} + +\begin{document} + +\AddCoupledCounters[name=figuretablefoo]{figure,table,figure} + +\listoffigures +\listoftables + +\section{First} + + +\blindtext[10] + +\begin{figure}[!ht] + +\caption{A figure} +\end{figure} + +A footnote here\footnote{Myfootnote} + +\blindtext[10] + + +\begin{table}[!ht] +\caption{A table} +\end{table} + +\begin{equation} + E=mc^2 +\end{equation} + +\section{Second} + +\blindtext[10] + +\begin{figure}[!ht] + +\caption{A foo figure} +\end{figure} + +\blindtext[10] + + +\begin{table}[!ht] +\caption{A foo table} +\end{table} + + + +\begin{table}[!ht] +\caption{A foobar table} +\end{table} + + + +\begin{figure}[!ht] + +\caption{A foobar figure} +\end{figure} + +\blindtext[10] + +\begin{table}[!ht] +\caption{Yet another foo table} +\end{table} + + + +\begin{figure}[!ht] + +\caption{Yet another foo figure} +\end{figure} + +\RemoveCoupledCounters[name=figuretablebundle]{figure} +\addcontentsline{lof}{section}{After using RemoveCoupledCounters for figure} + +\blindtext[10] + +\begin{figure}[!ht] + +\caption{An intermediate figure that is not coupled} +\end{figure} + + +\begin{table}[!ht] +\caption{Yet another foobar table} +\end{table} + +\begin{table}[!ht] +\caption{Even more foobar table} +\end{table} + +\begin{table}[!ht] +\caption{Even most foobar table} +\end{table} + + + +\begin{figure}[!ht] + +\caption{Even more foobar figure} +\end{figure} + +\clearpage + +\begin{figure}[!ht] + +\caption{Another intermediate figure that is not coupled} +\end{figure} + + +\AddCoupledCounters[name=figuretablebundle]{figure} + +\addcontentsline{lof}{section}{After using AddCoupledCounters for figure again} + +\begin{figure}[!ht] +\caption{Even most foobar figure} +\end{figure} + +\begin{table}[!ht] +\caption{Another coupled table} +\end{table} + +\begin{figure}[!ht] +\caption{Another coupled figure} +\end{figure} + + +\ClearAllCoupledCounters +\clearpage + +\addcontentsline{lof}{section}{After using ClearAllCoupledCounters} +\addcontentsline{lot}{section}{After using ClearAllCoupledCounters} + +\begin{figure}[!ht] +\caption{Almost next to last figure} +\end{figure} + + +\begin{table}[!ht] +\caption{Almost next to last table} +\end{table} + +\begin{figure}[!ht] + \caption{Next to last figure} +\end{figure} + +\begin{table}[!ht] + \caption{Next to last table} +\end{table} + + + +\AddCoupledCounters[name=figuretablebundle]{figure,table} +\addcontentsline{lof}{section}{After using AddCoupledCounters} +\addcontentsline{lot}{section}{After using AddCoupledCounters} + + +\begin{figure}[!ht] +\caption{The last figure} +\end{figure} + +\begin{table}[!ht] +\caption{The last table} +\end{table} + + + +\end{document} \ No newline at end of file -- cgit v1.2.3