diff options
Diffstat (limited to 'Master/texmf-dist/doc')
-rw-r--r-- | Master/texmf-dist/doc/latex/cntperchap/README | 14 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/cntperchap/cntperchap_doc.pdf | bin | 171311 -> 180332 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/cntperchap/cntperchap_doc.tex | 56 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/cntperchap/cntperchap_example.pdf | bin | 87225 -> 87225 bytes |
4 files changed, 49 insertions, 21 deletions
diff --git a/Master/texmf-dist/doc/latex/cntperchap/README b/Master/texmf-dist/doc/latex/cntperchap/README index 25e50cd8d89..7aeb694f97e 100644 --- a/Master/texmf-dist/doc/latex/cntperchap/README +++ b/Master/texmf-dist/doc/latex/cntperchap/README @@ -1,8 +1,8 @@ -%% LaTeX package cntperchap - version 0.2 (2015/05/09) +%% LaTeX package cntperchap - version 0.3 (2015/06/01) %% %% ------------------------------------------------------------------------------------------- %% Copyright (c) 2015 by Dr. Christian Hupfer <christian dot hupfer at yahoo dot de> -%% ------------------------------------------------------------------------------------------- +%% ------------------------------------------------------------------------------------------ %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -24,8 +24,8 @@ The aim of this package is to provide support for a summary in advance how many Directory listing: - cntperchap_doc.pdf 171311 05/09/15 19:52:36 - cntperchap_doc.tex 17206 05/09/15 19:51:57 -cntperchap_example.pdf 87225 05/09/15 19:52:32 -cntperchap_example.tex 2802 05/09/15 19:51:57 - cntperchap.sty 11993 05/09/15 19:52:36 + cntperchap_doc.pdf 180332 06/01/15 01:49:47 + cntperchap_doc.tex 19613 06/01/15 01:49:30 +cntperchap_example.pdf 87225 06/01/15 01:49:41 +cntperchap_example.tex 2802 06/01/15 01:49:30 + cntperchap.sty 12155 06/01/15 01:49:47 diff --git a/Master/texmf-dist/doc/latex/cntperchap/cntperchap_doc.pdf b/Master/texmf-dist/doc/latex/cntperchap/cntperchap_doc.pdf Binary files differindex 79206a9925e..2869c05638e 100644 --- a/Master/texmf-dist/doc/latex/cntperchap/cntperchap_doc.pdf +++ b/Master/texmf-dist/doc/latex/cntperchap/cntperchap_doc.pdf diff --git a/Master/texmf-dist/doc/latex/cntperchap/cntperchap_doc.tex b/Master/texmf-dist/doc/latex/cntperchap/cntperchap_doc.tex index d361b412caf..1ba7e3727ad 100644 --- a/Master/texmf-dist/doc/latex/cntperchap/cntperchap_doc.tex +++ b/Master/texmf-dist/doc/latex/cntperchap/cntperchap_doc.tex @@ -1,6 +1,6 @@ %% Documentation for cntperchap.sty %% -%% Version 0.2 (2015/05/09} +%% Version 0.3 (2015/06/01} %% %% %% ------------------------------------------------------------------------------------------- @@ -23,6 +23,7 @@ \documentclass[12pt,english]{ltxdoc} \usepackage{scrlayer-scrpage} +\usepackage[tikz]{bclogo} \usepackage[lmargin=3cm,rmargin=3cm,a4paper]{geometry} \usepackage{savesym}% \usepackage{bbding}% @@ -37,7 +38,7 @@ \usepackage[most]{tcolorbox} \usepackage{cntperchap} -\RegisterCounters{page,section,subsection,subsubsection,table,figure} +\RegisterCounters{section,subsection,subsubsection,table,figure} \tcbuselibrary{documentation} @@ -59,7 +60,7 @@ \newtcolorbox{docCommandArgs}[1]{colbacktitle={blue},coltitle={white},title={Description of arguments of command \cs{#1}}} -\def\packageversion{0.2}% +\def\packageversion{0.3}% \makeindex @@ -118,6 +119,8 @@ Author: Christian Hupfer\(^\mathrm{\fnsymbol{footnote}}\) \section{Disclaimer} This package as of its version \packageversion\ is under constant development and as such subject to macro interface changes as well as renaming of macros. +Although the example in this manual treats with the \docCounter{page} counter, it is not recommended to use this package in conjunction with the page counter for a serious document. The page counter is quite difficult to track. + \section{Introduction} 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 section level, for example per chapters. The values are stored at the beginning of a new chapter and written to \cs{jobname.cpsfoo} files, where \docCounter{foo} is short for the relevant counter name. The section level can be one of standard levels @@ -133,6 +136,8 @@ The aim of this package is to provide support for a summary in advance how many The section level can be specified as an option (see \ref{section::package_options}), but is preconfigured on the underlying document class. For \classname{book}-like classes, the section level defaults to \cs{chapter}, for \classname{article}-like documentclasses it defaults to \cs{section}. +In fact, there is no need of having a section level at all. Basically any environment can serve as a track level, however, only one environment type per document so far only. + 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}. @@ -148,7 +153,7 @@ This package is the consequence of the question \url{http://tex.stackexchange.co \documentclass{book} \usepackage{cntperchap} -\RegisterCounters{page,section,subsection,subsubsection,table,figure} +\RegisterCounters{section,subsection,subsubsection,table,figure} \begin{document} \section{First section} @@ -181,10 +186,10 @@ As of version \packageversion~ the package has only following options so far: \item \begin{docKey}{tracklevel}{\meta{=chapter}}{chapter} - This option sets the sectioning level under supervision (tracked). If not specified, the counters are stored on a per chapter base, if set to \texttt{section}, the counter values are stored on a per section level etc. The section level has to be specified without the blackslash $\backslash$. + This option sets the sectioning level or the environment under supervision (tracked). If not specified, the counters are stored on a per chapter base, if set to \texttt{section}, the counter values are stored on a per section level etc. The section level has to be specified without the blackslash $\backslash$. -Unknown section levels will lead to a compilation error. - \end{docKey} +Unknown section levels or environment (counters) will lead to a compilation error. As of version \packageversion~ this requires that the environment and the corresponding counter share the same name. +\end{docKey} \item \begin{docKey}{verbose}{}{} @@ -214,7 +219,7 @@ The packages \packagename{etoolbox} and \packagename{xkeyval} are already loaded 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 \packagename{assoccnt} and \packagename{xifthen} which is not solved so far. -It would be nice to adapt the package for usage on a per frame base with the \classname{beamer} class, see \ref{section::todo} +\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} %This package will so far if the document class does not provide the chapter command. It should work with the standard document classes of \classname{book} and \classname{report} as well as with \classname{memoir} and the relevant \classname{KOMA} equivalents. @@ -279,9 +284,10 @@ By default, \cs{tableofcontents},\cs{listoffigures},\cs{listoftables} and \cs{pr \subsection{User macros} -\begin{docCommand}{GetTotalCounter}{\oarg{chapter number}\marg{counter}} -This returns the total value of the counter (specified as 2nd argument) per chapter. This macro should be expandable. -\begin{docCommandArgs}{GetTotalCounter}% +\begin{docCommand}{GetStoredCounterValue}{\oarg{chapter number}\marg{counter}} +This macro gets the stored value of the counter (specified as 2nd argument) per chapter and stores this number to the counter \docCounter{cps@@tempcounterstorage}. If the counter could not be found, the result is -1. +This macro should be expandable. +\begin{docCommandArgs}{GetStoredCounterValue}% \begin{itemize} \item \oarg{chapter number} This optional argument contains the number of the chapter from which the counter value should be extracted. If this is not given, the current chapter is used. @@ -289,9 +295,19 @@ This returns the total value of the counter (specified as 2nd argument) per chap This is the name of of the counter whose per chapter value should be displayed. \end{itemize} \end{docCommandArgs} +\end{docCommand} - - +\begin{docCommand}{FetchStoredCounterValue}{\oarg{chapter number}\marg{counter}} +\tcbdocmarginnote{\tcbdocnew{2015-06-01}} +This macro gets the stored value of the counter (specified as 2nd argument) per chapter and returns the value. This macro is expandable and is the convenience version of \cs{GetStoredCounterValue}. If the counter could not be found (i.e. the corresponding counter has not been used so far in the document) the result will be -1. +\begin{docCommandArgs}{FetchStoredCounterValue}% +\begin{itemize} + \item \oarg{chapter number} + This optional argument contains the number of the chapter from which the counter value should be extracted. If this is not given, the current chapter is used. + \item \marg{counter} + This is the name of of the counter whose per chapter value should be displayed. + \end{itemize} +\end{docCommandArgs} \end{docCommand} @@ -399,9 +415,15 @@ Enables the storage of counters per chapter (etc.) \clearpage + \section{Generated files} The package uses the same approach as \LaTeX commands to write content to the table of content files. It creates \texttt{.cpsfoo} files, where \cs{foo} is the name of the relevant counter. Those files are constantly updated if the main document has been changed. It's safe to delete those files, however, the correct values appear only after the 2nd and consecutive runs. + +\section{Error messages} + +If one of the tracked counters is deleted in the \refCom{RegisterCounters} - list between two compilation runs, there will be an error message. Just delete all relevant \texttt{*.cps*} files then and recompile twice. + \section{To-Do list}\label{section::todo} \begin{itemize} @@ -450,7 +472,13 @@ write this documentation. \section{Version history} \begin{itemize} - +\item 0.3: +\begin{itemize} + \item Added some remarks about other tracklevels + \item Added some remarks about \classname{beamer} + \item Added \cs{FetchStoredCounterValue} for quicker access to the counter value, instead of using \docCounter{cps@@tempcounterstorage}. + \item Corrected the wrong name of the \cs{GetStoredCounterValue} in the documentation +\end{itemize} \item 0.2: \begin{itemize} \item Introduced the possibility to disable the storage temporarily diff --git a/Master/texmf-dist/doc/latex/cntperchap/cntperchap_example.pdf b/Master/texmf-dist/doc/latex/cntperchap/cntperchap_example.pdf Binary files differindex 333263e9c3e..82d4618d55d 100644 --- a/Master/texmf-dist/doc/latex/cntperchap/cntperchap_example.pdf +++ b/Master/texmf-dist/doc/latex/cntperchap/cntperchap_example.pdf |