From 2fa28049614a8707a89413dfbaa501da679c800c Mon Sep 17 00:00:00 2001 From: Kenneth Odle Date: Mon, 1 Apr 2024 13:10:24 -0400 Subject: [PATCH] Page numbers implemented via counter --- lab-notebook-contents.tex | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/lab-notebook-contents.tex b/lab-notebook-contents.tex index e34f047..d24a463 100644 --- a/lab-notebook-contents.tex +++ b/lab-notebook-contents.tex @@ -19,8 +19,11 @@ % https://ctan.org/pkg/forloop % Output a variable value: https://sodocumentation.net/latex/topic/9224/counters--if-statements-and-loops-with-latex \usepackage{forloop} -\newcounter{ct} -\def\pgct{3} % Set this value to the number of pages you want + 1 +\newcounter{ct} % Create a counter for our loop +\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 \usepackage[varqu]{inconsolata} @@ -36,7 +39,7 @@ \ttfamily % Begin our loop -%\forloop{ct}{1}{\value{ct}<\value{pgct}}{ +\forloop{ct}{1}{\value{ct}<\pgct{}}{ % This is the right page header @@ -48,8 +51,9 @@ rows = {5.5mm, m, rowsep=1.5pt } } TITLE: & & BOOK: & & Page \\ -PROJECT: & & DATE: & & {\LARGE \the\value{ct}} \\ +PROJECT: & & DATE: & & {\LARGE \arabic{pg}} \\ \end{tblr} +\stepcounter{pg} \newpage @@ -62,11 +66,13 @@ PROJECT: & & DATE: & & {\LARGE \the\value{ct}} \\ rows = {5.5mm, m, rowsep=1.5pt } } TITLE: & & BOOK: & & Page \\ -PROJECT: & & DATE: & & {\LARGE \the\value{ct}} \\ +PROJECT: & & DATE: & & {\LARGE \arabic{pg}} \\ \end{tblr} +\stepcounter{pg} +\newpage % End our loop -%} +} \end{document} \ No newline at end of file