Debian Codegraph @

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

raw
1 %% LaTeX package xcntperchap - version 0.5 (2018/01/05 -- 22:04:12)
2 %% Documentation 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 \documentclass[12pt,a4paper]{article}
23
24
25
26
27 \usepackage[lmargin=2cm,rmargin=2cm,headheight=15pt]{geometry}
28 \usepackage{savesym}
29 \usepackage{bbding}
30 \savesymbol{Cross}
31
32 \usepackage{graphicx}
33 \usepackage{blindtext}
34 \usepackage[x11names]{xcolor}
35 \usepackage{imakeidx}
36 \usepackage{fontawesome}
37 \usepackage[most,documentation]{tcolorbox}
38 \usepackage[tikz]{bclogo}
39 \usepackage{marginnote}
40 \usepackage{fancyhdr}
41 \usepackage{datetime}
42 \usepackage{array}
43 \usepackage{xkeyval}
44 \usepackage{xparse}
45 \usepackage{totcount}
46 \usepackage{enumitem}
47 \usepackage{microtype}
48 \usepackage{caption}
49 \usepackage[T1]{fontenc}
50 \usepackage[scaled=0.92]{helvet}
51
52 \newlist{codeoptionsenum}{enumerate}{1}
53 \setlist[codeoptionsenum,1]{label={\textcolor{blue}{\#\arabic*}}}
54
55 \renewcommand{\rmdefault}{\sfdefault}
56
57 \newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}
58
59 \makeatletter
60 \define@key{chdoc}{packageauthor}{%
61 \def\KVchdocpackageauthor{#1}%
62 }
63
64 \define@key{chdoc}{packageauthormail}{%
65 \def\KVchdocpackageauthormail{#1}%
66 }
67
68 \define@key{chdoc}{filepurpose}{%
69 \def\KVchdocfilepurpose{#1}%
70 }
71
72
73 \newcommand{\chdocextractversion}[1]{%
74 \@nameuse{#1}%
75 }
76
77
78 \@namedef{xcntperchapversion0.1}{v0.1 2016-05-22}
79 \@namedef{xcntperchapversion0.2}{v0.2 2016-06-07}
80
81 \@namedef{xcntperchapversion0.3}{v0.3 2017-01-09}
82
83 \@namedef{xcntperchapversion0.4}{v0.4 2017-04-19}
84
85
86 \@namedef{xcntperchapversion0.5}{v0.5 2018-01-05}
87
88 \newcommand{\authorname}{Autor}
89
90
91 \makeatother
92
93
94
95
96
97
98 \fancypagestyle{plain}{%
99 \fancyfoot[L]{\begin{tabular}[t]{l}\PackageDocName\ \packageversion \tabularnewline \textcopyright\ Dr. Christian Hupfer\end{tabular}}%
100 \fancyfoot[C]{\thepage}%
101 \fancyfoot[R]{\today}%
102 \renewcommand{\headrule}{{\color{blue}%
103 \hrule width\headwidth height\headrulewidth \vskip-\headrulewidth}}
104 \renewcommand{\footrule}{{\color{blue}\vskip-\footruleskip\vskip-\footrulewidth
105 \hrule width\headwidth height\footrulewidth\vskip\footruleskip}}
106 \renewcommand{\footrulewidth}{2pt}
107 \renewcommand{\headrulewidth}{2pt}
108 }
109
110
111
112 \newtcolorbox{CHPackageTitleBox}[1][]{%
113 enhanced jigsaw,
114 drop lifted shadow,
115 colback=yellow!30!white,
116 width=0.8\textwidth,
117 #1
118 }
119
120 \presetkeys{chdoc}{packageauthor={Christian Hupfer}}{}%
121 \NewDocumentCommand{\CHPackageTitlePage}{O{}mO{}}{%
122 \setkeys{chdoc}{packageauthor={Christian Hupfer},filepurpose={Documentation},#1}%
123 \begin{center}
124 \begin{CHPackageTitleBox}[#3]
125 \large \bfseries%
126 \begin{center}%
127 \begin{tabular}{C{0.9\textwidth}}%
128 \scshape \PackageDocName \tabularnewline
129 \tabularnewline
130 #2 \tabularnewline
131 \tabularnewline
132 \KVchdocfilepurpose \tabularnewline
133 \tabularnewline
134 Version \packageversion \tabularnewline
135 \tabularnewline
136 \today \tabularnewline
137 \tabularnewline
138 \addtocounter{footnote}{2}
139 \authorname: \KVchdocpackageauthor\(^\mathrm{\fnsymbol{footnote}}\)
140 \tabularnewline
141 \end{tabular}
142 \end{center}
143 \end{CHPackageTitleBox}
144 \renewcommand{\thefootnote}{\fnsymbol{footnote}}%
145 \footnotetext{\mymailtoaddress}%
146 \end{center}
147 }
148
149 \newtcolorbox{docCommandArgs}[1]{colbacktitle={blue},coltitle={white},title={Description of arguments of command \cs{#1}}}
150
151
152 \newcommand{\tcolorboxdoclink}{http://mirrors.ctan.org/macros/latex/contrib/tcolorbox/tcolorbox.pdf}
153
154 % 'Stolen' from tcolorbox documentation ;-)
155
156 \newtcolorbox{marker}[1][]{enhanced,
157 before skip=2mm,after skip=3mm,
158 boxrule=0.4pt,left=5mm,right=2mm,top=1mm,bottom=1mm,
159 colback=yellow!50,
160 colframe=yellow!20!black,
161 sharp corners,rounded corners=southeast,arc is angular,arc=3mm,
162 underlay={%
163 \path[fill=tcbcol@back!80!black] ([yshift=3mm]interior.south east)--++(-0.4,-0.1)--++(0.1,-0.2);
164 \path[draw=tcbcol@frame,shorten <=-0.05mm,shorten >=-0.05mm] ([yshift=3mm]interior.south east)--++(-0.4,-0.1)--++(0.1,-0.2);
165 \path[fill=yellow!50!black,draw=none] (interior.south west) rectangle node[white]{\Huge\bfseries !} ([xshift=4mm]interior.north west);
166 },
167 drop fuzzy shadow,#1}
168
169
170 %%%% Documentation macros
171
172
173 \NewDocumentCommand{\packagename}{sm}{%
174 \textcolor{blue}{\textbf{\faEnvelopeO~#2}}%
175 \IfBooleanF{#1}{%
176 \index{Package!#2}
177 }%
178 }
179
180 \NewDocumentCommand{\classname}{sm}{%
181 \textcolor{brown}{\textbf{\faBriefcase~#2}}%
182 \IfBooleanF{#1}{%
183 \index{Package!#2}%
184 }%
185 }
186
187
188 \NewDocumentCommand{\CHDocPackage}{sm}{%
189 \textcolor{blue}{\textbf{\faEnvelopeO~#2}}%
190 \IfBooleanF{#1}{%
191 \index{Package!#2}
192 }%
193 }
194
195
196
197
198 \NewDocumentCommand{\CHDocClass}{sm}{%
199 \textcolor{brown}{\textbf{\faBriefcase~#2}}%
200 \IfBooleanF{#1}{%
201 \index{Package!#2}%
202 }%
203 }
204
205 \NewDocumentCommand{\CHDocKey}{sm}{%
206 \textcolor{red}{\textbf{\faKey~#2}}%
207 \IfBooleanF{#1}{%
208 \index{Option!#2}%
209 }%
210 }
211
212 \newcommand{\handrightnote}{\tcbdocmarginnote{\ding{43}}}
213
214
215 \NewDocumentCommand{\CHDocCounter}{sm}{%
216 \textcolor{Green4}{\textbf{\faCalculator~#2}}%
217 \IfBooleanF{#1}{%
218 \index{Counter!#2}%
219 }%
220 }
221
222
223 \NewDocumentCommand{\CHDocTag}{sm}{%
224 \textcolor{violet}{\faTag~#2}%
225 \IfBooleanF{#1}{%
226 \index{Feature!#2}%
227 }%
228 }
229
230
231 \NewDocumentCommand{\CHDocFileExt}{sm}{%
232 \faFile~#2%
233 }
234
235 \NewDocumentCommand{\CHDocFiles}{sm}{%
236 \faFilesO~#2%
237 }
238
239
240 \NewDocumentCommand{\CHDocConventions}{}{%
241 \section*{\centering Typographical conventions}
242 Throughout this documentation following symbols and conventions are used:
243 \begin{itemize}
244 \item \CHDocClass*{foo} means a the class \texttt{foo}
245 \item \CHDocPackage*{foo} names a package \texttt{foo}
246 \item \CHDocCounter*{foo} indicates a counter named \texttt{foo}
247 \item \CHDocFileExt*{foo} will indicate either a file named \texttt{foo} or a file extension \texttt{foo}
248 \item \CHDocFiles*{foo} will indicate some files
249 \item \CHDocTag*{foo} names a special feature or tag \texttt{foo}
250 \item \CHDocKey*{foo} deals with a command or package option named \texttt{foo}
251 \end{itemize}
252 }
253
254
255
256 \renewcommand{\tcbdocnew}[1]{#1}%
257 \renewcommand{\tcbdocupdated}[1]{#1}%
258
259 \newcommand{\CHDocNew}[1]{%
260 \tcbdocmarginnote[doclang/new={N},
261 colframe=blue,
262 halign=left,
263 colback={blue!20!white},
264 fontupper={\tiny}
265 ]{%
266 \chdocextractversion{xcntperchapversion#1}%
267 }%
268 }
269
270
271
272 \newcommand{\CHDocUpdate}[1]{\tcbdocmarginnote[doclang/updated={},colback={yellow},colframe={yellow!50!red}, fontupper={\tiny}
273 ]{%
274 \tcbdocupdated{\chdocextractversion{xcntperchapversion#1}}%
275 }%
276 }
277
278
279
280 \newcommand{\CHDocFullVersion}[1]{Version \chdocextractversion{xcntperchapversion#1}}
281
282
283 \newcommand{\CHDocExpCommand}[1][Expandable]{%
284 \tcbdocmarginnote[doclang/new={N},
285 colframe=green!50!blue,
286 halign=left,
287 colback={green!90!blue},
288 fontupper={\tiny}
289 ]{%
290 #1%
291 }%
292 }
293
294
295 \newcommand{\CHDocExperimentalFeature}[1][Experimental]{%
296 \tcbdocmarginnote[doclang/new={N},
297 colframe=yellow!50!blue,
298 halign=left,
299 colback={blue!10!yellow},
300 fontupper={\tiny}
301 ]{%
302 #1%
303 }%
304 }
305
306
307
308
309 \usepackage{xcntperchap}
310 \usepackage{cleveref}
311
312 \newcommand{\PackageDocName}{xcntperchap}%
313
314 \newcommand{\mymailtoaddress}{%
315 [email protected]
316 }
317
318
319 \def\packageversion{\xcntperchappackageversion}%
320
321 \makeindex[intoc]
322
323 \RegisterTrackCounter{section}{subsection,subsubsection,table,figure}
324
325 \hypersetup{breaklinks=true}
326
327
328
329 \hypersetup{breaklinks=true,
330 pdftitle={\jobname.pdf -- version \packageversion},
331 pdfauthor={Dr. Christian Hupfer},
332 pdfsubject={Documentation of \PackageDocName\ package},
333 pdfkeywords={LaTeX, counters},
334 pdfcreator={LaTeX}
335 }
336
337
338 \begin{document}
339 \mmddyyyydate
340
341
342 \setlength{\parindent}{0pt}
343
344 \thispagestyle{empty}%
345 \CHPackageTitlePage[packageauthor={Christian Hupfer}]{Store counter values per chapter (or other track levels)}
346 \clearpage
347 \tableofcontents
348 \clearpage
349
350 \CHDocConventions
351 \clearpage
352
353 \pagestyle{plain}
354
355 \setcounter{footnote}{0}
356
357 \pagestyle{plain}
358
359
360
361 \section{Disclaimer}
362 This package as of its version \packageversion\ is a rewrite of the former \CHDocPackage{cntperchap} by the same author, is under constant development and as such subject to macro interface changes as well as renaming of macros. Not all features of the previous package has been incorporated so far -- if some functionality of your document depends on \CHDocPackage{assoccnt}, continue using the older version and shift gradually to \CHDocPackage{\PackageDocName} please, which uses the newer \CHDocPackage{xassoccnt}.
363
364 \begin{marker}
365 Most times class and package authors will benefit of this package, but there might be usual documents that need the features of |\PackageDocName||
366 \end{marker}
367
368 \section{Introduction}
369
370 The aim of this package is to provide support for a summary in advance how many sections, subsections, etc. or figures, tables, equations there will be in predefined track level, for example per chapters. The values are stored at the beginning of such a new track level, say \cs{chapter} and written to a \CHDocFileExt{jobname.cpc} file.
371
372 \begin{marker}
373 Since the \CHDocCounter*{page} counter is an unrealiable 'friend' it is not advised to use this counter as a track level.
374 \end{marker}
375
376
377 As of version \packageversion\ there is no default version of a track level.
378
379 This package is the consequence of the question \url{http://tex.stackexchange.com/questions/241559/how-to-count-the-total-number-of-sections-within-a-chapter} by the user \texttt{gsl}.
380
381
382
383 \section{Package options}%
384 \label{section::package_options}
385
386 As of version \packageversion~ the package has no package options.
387
388
389 \section{Requirements and incompatibilities}%
390
391 \subsection{Required packages}
392
393 Since \CHDocPackage{\PackageDocName} is written using \CHDocPackage{expl3}, it requires the \CHDocPackage{xparse} package. It relies on the features of associated counters introduced by \CHDocPackage{xassoccnt} v1.4.
394
395 \begin{itemize}
396 \item \CHDocPackage{zref}%
397 \item \CHDocPackage{expl3}%
398 \item \CHDocPackage{xparse}%
399 \item \CHDocPackage{xassoccnt}%
400 \end{itemize}
401
402 The package \CHDocPackage{xparse} is already loaded by \CHDocPackage{assoccnt} and does not need to be specified again.
403
404 \subsection{Incompatibilities}
405
406 This package has been tested with the standard classes \classname{article}, \classname{book} and \classname{report} as well as with \classname{memoir} and the relevant \classname{KOMA} equivalents. As of version \packageversion\ for those classes there are no known incompatibilities with the general behaviour of the package, however, there is an issue with \CHDocPackage{assoccnt} and \CHDocPackage{xifthen} which is not solved so far.
407
408 \marginnote{\bcbombe} It would be nice to adapt the package for usage on a per frame base with the \classname{beamer} class, but this seems both not really necessary as well as quite difficult, since \classname{beamer} follows different strategies about the usage of ``pages'' or ``sections'', see \ref{section::todo}
409
410
411 \clearpage
412
413
414 \section{Documentation of Macros}
415
416 \subsection{Preamble only commands}
417
418 \begin{docCommand}{RegisterTrackCounter}{\marg{track counter}\marg{counter1, counter2,...}} \CHDocNew{0.3}
419
420 This provides the means to let the package know that the counters should be tracked for values inside a certain track level -- specify this in the document preamble.
421
422 \begin{docCommandArgs}{RegisterTrackCounter}%
423 \begin{itemize}
424 \item \marg{track counter}
425 This contains the counter name which is the track level, e.g. \CHDocCounter*{section}
426 \item \marg{counter1, counter2,...}
427 This marks the counters to be tracked inside the track level, e.g. \CHDocCounter*{subsection}, \CHDocCounter*{subsubsection}
428 \end{itemize}
429 \end{docCommandArgs}
430
431 \end{docCommand}%
432
433
434
435 \begin{docCommand}{RegisterMultipleTrackCounters}{\marg{track counter 1, track counter 2,...}\marg{counter1, counter2,...}} \CHDocNew{0.3}
436
437 This provides the means to let the package know that the counters should be tracked for values inside multiple track levels -- specify this in the document preamble.
438
439 All counters in the 2nd mandatory argument will be tracked by \textbf{all} track levels.
440
441 \begin{docCommandArgs}{RegisterMultipleTrackCounters}%
442 \begin{itemize}
443 \item \marg{track level 1, track level 2,...}
444 This list contains the counters which are track levels
445 \item \marg{counter1, counter2,...}
446 This marks the counters to be tracked inside of each(!) track level.
447 \end{itemize}
448 \end{docCommandArgs}
449
450 \end{docCommand}%
451
452
453
454 \begin{docCommand}{RegisterCounters}{\marg{track counter}\marg{counter1, counter2,...}} \tcbdocmarginnote{\tcbdocnew{\chdocextractversion{xcntperchapversion0.1}}}
455
456 \refCom{RegisterCounters} has the some meaning like \refCom{RegisterTrackCounter} and is the old name for this. Use the newer version for new documents since this command will be removed one day.
457 \end{docCommand}%
458
459
460
461 \section{User commands}
462
463
464 \begin{docCommand}[doc new={\chdocextractversion{xcntperchapversion0.1}}]{ObtainTrackedValue}{\oarg{counter value}\marg{track level}\marg{tracked counter}}% \tcbdocmarginnote{\tcbdocnew{\chdocextractversion{xcntperchapversion0.1}}}
465
466 This command prints the value of the tracked counter of a track counter, i.e. the number of subsections in a specific chapter, say, the 5th chapter can be obtained by
467
468 \begin{dispExample}{listings only}
469 \ObtainTrackedValue[5]{chapter}{subsection}
470 \end{dispExample}
471
472 \begin{codeoptionsenum}
473 \item \oarg{options}: As of version \packageversion, the only option is a counter value, say 5 for the 5th chapter. This must be the total number of the relevant track counter, i.e. the 17th total section etc.
474 \item \marg{track counter name}: The name of the track level, i.e. \CHDocCounter*{section}.
475 \item \marg{tracked counter name}: The name of the tracked counter, i.e. \CHDocCounter*{figure}.
476 \end{codeoptionsenum}
477
478 Please note that the number of entities per track level might be reported wrongly for floats, since those are shifted to some other places. If this should be prevented, a \cs{FloatBarrier} from \CHDocPackage{placeins} might be necessary (see the example file \verb!xcntperchap_driver.tex!)
479
480 \begin{marker}\tcbdocmarginnote{\tcbdocupdated{\chdocextractversion{xcntperchapversion0.2}}}
481 This macro is not expandable -- for an expandable version use \refCom{ObtainTrackedValueExp} instead.
482 \end{marker}
483
484 \end{docCommand}
485
486 \begin{docCommand}[before={\CHDocExpCommand}]{ObtainTrackedValueExp}{\oarg{counter value}\marg{track level}\marg{tracked counter}} \tcbdocmarginnote{\tcbdocnew{\chdocextractversion{xcntperchapversion0.2}}}
487
488 This command is the expandable version of \refCom{ObtainTrackedValue} and should be used if calculations, comparisions and write - operations to files are requested.
489
490 The meaning of arguments is the same as in \refCom{ObtainTrackedValue}.
491 \end{docCommand}
492
493
494
495
496 \section{Experimental features}\CHDocNew{0.3}
497
498 \begin{marker}
499 The content and description of the features are marked as experimental as of version \packageversion. Features are subject to changes as well as macro names might be revised in future versions.
500 \end{marker}
501
502 The tracking of counters with respect to some fixed number of a track level counter might get tedious, i.e. it is not very convenient to remember a special section number of which counter \CHDocCounter{foo} should be tracked. \CHDocPackage{\PackageDocName} provides the possibility to add a label to some track level counter and obtaining the running total number of the relevant counter by using \refCom{ObtainTrackedValueByLabel}.
503
504
505 \begin{docCommand}{tracklabel}{\oarg{counter name}\marg{label name}} \CHDocNew{0.3}
506 \cs{tracklabel} provides a label given in the first mandatory argument to a track level counter -- the counter is being auto detected with \cs{LastRefSteppedCounter} from \CHDocPackage{xassoccnt}.
507
508 In addition, the a label with the same name is set with the usual \cs{label} command. Use \refCom{tracklabel*} to suppress the generation of such labels.
509
510 \begin{codeoptionsenum}
511 \item \oarg{counter name}: This is only used as an optional argument to the \cs{label} command as provided by \CHDocPackage{cleveref}.
512 \item \marg{label name}: A label for a track level counter.
513 \end{codeoptionsenum}
514
515 \end{docCommand}
516
517 \begin{docCommand}{tracklabel*}{\oarg{counter name}\marg{label name}} \CHDocNew{0.3}
518 This is the starred version of \refCom{tracklabel} but does not generate a usual label of the name given with the first mandatory argument. The optional argument is ignored as of version \packageversion.
519 \end{docCommand}
520
521
522
523 \begin{marker}
524 Please note that the usability of \refCom{tracklabel} is restricted to track level counters that have been used with \cs{refstepcounter} as of version \packageversion!
525
526 \end{marker}
527
528
529 \begin{docCommand}[before={\CHDocExpCommand}]{ObtainTrackedValueByLabel}{\oarg{counter name}\marg{label name}\marg{tracked counter}} \CHDocNew{0.3}
530
531 This command uses a label given with \refCom{tracklabel} to some track level counter usage and will return the relevant number of the tracked counter. The underlying track level counter is autodetected using \CHDocPackage{zref} properties.
532 \begin{codeoptionsenum}
533 \item \oarg{counter name}: Use this to override the auto detection of the track level counter. This might cause unpredictable logical errors, however.
534 \item \marg{label name}: A label for a track level counter.
535 \item \marg{tracked counter}: The name of a counter being in the tracking list of the (auto detected) track level counter.
536 \end{codeoptionsenum}
537
538 \begin{itemize}
539 \item If the given label is not defined, a \texttt{??} is printed instead. As of version \packageversion\ there is no warning or error message.
540 \item This command is expandable!
541 \end{itemize}
542 \end{docCommand}
543
544 See \Cref{packageexample::tracking_by_label} for an example using the tracking - by - label - feature.
545
546
547
548 \begin{docCommand}{AddToTrackedCounters}{\marg{tracked counters}\marg{counter value}} \CHDocNew{0.3}
549 This macro adds the same value to a comma separated list of tracked counters without using \cs{stepcounter}.
550 \begin{codeoptionsenum}
551 \item \marg{tracked counters}: A comma separated list of counter names.
552 \item \marg{counter value}: An integer value
553 \end{codeoptionsenum}
554 \end{docCommand}
555
556
557
558 \section{Examples}
559
560 \subsection[Item count of enumerate]{Count the items of an enumerate}
561
562
563 \tcbset{breakable}
564 \begin{dispListing}
565 \documentclass{article}
566
567 \usepackage{xcntperchap}
568 \usepackage{enumitem}
569
570
571
572 \RegisterCounters{section}{enumi}
573 \RegisterCounters{subsection}{enumi}
574
575 \begin{document}
576 \tableofcontents
577
578 \section{Section 1 -- with \ObtainTrackedValueExp{section}{enumi} items}
579 \begin{enumerate}[resume]
580 \item Item 1
581 \item Item 2
582 \item Item 3
583 \end{enumerate}
584
585 \subsection{Another subsection with \ObtainTrackedValueExp{subsection}{enumi} }
586
587 \begin{enumerate}[resume]
588 \item Item 4
589 \item Item 5
590 \end{enumerate}
591
592
593 \section{Section 2 -- with \ObtainTrackedValueExp{section}{enumi} items}
594 \begin{enumerate}[resume]
595 \item Item 6
596 \item Item 7
597 \end{enumerate}
598
599 \subsection{Another subsection with \ObtainTrackedValueExp[2]{subsection}{enumi} Items } % Second total subsection to be used.
600
601 \begin{enumerate}[resume]
602 \item Item 8
603 \item Item 9
604 \item Item 10
605 \item Item 11
606 \item Item 12
607 \item Item 13
608 \end{enumerate}
609
610 \end{document}
611 \end{dispListing}
612
613
614 \subsection[Item count of enumerate -- alternate version]{Count the items of an enumerate -- with label reference}\label{packageexample::tracking_by_label}
615
616
617 \tcbset{breakable}
618 \begin{dispListing}
619 \documentclass{article}
620
621 \usepackage{xcntperchap}
622 \usepackage{enumitem}
623
624
625
626 \RegisterCounters{section}{enumi}
627 \RegisterCounters{subsection}{enumi}
628
629 \begin{document}
630 \tableofcontents
631
632 \section{Section 1 -- with \ObtainTrackedValueExp{section}{enumi} items} \tracklabel{sectionlabel}
633 \begin{enumerate}[resume]
634 \item Item 1
635 \item Item 2
636 \item Item 3
637 \end{enumerate}
638
639 \subsection{Another subsection with \ObtainTrackedValueExp{subsection}{enumi} items}
640
641 \begin{enumerate}[resume]
642 \item Item 4
643 \item Item 5
644 \end{enumerate}
645
646
647 \section{Section 2 -- with \ObtainTrackedValueExp{section}{enumi} items}
648 \begin{enumerate}[resume]
649 \item Item 6
650 \item Item 7
651 \end{enumerate}
652
653 \subsection{Another subsection with \ObtainTrackedValueExp[2]{subsection}{enumi} Items } \tracklabel{subsec::somelabel}
654
655
656 However, you can use a label as well: \ObtainTrackedValueByLabel{subsec::somelabel}{enumi} Items
657
658 \begin{enumerate}[resume]
659 \item Item 8
660 \item Item 9
661 \item Item 10
662 \item Item 11
663 \item Item 12
664 \item Item 13
665 \end{enumerate}
666
667 \end{document}
668 \end{dispListing}
669
670
671
672
673 \clearpage
674
675 \section{To-Do list}\label{section::todo}
676
677 \begin{itemize}
678 \item Better error handling (no checks for many features so far).
679 \item More options for fine control of the behaviour package and macros.
680 \item Easy - adaption for other documentclasses, especially for \classname{beamer}
681 \item Improve documentation
682 \item More examples
683 \end{itemize}
684
685 If you
686
687 \begin{itemize}
688 \item find bugs
689 \item errors in the documentation
690 \item have suggestions
691 \item have feature requests
692 \end{itemize}
693
694 don't hesitate and contact me via \makeatletter [email protected]\makeatother
695
696 \clearpage
697
698
699 \section{Acknowledgments}
700
701 I would like to express my gratitudes to the developpers of fine \LaTeX{} packages and of course
702 to the users at tex.stackexchange.com, especially:
703
704 \begin{marker}
705 A special gratitude goes to Prof. Dr. Dr. Thomas Sturm for providing the wonderful \CHDocPackage{tcolorbox} package which was used to
706 write this documentation.
707 \end{marker}
708
709
710 \section{Version history}
711
712 \begin{itemize}[itemsep=15pt]
713
714
715 \item \CHDocFullVersion{0.5}
716 Improved the core \cs{setcounter} in order to grab changes for relevant counters there as well.
717
718 \item \CHDocFullVersion{0.4}
719 Improved the core \cs{stepcounter} in order to fit the \CHDocPackage{expl3} and \CHDocPackage{xparse} changes of Februar - April 2017.
720 \item \CHDocFullVersion{0.3}
721 \begin{itemize}
722 \item \CHDocNew{0.3} Support for obtaining a tracked value level by using labels with \refCom{tracklabel}, \refCom{tracklabel*} and \refCom{ObtainTrackedValueByLabel}
723 \item \CHDocNew{0.3} Added the \refCom{RegisterTrackCounter} and \refCom{RegisterMultipleTrackCounters} as a replacement of \refCom{RegisterCounters}.
724 \item Added \refCom{AddToTrackedCounters} macro to circumvent counter value update problems for specific tracked counters.
725 \end{itemize}
726 \item
727 Version \chdocextractversion{xcntperchapversion0.2} \tcbdocmarginnote{\tcbdocnew{\chdocextractversion{xcntperchapversion0.2}}}
728 \begin{itemize}
729 \item Added the expandable version of \cs{ObtainTrackedValues}
730 \item Removed the bug concerning the missing reset of the associated counters
731 \end{itemize}
732
733 \item
734 Version \chdocextractversion{xcntperchapversion0.1} \tcbdocmarginnote{\tcbdocnew{\chdocextractversion{xcntperchapversion0.1}}}
735
736 Bootstrap version, rewrite of previous \CHDocPackage{cntperchap} with LaTeX - 3 - Kernel features
737
738 \end{itemize}
739
740
741
742
743 \clearpage
744 \printindex
745
746
747
748 \end{document}
749