blob: 29e2d82d251d466a409467eb39d8cd894459d86e (
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
|
% \iffalse
%%
%% File: nccfoots.dtx Copyright (C) 1998-2005 by Alexander I. Rozhenko
%%
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\ProvidesPackage{nccfoots}
%<package> [2005/02/03 v1.2 NCC Footnotes Package (NCC)]
%
% \changes{v1.0}{1998/12/18}{Initial version}
% \changes{v1.1}{2004/11/23}{Minor corrections of the documentation}
% \changes{v1.2}{2005/02/03}{\NCC@makemark rename to \NCC@makefnmark}
%
%<*driver>
\documentclass{ltxdoc}
\usepackage{nccfoots}
\GetFileInfo{nccfoots.sty}
\begin{document}
\title{The \textsf{nccfoots} package\thanks{This file
has version number \fileversion, last
revised \filedate.}}
\author{Alexander I. Rozhenko\\rozhenko@oapmg.sscc.ru}
\date{\filedate}
\maketitle
\DocInput{nccfoots.dtx}
\end{document}
%</driver>
% \fi
%
% The package implements commands for generating footnotes marked by
% hands.
%
% \section{User Interface}
%
% \DescribeMacro\Footnotemark
% \DescribeMacro\Footnotetext
% \DescribeMacro\Footnote
% These commands are acompany to the ordinary \LaTeX's footnote mark
% command. They allow user to mark footnotes by hands. Their syntax is
% the following:
% \begin{quote}
% |\Footnotemark|\marg{marker}\\
% |\Footnotetext|\marg{marker}\marg{inserted text}\\
% |\Footnote|\marg{marker}\marg{inserted text}
% \end{quote}
% When \meta{marker} is empty the previous marker will be used. Hence,
% |\Footnote| command is equal to
% \begin{quote}
% |\Footnotemark|\marg{marker}|\Footnotetext{}|\marg{inserted text}
% \end{quote}
%
% \StopEventually{}
%
% \section{The Implementation}
%
% \begin{macro}{\NCC@makefnmark}
% We begin with the internal command |\NCC@makemark| which tests the
% footnote marker to be empty and globally redefines \LaTeX{}
% internal command |\@thefnmark| to be equal to this marker.
% We use exactly the same expansion method as in \LaTeXe{}.
% We also initialize |\@thefnmark| command to avoid error when the
% first marking command has an empty marker.
% \begin{macrocode}
%<*package>
\def\NCC@makefnmark#1{\def\@tempa{#1}%
\ifx\@tempa\@empty \else
\begingroup
\unrestored@protected@xdef\@thefnmark{#1}%
\endgroup
\fi
}
\let\@thefnmark\@empty
% \end{macrocode}
% \textbf{Note}. If you use an automatic enumeration and produce
% marker by |\the|\meta{counter} the internal command producing the
% shape of number have to be \emph{robust}. All standard shaping
% commands like |\arabic|, |\roman|, etc., are robust. Take it
% into account if you want design your own shape.
% \end{macro}
%
% \begin{macro}{\Footnote}
% \begin{macro}{\Footnotemark}
% \begin{macro}{\Footnotetext}
% Finally, we add the handle style footnote commands which are
% companions to the respective standard ones.
% \begin{macrocode}
\newcommand*{\Footnote}[1]{\Footnotemark{#1}\@footnotetext}
\newcommand*{\Footnotemark}[1]{\NCC@makefnmark{#1}\@footnotemark}
\newcommand*{\Footnotetext}[1]{\NCC@makefnmark{#1}\@footnotetext}
%</package>
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
\endinput
|