I'm trying to set a count in latex on the total number of pages:
\newcount\mypagecount
\mypagecount=\insertpresentationendpage
But whenver I do this, it auto "prints" the total number of pages instead of putting the number as a count. Is there a way to set it as a count?
Here is more precisely what I'm trying to do:
\newcount\mypagenum
\newcount\mypagecount
\newdimen\barwidth
\mypagenum=\insertpagenumber
\mypagecount=\insertpresentationendpage
\barwidth=\paperwidth
\multiply\barwidth by \mypagenum
\divide\barwidth by \mypagecount
I tried with counters, but that threw errors as well:
\newcounter{mypagecount}
\setcounter{mypagecount}{\insertpresentationendpage}
Any ideas how I can do the division at the end if I can't use these numbers and/or how to actually use these numbers?
\insertpresentationendpage
doesn't expand to a number (it isn't expandable at all), so you can't use it directly in an assignment. – Skillmon Sep 8 '20 at 19:04\insertpagenumber
(you're missing thes
). – Skillmon Sep 8 '20 at 19:05s
. Sorry. – Aram Papazian Sep 8 '20 at 19:33