summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/nonumonpart/nonumonpart.dtx
blob: 8e0a3b96c9fd72753f7b649f50eb157a34bfbde9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
% \iffalse meta-comment
% Time-stamp: <2011-04-15 10:09:34 yvon>
% Copyright (C) 2011 by Yvon Henel 
% dit "le TeXnicien de surface" 
% mail: <le.texnicien.de.surface@wanadoo.fr>
% ------------------------------------------------------------------
% 
% This file may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.2
% of this license or (at your option) any later version.
% The latest version of this license is in:
%
%    http://www.latex-project.org/lppl.txt
%
% and version 1.2 or later is part of all distributions of LaTeX 
% version 1999/12/01 or later.
% \fi
%
% \iffalse
%<*package>
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\def\PackageName{nonumonpart}  
\def\fileversion{v1}
\def\filedate{2011/04/15}
\def\docdate{2011/04/15}
\def\fileinfo{nonumonpart.sty by Le TeXnicien de surface}
\ProvidesPackage{nonumonpart}
   [\filedate\space\fileversion\space\fileinfo] 
%</package>
% \fi
% \iffalse
%<*driver>
\documentclass[a4paper]{ltxdoc}
\usepackage[latin9]{inputenc}
\usepackage[T1]{fontenc}  
\usepackage{nonumonpart}[2011/04/15]
\usepackage{nonumonpart-code}
\usepackage{xspace}
\usepackage{lmodern}
\usepackage[french,english]{babel}
\usepackage{hypdoc}
\usepackage{hologo}
% commentez la ligne suivante pour avoir un document avec le code
% \OnlyDescription
% comment out the preceding line to obtain the full code 
\EnableCrossrefs         
\CodelineIndex
\RecordChanges
\begin{document}
  \DocInput{nonumonpart.dtx}
\end{document}
%</driver>
% \fi
%
% \CheckSum{22}
% 
% \CharacterTable
%  {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
%   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
%   Digits        \0\1\2\3\4\5\6\7\8\9
%   Exclamation   \!     Double quote  \"     Hash (number) \#
%   Dollar        \$     Percent       \%     Ampersand     \&
%   Acute accent  \'     Left paren    \(     Right paren   \)
%   Asterisk      \*     Plus          \+     Comma         \,
%   Minus         \-     Point         \.     Solidus       \/
%   Colon         \:     Semicolon     \;     Less than     \<
%   Equals        \=     Greater than  \>     Question mark \?
%   Commercial at \@     Left bracket  \[     Backslash     \\
%   Right bracket \]     Circumflex    \^     Underscore    \_
%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%   Right brace   \}     Tilde         \~}
%
%
% \changes{v1}{2011/04/15}{first public version.}
%
% \DoNotIndex{\newcommand,\newenvironment,^^A
%   \i,\ae,\oe,\DeclareOption,\string,\PackageInfo,^^A
%   \ExecuteOptions, \providecommand, \newif,^^A  
%   \DeclareOption, \PackageError, \CurrentOption, \space,^^A  
%   \MessageBreak, \ExecuteOptions, \ProcessOptions,^^A  
%   \fi, \if, \or, \ifnum,\ifcase, \def, \expandafter,^^A
%   \RequirePackage, \@ctrerr, \ProcessOptions,\relax,^^A
%   \@ifundefined, \AtBeginDocument,\let,\renewcommand,^^A
%   \@gobble, \thispagestyle, \ifcsname, \part,^^A
%   \newpage, \chapter, \pagestyle, \cleardoublepage,^^A
%   \text, \textup \csname, \endcsname, \value, \else, \ensuremath}
%
% \GetFileInfo{nonumonpart.sty}
% \title{The package \textsf{nonumonpart}\thanks{This document corresponds 
%        to the file \textsf{nonumonpart}~\fileversion, dated
%        \filedate.}\\ \EXPLICATION}
% \author{Le \TeX nicien de surface\thanks{%
%                 \texttt{le.texnicien.de.surface@wanadoo.fr}}}  
%
% \maketitle
% 
% \begin{abstract}
%   This package is just a \LaTeX\ wrapper around the not so well
%   known answer to the FAQ:
%   ``\href{http://www.tex.ac.uk/cgi-bin/texfaq2html?label=nopageno}{How
%     to get rid of page numbers}''.
% 
%   The English documentation for the user is available in
%   \texttt{\PackageName-en.pdf}. 
% \end{abstract}
% \begin{otherlanguage}{frenchb}
%   \begin{abstract}
%     Cette extension n'est qu'une enveloppe \LaTeX ienne pour la
%     solution pas vraiment bien connue à la question souvent posée:
%     \og comment se débarrasser du numéro de page sur la page de titre
%     d'une partie?\fg.
% 
%     La documentation en français pour l'utilisateur est 
%     \texttt{\PackageName-fr.pdf}.  
%   \end{abstract}
% \end{otherlanguage}
% 
% \tableofcontents
% \StopEventually{}
% \section{The Code}
% \iffalse
%<*package>
% \fi
%
% To begin with, I would like to emphasize that I am \emph{not}
% the author of the code which ensures the disappearance of the page
% number on the title page of a part (command \cs{part} of
% \emph{classical} classes).
% 
%\subsection{The Options}
%
% There are no options.
% 
%\subsection{The Commands}
%
% And no end user command either. 
% 
% Nonetheless if the command \cs{part} is defined \cs{@endpart} is
% redefined. Just in case, the original definition of \cs{@endpart}
% is saved in \cs{S@VE@@endpart}.
% 
% To test the existence of \cs{part}, we use a \hologo{eTeX}
% primitive.
% \begin{macro}{\@endpart}
%   This is the macro which defines the page style on the title page
%   of a part. The code is taken from UK-FAQ. I've just put some test
%   around and delayed it at the beginning of the document, just in
%   case, once again.
%    \begin{macrocode}
\AtBeginDocument{
\ifcsname part\endcsname
  \let\S@VE@@endpart\@endpart
  \def\@endpart{\thispagestyle{empty}\S@VE@@endpart}
  \PackageInfo{nonumonpart}{%
    The command \string\@endpart\space is redefined\@gobble}
\else
  \PackageInfo{nonumonpart}{%
    As the command \string\part\space is not known I do nothing\@gobble}
\fi}
%    \end{macrocode}
% \end{macro}
% 
% And that's all for the code.
% \iffalse
%</package>
% \fi
% \Finale \PrintChanges\PrintIndex
% \iffalse
%<*doc-sty>
\ProvidesPackage{nonumonpart-tools}
\RequirePackage[a4paper,%
                margin=3.5cm,%
                marginparwidth=0.5cm]{geometry}
\RequirePackage{fancyvrb}
\AtBeginDocument{\DefineShortVerb{\|}}
\newcommand{\TO}{\textemdash\ \ignorespaces}
\newcommand{\TF}{\unskip\ \textemdash\xspace}
\newcommand{\CAD}{c.-\`a-d.\xspace}
\DeclareRobustCommand\meta[1]{%
     \ensuremath\langle
     \ifmmode \expandafter \nfss@text \fi
     {%
      \meta@font@select
      \edef\meta@hyphen@restore
        {\hyphenchar\the\font\the\hyphenchar\font}%
      \hyphenchar\font\m@ne
      \language\l@nohyphenation
      #1\/%
      \meta@hyphen@restore
     }\ensuremath\rangle}
\def\meta@font@select{\itshape}
\def\GetFileInfo#1{%
  \def\filename{#1}%
  \def\@tempb##1 ##2 ##3\relax##4\relax{%
    \def\filedate{##1}%
    \def\fileversion{##2}%
    \def\fileinfo{##3}}%
  \edef\@tempa{\csname ver@#1\endcsname}%
  \expandafter\@tempb\@tempa\relax? ? \relax\relax}
\DeclareRobustCommand\cs[1]{\texttt{\char`\\#1}}
\providecommand\marg[1]{%
  {\ttfamily\char`\{}\meta{#1}{\ttfamily\char`\}}}
\providecommand\oarg[1]{%
  {\ttfamily[}\meta{#1}{\ttfamily]}}
\providecommand\parg[1]{%
  {\ttfamily(}\meta{#1}{\ttfamily)}}
\newcommand\PrintDescribeMacro[1]{\cs{#1}}
\def\DescribeMacro{\leavevmode\@bsphack
   \begingroup\Describe@Macro}
\def\Describe@Macro#1{\endgroup
  \marginpar{\raggedleft\PrintDescribeMacro{#1}}%
  \index{#1@\PrintDescribeMacro{#1}}\@esphack\ignorespaces} 
\newcommand\DescribeEnv[1]{\@bsphack 
  \marginpar{\raggedleft\texttt{#1}}%
  \index{#1@\texttt{#1} (environnement)}%
  \index{environnement!\texttt{#1}}\@esphack\ignorespaces} 
\reversemarginpar
%</doc-sty>
% \fi
% \iffalse
%<package-sty>\ProvidesPackage{nonumonpart-code}
%<*sty-common>
\newcommand\BOP{\discretionary{}{}{}}
\newcommand\Option[1]{\textsc{#1}}
\newcommand\Pkg[1]{\textsf{#1}}
\newcommand\Sourire{\texttt{\string;-)}}
\newcommand\DescribeOption[1]{\@bsphack 
  \marginpar{\raggedleft\textsc{#1}}%
  \index{#1 (option)}%
  \index{option!\Option{#1}}\@esphack\ignorespaces} 
\newcommand\EXPLICATION{%
  \textsf{nonumonpart} = 
  \textsf{no} (page) \textsf{num}ber \textsf{on} \textsf{part} 
  title page} 
%</sty-common>
% \fi
% \iffalse
%<*doc>
\documentclass[a4paper]{article}
\usepackage{xspace,array,microtype}
\usepackage{nonumonpart}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
%<fr>\usepackage[english,frenchb]{babel}
%<en>\usepackage[frenchb,english]{babel}
\usepackage{nonumonpart-tools}
\usepackage{makeidx}
\usepackage[colorlinks=true,
            linkcolor=blue,
            urlcolor=blue,
            citecolor=blue]{hyperref}

\newcommand\Filet{%
  \par\vspace*{0.5\baselineskip}
  \par\noindent\hrulefill
  \par\vspace*{0.5\baselineskip}\par}

\makeindex
\begin{document}
\GetFileInfo{nonumonpart.sty}
%<*fr>
\title{Documentation française de l'extension
  \textsf{nonumonpart}\thanks{%
    Ce document correspond au fichier \textsf{nonumonpart}~\fileversion,
    du \filedate.}\\[12pt] \large \EXPLICATION}
%</fr>
%<*en>
\title{The English documentation of the package
  \textsf{nonumonpart}\thanks{This document corresponds to the file
    \textsf{nonumonpart}~\fileversion, dated \filedate.}\\[12pt]
  \large \EXPLICATION}
%</en>
\author{Le \TeX nicien de surface\\ 
        \href{mailto:le.texnicien.de.surface@wanadoo.fr}% 
        {le.texnicien.de.surface@wanadoo.fr}}
\date{\docdate}

\maketitle

\begin{abstract} 
%<*fr>
Cette extension n'est qu'une enveloppe \LaTeX ienne pour la solution
pas vraiment bien connue à la question souvent posée: \og comment se
débarrasser du numéro de page sur la page de titre d'une partie? \fg,
voir \href{http://www.tex.ac.uk/cgi-bin/texfaq2html?label=nopageno}{How
  to get rid of page numbers}.

Je, le \TeX nicien de Surface, ne suis l'auteur \emph{que} de l'extension
et, en aucun cas, du code lui-même, code fourni de longue date par la
\href{http://www.tex.ac.uk/cgi-bin/texfaq2html?introduction=yes}{FAQ de
  UK-TUG} et redonné, de ci, de là, sur les divers forums dédiés à \TeX{}
et \LaTeX.

  \Filet

  \begin{otherlanguage}{english}\sffamily{}
    This is the French documentation for user of package
    \Pkg{\PackageName}. 
    The English documentation should be available as
    \texttt{\PackageName-en.pdf}.
  \end{otherlanguage}
%</fr> 
%<*en> 
This package is just a \LaTeX\ wrapper around the not so well known answer
to the FAQ:
``\href{http://www.tex.ac.uk/cgi-bin/texfaq2html?label=nopageno}{How to get
  rid of page numbers}''.

I, the \TeX nicien de Surface, am the author of the wrapping only and
\emph{not} of the code itsel which has been, for many years, available on
the \href{http://www.tex.ac.uk/cgi-bin/texfaq2html?introduction=yes}{FAQ of
  UK-TUG} and given, from time to time, on different newgroups dedicated to
\TeX\ and \LaTeX.

  \Filet

  \begin{otherlanguage}{french}\sffamily{} 
    Ceci est la documentation anglaise pour l'utilisateur de l'extension
    \Pkg{\PackageName}.  La documentation française devrait être disponible
    sous le nom de \texttt{\PackageName-fr.pdf}.
  \end{otherlanguage}
%</en>
\Filet
\end{abstract}
% \tableofcontents

%<*fr>
Comme signalé ci-dessus, ceci n'est ni nouveau ni rare. Le code est
connu depuis longtemps et trouvable facilement sur diverses FAQs et
archives de forums \TeX niques. Cependant, la question m'ayant été
posée récemment dans une formation à \LaTeX, j'ai pensé qu'en écrivant
cette petite extension je me faciliterais la vie. Il est, en effet,
plus facile de dire \og chargez \emph{cette} extension\fg plutôt que
\og allez sur le net, cherchez la bonne FAQ, trouvez la bonne question
et suivez le mode d'emploi\fg.
%</fr>
%<*en>
As stated above, this is neither new nor rare. The code has been known
for a long time and easily available on different FAQs and in
different archives of \TeX nical newsgroups. However, the question has
been recently asked to me during a session of training in \LaTeX\ and
I have thought it would help me if I wrote this tiny package. It is,
actually, easier to say ``load \emph{this} package'' than ``surf the
net, find the good FAQ, find the good question, follow the how-to''.
%</en>

%<*fr>
Cette extension n'émet aucun avertissement \TO \emph{package
  warning}\TF mais fournit une information \TO \emph{package
  info}.
%</fr>
%<*en>
This package gives no \emph{warning} but one \emph{info}.
%</en>

%<*fr>
J'espère que cette extension rendra quelques services. S'il était
possible de la rendre encore plus mince, j'espère également que l'on
voudra bien m'indiquer où je peux apporter quelque amélioration.
%</fr>
%<*en>
I hope this package will be of service. If it appears that it could be
possible to make even slimmer, I also hope that one would like to tell
me where I could improve it. 

Last but not least, do not hesitate to tell me where, and how, I have
offended the English language by sheer clumsiness for I certainly do
not intend any offence. \Sourire
%</en>

%<fr>\section{Utilisation}
%<en>\section{Usage}

%<*fr>
Cette extension n'a pas d'option et ne fournit aucune commande pour
l'utilisateur. Elle ne fait que redéfinir \TO le code est tiré de la
page
\href{http://www.tex.ac.uk/cgi-bin/texfaq2html?label=nopageno}{How to
  get rid of page numbers} de la FAQ de UK-TUG\TF la commande interne
\cs{@endpart} de telle sorte que la page de titre d'une partie \TO
obtenue avec la commande \cs{part}\TF soit dotée du style de page
\texttt{empty}.
%</fr>
%<*en>
This package has no option and provides no end user macro. It
redefines \TO the code is taken from the page
\href{http://www.tex.ac.uk/cgi-bin/texfaq2html?label=nopageno}{How to
  get rid of page numbers} of UK-TUG FAQ\TF the internal macro
\cs{@endpart} in order to ensures that the title page of a part \TO
obtained with the commande \cs{part}\TF has page style \texttt{empty}.
%</en>

%<*fr>
Il suffit donc de charger cette extension avec l'habituel
%</fr>
%<*en>
Suffices to load this package with the usual
%</en>
|\usepackage{nonumonpart}|. 

%<*fr>

%</fr>
%<*en>

%</en>
\end{document}
%</doc> 
% \fi
% \endinput
% Local Variables: 
% coding: iso-8859-15
% mode: doctex
% TeX-master: t
% End: