diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/cntperchap/cntperchap_example.tex |
Initial commit
Diffstat (limited to 'macros/latex/contrib/cntperchap/cntperchap_example.tex')
-rw-r--r-- | macros/latex/contrib/cntperchap/cntperchap_example.tex | 151 |
1 files changed, 151 insertions, 0 deletions
diff --git a/macros/latex/contrib/cntperchap/cntperchap_example.tex b/macros/latex/contrib/cntperchap/cntperchap_example.tex new file mode 100644 index 0000000000..cb154640e0 --- /dev/null +++ b/macros/latex/contrib/cntperchap/cntperchap_example.tex @@ -0,0 +1,151 @@ +%% Example file for cntperchap.sty +%% +%% License: LaTeX Project Public License version 1.3 +%% Copyright (2015) Dr. Christian Hupfer +%% Author: Christian Hupfer christian.hupfer@yahoo.de +%% +%% 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 `maintained'. +%% +%% This work consists of all files listed in README +%% +%%%% + + +\documentclass[verbose]{scrbook} + + +\usepackage{tcolorbox} +\usepackage{cntperchap} + +\usepackage{amsthm} +\usepackage{blindtext} +\usepackage{pgffor} + + + +% Register the most important counters +\RegisterCounters{equation,figure,table,section,subsection,subsubsection,paragraph,subparagraph,enumi,enumii,enumiii,enumiv} + +% generate the counter automatically by using 'autodefine=true' otherwise the registration would fail +% Define some theorem for using a non-standard-counter +\newtheorem{theorem}{theorem} + +\newtheorem{lemma}{lemma} +\RegisterCounter{lemma} + + +% To show/number the lower levels too +\setcounter{secnumdepth}{5} + +\begin{document} +\begin{tcolorbox}[title={Document statistics for demonstration},colbacktitle=red,coltitle=black] +There are \numberofstoredcounters\ counters tracked. + + \Fullstatistics +\end{tcolorbox} + +\tableofcontents +\listoffigures +\listoftables + + +\chapter{First} +\ShowStatistics[1] + +\begin{enumerate} +\item Groucho +\item Zeppo +\item Harpo +\item Chico +\end{enumerate} + +\begin{equation} + c^2 = a^2 + b^2 +\end{equation} + +but + +\ShowStatistics[4] +\section{First} + + +\begin{enumerate} +\item This +\item \begin{enumerate} + \item is + \begin{enumerate} + \item a + \begin{enumerate} + \item useless + \end{enumerate} + \end{enumerate} + \end{enumerate} +\item List \theenumiv +\end{enumerate} + + + + +\begin{table} +\caption{faketable} +\caption{other faketable} + +\end{table} +\section{Second} + +\chapter{Second} +\ShowStatistics + +\section{First} +\section{Second} +\section{Third} +\section{Fourth} + + + +% Now a really large chapter +\chapter*{Third} +\ShowStatistics + +\foreach \x in {1,...,5} {% +\section{Section \x~in chapter \thechapter} +} +\chapter{Fourth} +\ShowStatistics[3] + +\begin{figure} +\caption{fake figure} +\caption{other fakefigure 1} +\caption{other fakefigure 2} +\caption{other fakefigure 3} +\caption{other fakefigure 4} + +\end{figure} + + + + +\section*{A single section} + +\begin{theorem} +\blindtext +\end{theorem} +\subsection{A small subsection} +\subsubsection{An even smaller subsubsection} + +\foreach \x in {1,...,10} {% +\begin{equation} + E = mc^2 +\end{equation} +} + + +\end{document}
\ No newline at end of file |