Debian Codegraph @

texmf-dist/doc/latex/xcntperchap/xcntperchap_driver.tex

raw
1 %% LaTeX package xcntperchap - version 0.5 (2018/01/05 -- 22:04:12)
2 %% Driver examples file for xcntperchap.sty
3 %%
4 %%
5 %% -------------------------------------------------------------------------------------------
6 %% Copyright (c) 2016 -- 2018 by Dr. Christian Hupfer <typography dot with dot latex at gmail dot com>
7 %% -------------------------------------------------------------------------------------------
8 %%
9 %% This work may be distributed and/or modified under the
10 %% conditions of the LaTeX Project Public License, either version 1.3
11 %% of this license or (at your option) any later version.
12 %% The latest version of this license is in
13 %% http://www.latex-project.org/lppl.txt
14 %% and version 1.3 or later is part of all distributions of LaTeX
15 %% version 2005/12/01 or later.
16 %%
17 %%
18 %% This work has the LPPL maintenance status `author-maintained`
19 %%
20 %%
21
22 %% LaTeX package xcntperchap - version 0.2 (2016/06/07 -- 09/05/23)
23 %% Driver file for xcntperchap.sty
24 %%
25 %%
26 %% -------------------------------------------------------------------------------------------
27 %% Copyright (c) 2016 by Dr. Christian Hupfer <christian dot hupfer at yahoo dot de>
28 %% -------------------------------------------------------------------------------------------
29 %%
30 %% This work may be distributed and/or modified under the
31 %% conditions of the LaTeX Project Public License, either version 1.3
32 %% of this license or (at your option) any later version.
33 %% The latest version of this license is in
34 %% http://www.latex-project.org/lppl.txt
35 %% and version 1.3 or later is part of all distributions of LaTeX
36 %% version 2005/12/01 or later.
37 %%
38 %%
39 %% This work has the LPPL maintenance status `author-maintained`
40 %%
41 %%
42
43 \documentclass{book}
44
45
46 \usepackage{xcntperchap}
47
48 \usepackage{placeins}
49 \setcounter{secnumdepth}{5}
50
51
52
53
54 \RegisterCounters{chapter}{section,subsection,figure}
55 \RegisterCounters{section}{subsection,subsubsection,figure}
56
57
58 \begin{document}
59
60 \tableofcontents
61
62
63 \cleardoublepage
64 \markboth{}{}
65 \begingroup
66 \parindent=0em
67 Chapter 1 has \ObtainTrackedValueExp[1]{chapter}{section} sections and \ObtainTrackedValueExp[1]{chapter}{subsection} subsections
68
69 Chapter 1 has \ObtainTrackedValueExp[1]{chapter}{figure} figures
70
71 Chapter 2 has \ObtainTrackedValueExp[2]{chapter}{section} sections and \ObtainTrackedValueExp[2]{chapter}{subsection} subsections
72
73 Chapter 2 has \ObtainTrackedValueExp[2]{chapter}{figure} figures
74
75 Section 1 has \ObtainTrackedValueExp[1]{section}{subsection} subsections and \ObtainTrackedValueExp[1]{section}{subsubsection} subsubsections
76
77 Section 5 has \ObtainTrackedValueExp[5]{section}{subsection} subsections and \ObtainTrackedValueExp[5]{section}{subsubsection} subsubsections
78
79 Section 8 has \ObtainTrackedValueExp[8]{section}{subsection} subsections and \ObtainTrackedValueExp[8]{section}{subsubsection} subsubsections
80 \endgroup
81
82
83
84 \chapter{Foo}
85
86
87 \section{First section}
88
89 \subsection{My first subsection}
90
91 \subsubsection{First subsub}
92
93 \subsubsection{Second subsub}
94
95
96 \subsection{other subsection}
97
98 \subsubsection{First subsub}
99
100 \subsubsection{Second subsub}
101
102
103 \section{Second section}
104
105 \subsection{My first subsection}
106
107 \subsection{other subsection}
108
109 \section{Third section}
110 \subsection{other subsection}
111
112 \subsection{other subsection}
113 \subsection{other subsection}
114
115 \section{Fourth section}
116
117
118 \subsection{other subsection}
119
120 \subsection{other subsection}
121 \subsection{other subsection}
122
123 \begin{figure}
124 \caption{Foofigure}
125 \end{figure}
126
127 \FloatBarrier
128
129
130 \chapter{Foo bar chapter}
131
132
133 \section{A section}
134
135 \subsection{ A figure stuff}
136 \begin{figure}
137 \caption{Foofigure}
138 \end{figure}
139 \begin{figure}
140 \caption{Foofigure}
141 \end{figure}
142 \begin{figure}
143 \caption{Foofigure}
144 \end{figure}
145 \begin{figure}
146 \caption{Foofigure}
147 \end{figure}
148 \begin{figure}
149 \caption{Foofigure}
150 \end{figure}
151 \begin{figure}
152 \caption{Foofigure}
153 \end{figure}
154 \begin{figure}
155 \caption{Foofigure}
156 \end{figure}
157
158
159
160 \section{Foo}
161
162 \section{Second section}
163
164 \subsection{My first subsection}
165
166 \subsection{other subsection}
167
168
169 \subsection{My first subsection}
170
171 \subsection{other subsection}
172
173
174 \subsection{My first subsection}
175
176 \subsection{other subsection}
177
178
179 \subsection{My first subsection}
180
181 \subsection{other subsection}
182
183 \section{Third section}
184
185
186 \subsection{My first subsection}
187
188 \subsection{other subsection}
189
190
191 \subsection{My first subsection}
192
193 \subsection{other subsection}
194
195
196 \subsection{My first subsection}
197
198 \subsection{other subsection}
199
200
201 \subsection{My first subsection}
202
203 \subsection{other subsection}
204
205
206 \section{The last one}
207
208 \subsection{Foo}
209
210
211
212 \end{document}
213