Page numbers implemented via counter

This commit is contained in:
Kenneth John Odle 2024-04-01 13:10:24 -04:00
parent 8b0a4d7aac
commit 2fa2804961

View File

@ -19,8 +19,11 @@
% https://ctan.org/pkg/forloop % https://ctan.org/pkg/forloop
% Output a variable value: https://sodocumentation.net/latex/topic/9224/counters--if-statements-and-loops-with-latex % Output a variable value: https://sodocumentation.net/latex/topic/9224/counters--if-statements-and-loops-with-latex
\usepackage{forloop} \usepackage{forloop}
\newcounter{ct} \newcounter{ct} % Create a counter for our loop
\def\pgct{3} % Set this value to the number of pages you want + 1 \newcounter{pg} % Create a counter for our page numbers
\setcounter{pg}{1} % Change the value from 0 to 1
\def\pgct{11} % Set this value to the number of leaves you want + 1
% Note: a "leaf" is composed of two double-sided pages.
% Select an appropriate monotype font % Select an appropriate monotype font
\usepackage[varqu]{inconsolata} \usepackage[varqu]{inconsolata}
@ -36,7 +39,7 @@
\ttfamily \ttfamily
% Begin our loop % Begin our loop
%\forloop{ct}{1}{\value{ct}<\value{pgct}}{ \forloop{ct}{1}{\value{ct}<\pgct{}}{
% This is the right page header % This is the right page header
@ -48,8 +51,9 @@
rows = {5.5mm, m, rowsep=1.5pt } rows = {5.5mm, m, rowsep=1.5pt }
} }
TITLE: & & BOOK: & & Page \\ TITLE: & & BOOK: & & Page \\
PROJECT: & & DATE: & & {\LARGE \the\value{ct}} \\ PROJECT: & & DATE: & & {\LARGE \arabic{pg}} \\
\end{tblr} \end{tblr}
\stepcounter{pg}
\newpage \newpage
@ -62,11 +66,13 @@ PROJECT: & & DATE: & & {\LARGE \the\value{ct}} \\
rows = {5.5mm, m, rowsep=1.5pt } rows = {5.5mm, m, rowsep=1.5pt }
} }
TITLE: & & BOOK: & & Page \\ TITLE: & & BOOK: & & Page \\
PROJECT: & & DATE: & & {\LARGE \the\value{ct}} \\ PROJECT: & & DATE: & & {\LARGE \arabic{pg}} \\
\end{tblr} \end{tblr}
\stepcounter{pg}
\newpage
% End our loop % End our loop
%} }
\end{document} \end{document}