diff options
author | Karl Berry <karl@freefriends.org> | 2015-05-04 23:33:48 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2015-05-04 23:33:48 +0000 |
commit | f97a5d61adae591bc262091b48989cf2ab69f6ec (patch) | |
tree | fc8c12aafb53ce0e02aafa5f72515406c257570d /Master/texmf-dist/doc/latex/cntperchap/cntperchap_example.tex | |
parent | 38a1779d664014b9d281aabaece754557cdf7200 (diff) |
cntperchap (4may15)
git-svn-id: svn://tug.org/texlive/trunk@37188 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/cntperchap/cntperchap_example.tex')
-rw-r--r-- | Master/texmf-dist/doc/latex/cntperchap/cntperchap_example.tex | 108 |
1 files changed, 108 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/cntperchap/cntperchap_example.tex b/Master/texmf-dist/doc/latex/cntperchap/cntperchap_example.tex new file mode 100644 index 00000000000..d28297021a5 --- /dev/null +++ b/Master/texmf-dist/doc/latex/cntperchap/cntperchap_example.tex @@ -0,0 +1,108 @@ +%% 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{book} + + +\usepackage{cntperchap} +\usepackage{amsthm} +\usepackage{blindtext} +\usepackage{pgffor} + + +% Register the most important counters +\RegisterCountersPerChapter{equation,figure,table,section,subsection,subsubsection,paragraph,subparagraph} + +% generate the counter automatically by using 'autodefine=true' otherwise the registration would fail +%\RegisterCounterPerChapter[autodefine=true]{theorem} +% Define some theorem for using a non-standard-counter +\newtheorem{theorem}{theorem} + +\newtheorem{lemma}{lemma} +\RegisterCounterPerChapter{lemma} + + +% To show/number the lower levels too +\setcounter{secnumdepth}{5} + +\begin{document} +%\tableofcontents + + +\chapter{First} +\ShowStatistics + +but + +\ShowStatistics[4] +\section{First} +\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 + +\begin{figure} +\caption{fake figure} +\caption{other fakefigure 1} +\caption{other fakefigure 2} +\caption{other fakefigure 3} +\caption{other fakefigure 4} + +\end{figure} + +\foreach \x in {1,...,10} {% +\begin{equation} + E = mc^2 +\end{equation} +} + + +\section{A single section} + +\begin{theorem} +\blindtext +\end{theorem} +\subsection{A small subsection} +\subsubsection{An even smaller subsubsection} + +\end{document}
\ No newline at end of file |