Page numbering off by 1
Jerry Seibert
jerry at seibercom.net
Sat Jul 24 23:12:50 CEST 2021
On Thu, 22 Jul 2021 11:16:51 -0400, Jerry Seibert stated:
>On Thu, 22 Jul 2021 13:05:10 +0200, Herbert Voss stated:
>>Am 22.07.21 um 00:20 schrieb Jerry Seibert:
>>> I am trying to place a frame around several pages in a document I am
>>> creating. The frame works fine, "varioref" gets the page number
>>> wrong.
>>
>>Looks like a problem with the pgf box. Here is a solution with
>>fabcybox:
>>
>>\documentclass{report}%
>>\usepackage[letterpaper, left=0.50in, right=0.50in, top=0.50in,
>>bottom=1.00in]{geometry}
>>\usepackage{fancyhdr,fancybox} % Custom page headers and footers%
>>\usepackage{lastpage}
>>
>>\pagestyle{fancy} % set page style to fancy%
>>\fancyfoot{} % clear the footers%
>>\fancyhead{} % clear the headers%
>>\renewcommand{\headrulewidth}{0pt} % Eliminate the head rule line%
>>\renewcommand{\footrulewidth}{2.0pt}
>>\pagenumbering{arabic}%
>>
>>\fancyfoot[r]{\footnotesize \textbf{Page \thepage\
>>of~\pageref*{LastPage}}}%%
>>
>>\fancypage{%
>> \setlength\fboxsep{8pt}%
>> \setlength\fboxrule{2pt}%
>> \fbox}{}
>>\begin{document}
>> Start of document \pageref{page2} and \pageref{page3}.
>> \cleardoublepage
>> this is page 2. \label{page2}
>> \cleardoublepage
>> this is page three \label{page3}
>>\end{document}
>>
>>Herbert
>
>Thanks, it works perfectly. I never thought about using "fancy" for
>creating boxes.
I spoke too soon. The frame is shifted to the right; i.e., not centered
on the page.
--
Jerry
More information about the texhax
mailing list.