Page numbering off by 1
Jerry Seibert
jerry at seibercom.net
Thu Jul 22 17:16:51 CEST 2021
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.
--
Jerry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 3035 bytes
Desc: OpenPGP digital signature
URL: <https://tug.org/pipermail/texhax/attachments/20210722/d8531765/attachment.sig>
More information about the texhax
mailing list.