Debian Codegraph @

texmf-dist/source/latex/modref/modref.drv

raw
1 %%
2 %% This is file `modref.drv',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% modref.dtx (with options: `driver')
8 %%
9 %% IMPORTANT NOTICE:
10 %%
11 %% For the copyright see the source file.
12 %%
13 %% Any modified versions of this file must be renamed
14 %% with new filenames distinct from modref.drv.
15 %%
16 %% For distribution of the original source see the terms
17 %% for copying and modification in the file modref.dtx.
18 %%
19 %% This generated file may be distributed as long as the
20 %% original source files, as listed above, are part of the
21 %% same distribution. (The sources need not necessarily be
22 %% in the same archive or directory.)
23 %% =============================================================================================
24 %% \CharacterTable
25 %% {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
26 %% 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
27 %% Digits \0\1\2\3\4\5\6\7\8\9
28 %% Exclamation \! Double quote \" Hash (number) \#
29 %% Dollar \$ Percent \% Ampersand \&
30 %% Acute accent \' Left paren \( Right paren \)
31 %% Asterisk \* Plus \+ Comma \,
32 %% Minus \- Point \. Solidus \/
33 %% Colon \: Semicolon \; Less than \<
34 %% Equals \= Greater than \> Question mark \?
35 %% Commercial at \@ Left bracket \[ Backslash \\
36 %% Right bracket \] Circumflex \^ Underscore \_
37 %% Grave accent \` Left brace \{ Vertical bar \|
38 %% Right brace \} Tilde \~}
39 %%
40 %% Package `modref' to use with LaTeX 2e
41 %% Copyright (C) 2007 J. Niel de Beaudrap, all rights reserved.
42 \documentclass[draft]{ltxdoc}
43 \usepackage[left=4.5cm,right=3cm,top=3cm,bottom=3cm]{geometry}
44 \usepackage{amsmath,amsthm}
45 \usepackage{modref}
46 \setlength\hfuzz{15pt} % dont make so many
47 \hbadness=7000 % over and under full box warnings
48
49 \refstyle{itemNo}{[Item~\##1]}
50 \refstyle{numero}{\texttt{\itshape numero~#1}}
51 \refstyle{def}{Definition~#1}
52 \refstyle{lemma}{Lemma~#1}
53 \refstyle{thm}{Theorem~#1}
54 \refstyle{fig}{Figure~#1}
55 \refstyle{eqn}{Eqn.~#1}
56 \eqrefstyle{\textbf{(#1)}}
57 \displaytagstyle{{\Large$\bigcirc\mspace{-12mu}$}#1}
58 \stepcounter{equation}
59
60 \makeatletter
61 \newenvironment{headerlist}{%
62 \setlength\topsep{\baselineskip}%
63 \setlength\parsep{1.3em}%
64 \setlength\parskip{1.3em}%
65 \setlength\listparindent{0ex}%
66 \def\next@item[##1]{%
67 \def\item{\egroup\next@item}
68 \@inmatherr\item
69 \bgroup
70 \addtolength\leftskip{2.5em}%
71 \par\noindent\hspace{-2.5em}\mbox{\headerliststyle{##1}}~\\[1ex]%
72 \setlength\parindent{0ex}%
73 \setlength\parskip{1ex}%
74 \ignorespaces}
75 \let\item\next@item
76 }{%
77 \par\egroup\leavevmode\noindent\ignorespaces
78 }
79 \newcommand\headerliststyle[1]{\texttt{\mdseries\upshape #1}}
80 \makeatother
81
82 \newcommand\ie{\textit{i.e.}}
83 \newcommand\eg{\textit{e.g.}}
84 \newcommand\etc{\textit{etc.}}
85
86 \begin{document}
87 \DocInput{modref.dtx}
88 \end{document}
89 %% Main text:
90 \newcommand\modref@error{\PackageError{modref}}
91 \edef\reserved@a{Ref}%
92 \@ifundefined\reserved@a{%
93 \let\Ref\ref
94 }{%
95 \modref@error{%
96 Command \string\Ref\ defined already; refer to the help message.%
97 }{%
98 The "modref" package defines the command \string\Ref\ to allow you (and
99 the package) to use the original functionality of \string\ref. However, in
100 this instance, \string\Ref\ already had a meaning when "modref" started
101 running. Please determine what is defining \string\Ref, and whether you need
102 it.}}
103 \def\@ifempty#1{\@xifempty#1@@..\@nil}
104 \long\def\@xifempty#1#2@#3#4#5\@nil{ %
105 \ifx#3#4\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}
106 \DeclareStringOption[:]{delimiter}
107 \ProcessKeyvalOptions*
108 \newcommand\setrefdelimiter[1]{%
109 \def\ref##1{\modref@ref##1#1\egroup\modref@basestyle}%
110 \def\varref##1{\modref@ref##1#1\egroup\modref@varbasestyle}%
111 \def\modref@ref##1#1##2\egroup##3{%
112 \@ifempty{##2}{%
113 \expandafter\@setref\csname r@##1\endcsname{##3\expandafter\@iden}{##1}%
114 }{%
115 \modref@@ref##1#1##2\egroup##3}}%
116 \def\modref@@ref##1#1##2#1\egroup##3{%
117 \@ifundefined{@modref@##1}{%
118 \expandafter\@setref\csname r@##1#1##2\endcsname{%
119 ##3\expandafter\@iden}{##1#1##2}%
120 }{%
121 \expandafter\def\expandafter\@tempa\expandafter{%
122 \csname @modref@##1\endcsname}%
123 \expandafter\@setref\csname r@##1#1##2\endcsname{%
124 ##3\expandafter\@tempa}{##1#1##2}%
125 }}%
126 }%
127 \ifx\modref@delimiter\@empty
128 \modref@error{Option "delimiter" must be set to a non-empty value}{%
129 The option "delimiter" was used, but seems to have been set to the
130 empty string. I require a character, or a multi-character string, to
131 delimit reference style names within cross-reference labels. If in
132 doubt, just remove the "delimiter" option, and this should fix things.}%
133 \else
134 \expandafter\setrefdelimiter\expandafter{\modref@delimiter}%
135 \fi
136 \newcommand\GlobalRefStyle[1]{\def\modref@@basestyle##1##2{#1}}
137 \newcommand\GlobalVarRefStyle[1]{\def\modref@@varbasestyle##1##2{#1}}
138 \@onlypreamble\GlobalRefStyle
139 \@onlypreamble\GlobalVarRefStyle
140 \def\modref@basestyle#1#2#3{\modref@@basestyle{#1{#2}}{#3}}%
141 \def\modref@varbasestyle#1#2#3{\modref@@varbasestyle{#1{#2}}{#3}}%
142 \GlobalRefStyle{#1}%
143 \GlobalVarRefStyle{#1}%
144 \edef\reserved@a{refstyle}%
145 \@ifundefined\reserved@a{%
146 \newcommand\refstyle[2]{%
147 \expandafter\def\csname @modref@#1\endcsname##1{#2}}%
148 }{%
149 \modref@error{%
150 Command \string\refstyle\ defined already; refer to the help message.
151 }{%
152 The "modref" package defines the command \string\refstyle; however,
153 in this instance, \string\refstyle\ already had a meaning when "modref"
154 started running. Please determine what is defining \string\refstyle, and
155 whether you need it.}}
156 \newcommand\eqrefstyle[1]{%
157 \def\eqref##1{%
158 \maketag@@@{%
159 \expandafter\@setref\csname r@##1\endcsname{%
160 \modref@trivbasestyle\expandafter\modref@eqref}{##1}}}%
161 \def\modref@eqref##1{#1}}%
162 \def\modref@trivbasestyle#1#2#3{#1{#2}}
163 \newcommand\displaytagstyle[1]{%
164 \def\modref@tagstyle##1{#1}%
165 \def\tagform@##1{\maketag@@@{\modref@tagstyle{##1}}}%
166 \@ifundefined{modref@eqref}{%
167 \eqrefstyle{\textup{(\ignorespaces#1\unskip\@@italiccorr)}}%
168 }\relax
169 }%
170 \makeatother
171 \endinput
172 %%
173 %% End of file `modref.drv'.