Debian Codegraph @

texmf-dist/source/latex/ncctools/nccfoots.dtx

raw
1 % \iffalse
2 %%
3 %% File: nccfoots.dtx Copyright (C) 1998-2005 by Alexander I. Rozhenko
4 %%
5 %<package>\NeedsTeXFormat{LaTeX2e}
6 %<package>\ProvidesPackage{nccfoots}
7 %<package> [2005/02/03 v1.2 NCC Footnotes Package (NCC)]
8 %
9 % \changes{v1.0}{1998/12/18}{Initial version}
10 % \changes{v1.1}{2004/11/23}{Minor corrections of the documentation}
11 % \changes{v1.2}{2005/02/03}{\NCC@makemark rename to \NCC@makefnmark}
12 %
13 %<*driver>
14 \let\makeindex\relax
15 \documentclass{ltxdoc}
16 \usepackage{nccfoots}
17 \GetFileInfo{nccfoots.sty}
18 \begin{document}
19 \title{The \textsf{nccfoots} package\thanks{This file
20 has version number \fileversion, last
21 revised \filedate.}}
22 \author{Alexander I. Rozhenko\\[email protected]}
23 \date{\filedate}
24 \maketitle
25 \DocInput{nccfoots.dtx}
26 \end{document}
27 %</driver>
28 % \fi
29 %
30 % The package implements commands for generating footnotes marked by
31 % hands.
32 %
33 % \section{User Interface}
34 %
35 % \DescribeMacro\Footnotemark
36 % \DescribeMacro\Footnotetext
37 % \DescribeMacro\Footnote
38 % These commands are acompany to the ordinary \LaTeX's footnote mark
39 % command. They allow user to mark footnotes by hands. Their syntax is
40 % the following:
41 % \begin{quote}
42 % |\Footnotemark|\marg{marker}\\
43 % |\Footnotetext|\marg{marker}\marg{inserted text}\\
44 % |\Footnote|\marg{marker}\marg{inserted text}
45 % \end{quote}
46 % When \meta{marker} is empty the previous marker will be used. Hence,
47 % |\Footnote| command is equal to
48 % \begin{quote}
49 % |\Footnotemark|\marg{marker}|\Footnotetext{}|\marg{inserted text}
50 % \end{quote}
51 %
52 % \StopEventually{}
53 %
54 % \section{The Implementation}
55 %
56 % \begin{macro}{\NCC@makefnmark}
57 % We begin with the internal command |\NCC@makemark| which tests the
58 % footnote marker to be empty and globally redefines \LaTeX{}
59 % internal command |\@thefnmark| to be equal to this marker.
60 % We use exactly the same expansion method as in \LaTeXe{}.
61 % We also initialize |\@thefnmark| command to avoid error when the
62 % first marking command has an empty marker.
63 % \begin{macrocode}
64 %<*package>
65 \def\NCC@makefnmark#1{\def\@tempa{#1}%
66 \ifx\@tempa\@empty \else
67 \begingroup
68 \unrestored@protected@xdef\@thefnmark{#1}%
69 \endgroup
70 \fi
71 }
72 \let\@thefnmark\@empty
73 % \end{macrocode}
74 % \textbf{Note}. If you use an automatic enumeration and produce
75 % marker by |\the|\meta{counter} the internal command producing the
76 % shape of number have to be \emph{robust}. All standard shaping
77 % commands like |\arabic|, |\roman|, etc., are robust. Take it
78 % into account if you want design your own shape.
79 % \end{macro}
80 %
81 % \begin{macro}{\Footnote}
82 % \begin{macro}{\Footnotemark}
83 % \begin{macro}{\Footnotetext}
84 % Finally, we add the handle style footnote commands which are
85 % companions to the respective standard ones.
86 % \begin{macrocode}
87 \newcommand*{\Footnote}[1]{\Footnotemark{#1}\@footnotetext}
88 \newcommand*{\Footnotemark}[1]{\NCC@makefnmark{#1}\@footnotemark}
89 \newcommand*{\Footnotetext}[1]{\NCC@makefnmark{#1}\@footnotetext}
90 %</package>
91 % \end{macrocode}
92 % \end{macro}
93 % \end{macro}
94 % \end{macro}
95 \endinput