summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/docmfp
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-01-12 23:54:18 +0000
committerKarl Berry <karl@freefriends.org>2006-01-12 23:54:18 +0000
commite2704e47074ba4ccb7023867bd1ca061d7e1792b (patch)
treeca5b3fb798063ba653153f511ca5c7c7b5e8f8dd /Master/texmf-dist/tex/latex/docmfp
parent55c2392c87b7708af17f387d36ac3df547848f24 (diff)
docmfp
git-svn-id: svn://tug.org/texlive/trunk@831 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/docmfp')
-rw-r--r--Master/texmf-dist/tex/latex/docmfp/docmfp.sty134
1 files changed, 134 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/docmfp/docmfp.sty b/Master/texmf-dist/tex/latex/docmfp/docmfp.sty
new file mode 100644
index 00000000000..f27333d300a
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/docmfp/docmfp.sty
@@ -0,0 +1,134 @@
+%%
+%% This is file `docmfp.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% docmfp.dtx (with options: `usc')
+%%
+%% Copyright 1999 Peter R. Wilson
+%%
+%% This program is provided under the terms of the
+%% LaTeX Project Public License distributed from CTAN
+%% archives in directory macros/latex/base/lppl.txt.
+%%
+%% Author: Peter Wilson (CUA)
+%% now at: peter.r.wilson@boeing.com
+%%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{docmfp}[2000/10/28 v1.1 General coding extension to the doc package]
+
+\newcommand{\m@fpmakeuscoreletter}{\catcode`\_11\relax}
+\newcommand{\m@fpmakehashletter}{\catcode`\#11\relax}
+\newcommand{\Makem@fpPrivateLetters}{\m@fpmakeuscoreletter\m@fpmakehashletter}
+
+\def\routine{\begingroup
+ \catcode`\\12
+ \Makem@fpPrivateLetters \m@fpm@cro@ \iffalse}
+\let\endroutine\endtrivlist
+
+\def\variable{\begingroup
+ \catcode`\\12
+ \Makem@fpPrivateLetters \m@fpm@cro@ \iftrue}
+\let\endvariable\endroutine
+
+\long\def\m@fpm@cro@#1#2{\endgroup \topsep\MacroTopsep \trivlist
+ \def\makelabel##1{\llap{##1}}%
+ \if@inlabel
+ \let\@tempa\@empty \count@\macro@cnt
+ \loop \ifnum\count@>\z@
+ \edef\@tempa{\@tempa\hbox{\strut}}\advance\count@\m@ne \repeat
+ \edef\makelabel##1{\llap{\vtop to\baselineskip
+ {\@tempa\hbox{##1}\vss}}}%
+ \advance \macro@cnt \@ne
+ \else
+ \macro@cnt\@ne
+ \fi
+ \edef\@tempa{\noexpand\item[\noexpand\PrintMfpName{\string#2}]}%
+ \@tempa
+ \global\advance\c@CodelineNo\@ne
+ #1%
+ \SpecialMainMfpIndex{#2}{\variablestring}{\variableheadname}\nobreak
+ \else
+ \SpecialMainMfpIndex{#2}{\routinestring}{\routineheadname}\nobreak
+ \fi
+ \global\advance\c@CodelineNo\m@ne
+ \ignorespaces}
+
+\newcommand{\routinestring}{\space(routine)}
+\newcommand{\routineheadname}{routines:}
+
+\newcommand{\variablestring}{\space(variable)}
+\newcommand{\variableheadname}{variables:}
+
+\def\Describe{\leavevmode\@bsphack\begingroup\Makem@fpPrivateLetters
+ \Describem@fp}
+
+\def\Describem@fp#1#2#3{\endgroup
+ \marginpar{\raggedleft\PrintMfpName{#3}}%
+ \SpecialMfpIndex{#3}{#2}{#1}\@esphack\ignorespaces}
+
+\def\Code{\begingroup
+ %% \catcode`\\12
+ \Makem@fpPrivateLetters \m@fpm@c}
+\let\endCode\endtrivlist
+
+\long\def\m@fpm@c#1#2#3{\endgroup \topsep\MacroTopsep \trivlist
+ \def\makelabel##1{\llap{##1}}%
+ \if@inlabel
+ \let\@tempa\@empty \count@\macro@cnt
+ \loop \ifnum\count@>\z@
+ \edef\@tempa{\@tempa\hbox{\strut}}%
+ \advance\count@\m@ne \repeat
+ \edef\makelabel##1{\llap{\vtop to\baselineskip
+ {\@tempa\hbox{##1}\vss}}}%
+ \advance\macro@cnt\@ne
+ \else
+ \macro@cnt\@ne
+ \fi
+ \edef\@tempa{\noexpand\item[\noexpand\PrintMfpName{\string#3}]}%
+ \@tempa
+ \global\advance\c@CodelineNo\@ne
+ \SpecialMainMfpIndex{#3}{#2}{#1}\nobreak
+ \global\advance\c@CodelineNo\m@ne
+ \ignorespaces}
+
+\providecommand{\PrintMfpName}[1]{\strut \MacroFont \string #1\ }
+
+\newcommand{\SpecialMainMfpIndex}[3]{\@bsphack
+ \special@index{%
+ \string#1\actualchar
+ \string\verb\quotechar*\verbatimchar\string#1\verbatimchar
+ #2 \encapchar main}%
+ \special@index{#3\levelchar
+ \string#1\actualchar
+ \string\verb\quotechar*\verbatimchar\string#1\verbatimchar
+ \encapchar main}
+ \@esphack}
+
+\def\DescribeRoutine{\leavevmode\@bsphack\begingroup\Makem@fpPrivateLetters
+ \Describem@fpRoutine}
+\def\Describem@fpRoutine#1{\endgroup
+ \marginpar{\raggedleft\PrintMfpName{#1}}%
+ \SpecialMfpIndex{#1}{\routinestring}{\routineheadname}\@esphack\ignorespaces}
+
+\def\DescribeVariable{\leavevmode\@bsphack\begingroup\Makem@fpPrivateLetters
+ \Describem@fpVariable}
+\def\Describem@fpVariable#1{\endgroup
+ \marginpar{\raggedleft\PrintMfpName{#1}}%
+ \SpecialMfpIndex{#1}{\variablestring}{\variableheadname}\@esphack\ignorespaces}
+
+\newcommand{\SpecialMfpIndex}[3]{\@bsphack
+ \index{%
+ \string#1\actualchar
+ \string\verb\quotechar*\verbatimchar\string#1\verbatimchar
+ #2 \encapchar usage}%
+ \index{#3\levelchar
+ \string#1\actualchar
+ \string\verb\quotechar*\verbatimchar\string#1\verbatimchar
+ \encapchar usage}
+ \@esphack}
+
+\endinput
+%%
+%% End of file `docmfp.sty'.