Debian Codegraph @

texmf-dist/doc/latex/zref/zref-example-nextpage.tex

raw
1 %%
2 %% This is file `zref-example-nextpage.tex',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% zref.dtx (with options: `example-nextpage')
8 %%
9 %% This is a generated file.
10 %%
11 %% Project: zref
12 %% Version: 2026-03-07 v2.37
13 %%
14 %% Copyright (C)
15 %% 2006-2012 Heiko Oberdiek
16 %% 2016-2026 Oberdiek Package Support Group
17 %%
18 %% This work may be distributed and/or modified under the
19 %% conditions of the LaTeX Project Public License, either
20 %% version 1.3c of this license or (at your option) any later
21 %% version. This version of this license is in
22 %% https://www.latex-project.org/lppl/lppl-1-3c.txt
23 %% and the latest version of this license is in
24 %% https://www.latex-project.org/lppl.txt
25 %% and version 1.3 or later is part of all distributions of
26 %% LaTeX version 2005/12/01 or later.
27 %%
28 %% This work has the LPPL maintenance status "maintained".
29 %%
30 %% The Current Maintainers of this work are
31 %% Heiko Oberdiek and the Oberdiek Package Support Group
32 %% https://github.com/ho-tex/zref/issues
33 %%
34 %% This work consists of the main source file zref.dtx
35 %% and the derived files
36 %% zref.sty, zref.pdf, zref.ins, zref.drv, zref-base.sty,
37 %% zref-abspage.sty, zref-abspos.sty, zref-counter.sty,
38 %% zref-dotfill.sty, zref-env.sty, zref-hyperref.sty,
39 %% zref-lastpage.sty, zref-marks.sty, zref-nextpage.sty,
40 %% zref-pageattr.sty, zref-pagelayout.sty, zref-perpage.sty,
41 %% zref-runs.sty, zref-savepos.sty, zref-thepage.sty,
42 %% zref-titleref.sty, zref-totpages.sty, zref-user.sty,
43 %% zref-xr.sty, zref-example.tex, zref-example-lastpage.tex,
44 %% zref-example-nextpage.tex, zref-test1.tex,
45 %% zref-test-base.tex, zref-test-runs.tex,
46 %% zref-test-titleref-memoir.tex.
47 %%
48 \documentclass{book}
49
50 \usepackage{zref-nextpage}[2019/11/29]
51 \znextpagesetup
52 {\thepage}% next page is unknown
53 {\thepage\ (#1)}% this page is last page
54 {\thepage\ $\rightarrow$ #1}% next page is known
55 \renewcommand*{\znonextpagename}{last page}
56
57 \usepackage{fancyhdr}
58 \pagestyle{fancy}
59 \fancyhf{}
60 \fancyhead[LE,RO]{\znextpage}
61 \fancypagestyle{plain}{%
62 \fancyhf{}%
63 \fancyhead[LE,RO]{\znextpage}%
64 }
65
66 \begin{document}
67 \frontmatter
68 \tableofcontents
69 \mainmatter
70 \chapter{Hello World}
71 \clearpage
72 \section{Last section}
73 \end{document}
74 \endinput
75 %%
76 %% End of file `zref-example-nextpage.tex'.