summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/ncctools/nccfoots.dtx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-01-11 23:55:29 +0000
committerKarl Berry <karl@freefriends.org>2006-01-11 23:55:29 +0000
commit48243fdbbe15cb58c4136497707e37637e7d4100 (patch)
tree9de6f823e6a2520490bab3ea3f0828852d1a8db3 /Master/texmf-dist/source/latex/ncctools/nccfoots.dtx
parentf7ffde8f769cd6f1d473ae231d219b99b3fa5263 (diff)
trunk/Master/texmf-dist/source/latex/ncctools
git-svn-id: svn://tug.org/texlive/trunk@408 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/ncctools/nccfoots.dtx')
-rw-r--r--Master/texmf-dist/source/latex/ncctools/nccfoots.dtx94
1 files changed, 94 insertions, 0 deletions
diff --git a/Master/texmf-dist/source/latex/ncctools/nccfoots.dtx b/Master/texmf-dist/source/latex/ncctools/nccfoots.dtx
new file mode 100644
index 00000000000..29e2d82d251
--- /dev/null
+++ b/Master/texmf-dist/source/latex/ncctools/nccfoots.dtx
@@ -0,0 +1,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