Debian Codegraph @

texmf-dist/doc/latex/totpages/totexmpl.tex

raw
1 %%
2 %% This is file `totexmpl.tex',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% totpages.dtx (with options: `example')
8 %%
9 %% Copyright (c) [2005] by Wilhelm Mueller. All rights reserved.
10 %%
11 %% This file is part of the Totpages package
12 %%
13 %% This program may be redistributed and/or modified under the terms
14 %% of the LaTeX Project Public License, either version 1.0 of this
15 %% license, or (at your option) any later version.
16 %% The latest version of this license is in
17 %% CTAN:macros/latex/base/lppl.txt.
18 %%
19 %% The Totpages package contains these files:
20 %%
21 %% totpages.dtx
22 %% totpages.ins
23 %% totexmpl.tex
24 %%
25 %% Error Reports in case of UNCHANGED versions to
26 %%
27 %% Wilhelm Mueller
28 %% Herbststrasse 66
29 %% D-28215 Bremen
30 %% [email protected]
31 %%
32 \NeedsTeXFormat{LaTeX2e}[1995/12/01]
33 %% \CharacterTable
34 %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
35 %% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
36 %% Digits \0\1\2\3\4\5\6\7\8\9
37 %% Exclamation \! Double quote \" Hash (number) \#
38 %% Dollar \$ Percent \% Ampersand \&
39 %% Acute accent \' Left paren \( Right paren \)
40 %% Asterisk \* Plus \+ Comma \,
41 %% Minus \- Point \. Solidus \/
42 %% Colon \: Semicolon \; Less than \<
43 %% Equals \= Greater than \> Question mark \?
44 %% Commercial at \@ Left bracket \[ Backslash \\
45 %% Right bracket \] Circumflex \^ Underscore \_
46 %% Grave accent \` Left brace \{ Vertical bar \|
47 %% Right brace \} Tilde \~}
48 %%
49 %% ===================================================================
50 %% @LaTeX-style-file{
51 %% author = {Wilhelm M\"uller},
52 %% version = "2.00",
53 %% date = "19 September 2005",
54 %% filename = "totpages.sty",
55 %% address = {Wilhelm M\"uller
56 %% Herbststra\ss{}e 66
57 %% D-28215 Bremen
58 %% telephone = "+49-421-1692525",
59 %% email = "[email protected]",
60 %% codetable = "ISO/ASCII",
61 %% keywords = "LaTeX, pages",
62 %% supported = "yes",
63 %% docstring = "LaTeX package which sets count1 to the total
64 %% number of pages in the document.
65 %% Uses the everyshi and keyval packages."
66 %%
67 %% }
68 %% ===================================================================
69 \documentclass[pagespersheet=2]{article}
70 \usepackage[dvips]{hyperref}
71 %%%%% Replace preceding line by the following one for pdflatex:
72 %%\usepackage[pdftex]{hyperref}
73 \usepackage[dvi]{totpages}
74 \renewcommand{\theTotPages}{\roman{TotPages}}
75 \begin{document}
76 \setcounter{page}{12345}
77 This is the number of pages (in Roman numerals): ``\ref{TotPages}''.
78 On the last page, the number ``\pageref{TotPages}'' is printed.
79
80 \clearpage
81
82 a second page\ldots
83
84 \clearpage
85
86 and a last one\ldots\ldots
87
88 When printed on a duplex printer in duplex mode, \TotSheets{} sheets of
89 paper will be needed.
90 \end{document}
91 \endinput
92 %%
93 %% End of file `totexmpl.tex'.