summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/modref/modref.drv
blob: 8be728f3fa612fb5d7442432d6db156a1c4b2d8d (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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
%%
%% This is file `modref.drv',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% modref.dtx  (with options: `driver')
%% 
%% IMPORTANT NOTICE:
%% 
%% For the copyright see the source file.
%% 
%% Any modified versions of this file must be renamed
%% with new filenames distinct from modref.drv.
%% 
%% For distribution of the original source see the terms
%% for copying and modification in the file modref.dtx.
%% 
%% This generated file may be distributed as long as the
%% original source files, as listed above, are part of the
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
%% =============================================================================================
%% \CharacterTable
%%  {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
%%   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
%%   Digits        \0\1\2\3\4\5\6\7\8\9
%%   Exclamation   \!     Double quote  \"     Hash (number) \#
%%   Dollar        \$     Percent       \%     Ampersand     \&
%%   Acute accent  \'     Left paren    \(     Right paren   \)
%%   Asterisk      \*     Plus          \+     Comma         \,
%%   Minus         \-     Point         \.     Solidus       \/
%%   Colon         \:     Semicolon     \;     Less than     \<
%%   Equals        \=     Greater than  \>     Question mark \?
%%   Commercial at \@     Left bracket  \[     Backslash     \\
%%   Right bracket \]     Circumflex    \^     Underscore    \_
%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%%   Right brace   \}     Tilde         \~}
%%
%% Package `modref' to use with LaTeX 2e
%% Copyright (C) 2007 J. Niel de Beaudrap, all rights reserved.
\documentclass[draft]{ltxdoc}
\usepackage[left=4.5cm,right=3cm,top=3cm,bottom=3cm]{geometry}
\usepackage{amsmath,amsthm}
\usepackage{modref}
\setlength\hfuzz{15pt}  % dont make so many
\hbadness=7000          % over and under full box warnings

\refstyle{itemNo}{[Item~\##1]}
\refstyle{numero}{\texttt{\itshape numero~#1}}
\refstyle{def}{Definition~#1}
\refstyle{lemma}{Lemma~#1}
\refstyle{thm}{Theorem~#1}
\refstyle{fig}{Figure~#1}
\refstyle{eqn}{Eqn.~#1}
\eqrefstyle{\textbf{(#1)}}
\displaytagstyle{{\Large$\bigcirc\mspace{-12mu}$}#1}
\stepcounter{equation}

\makeatletter
\newenvironment{headerlist}{%
\setlength\topsep{\baselineskip}%
\setlength\parsep{1.3em}%
\setlength\parskip{1.3em}%
\setlength\listparindent{0ex}%
\def\next@item[##1]{%
\def\item{\egroup\next@item}
\@inmatherr\item
\bgroup
\addtolength\leftskip{2.5em}%
   \par\noindent\hspace{-2.5em}\mbox{\headerliststyle{##1}}~\\[1ex]%
\setlength\parindent{0ex}%
\setlength\parskip{1ex}%
\ignorespaces}
\let\item\next@item
}{%
\par\egroup\leavevmode\noindent\ignorespaces
}
\newcommand\headerliststyle[1]{\texttt{\mdseries\upshape #1}}
\makeatother

\newcommand\ie{\textit{i.e.}}
\newcommand\eg{\textit{e.g.}}
\newcommand\etc{\textit{etc.}}

\begin{document}
\DocInput{modref.dtx}
\end{document}
%% Main text:
\newcommand\modref@error{\PackageError{modref}}
\edef\reserved@a{Ref}%
\@ifundefined\reserved@a{%
   \let\Ref\ref
}{%
   \modref@error{%
     Command \string\Ref\ defined already; refer to the help message.%
   }{%
     The "modref" package defines the command \string\Ref\ to allow you (and
     the package) to use the original functionality of \string\ref. However, in
     this instance, \string\Ref\ already had a meaning when "modref" started
     running. Please determine what is defining \string\Ref, and whether you need
     it.}}
\def\@ifempty#1{\@xifempty#1@@..\@nil}
\long\def\@xifempty#1#2@#3#4#5\@nil{      %
  \ifx#3#4\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}
\DeclareStringOption[:]{delimiter}
\ProcessKeyvalOptions*
\newcommand\setrefdelimiter[1]{%
   \def\ref##1{\modref@ref##1#1\egroup\modref@basestyle}%
   \def\varref##1{\modref@ref##1#1\egroup\modref@varbasestyle}%
   \def\modref@ref##1#1##2\egroup##3{%
      \@ifempty{##2}{%
         \expandafter\@setref\csname r@##1\endcsname{##3\expandafter\@iden}{##1}%
      }{%
         \modref@@ref##1#1##2\egroup##3}}%
   \def\modref@@ref##1#1##2#1\egroup##3{%
      \@ifundefined{@modref@##1}{%
         \expandafter\@setref\csname r@##1#1##2\endcsname{%
            ##3\expandafter\@iden}{##1#1##2}%
      }{%
         \expandafter\def\expandafter\@tempa\expandafter{%
            \csname @modref@##1\endcsname}%
         \expandafter\@setref\csname r@##1#1##2\endcsname{%
            ##3\expandafter\@tempa}{##1#1##2}%
   }}%
}%
\ifx\modref@delimiter\@empty
   \modref@error{Option "delimiter" must be set to a non-empty value}{%
         The option "delimiter" was used, but seems to have been set to the
         empty string. I require a character, or a multi-character string, to
         delimit reference style names within cross-reference labels. If in
         doubt, just remove the "delimiter" option, and this should fix things.}%
\else
   \expandafter\setrefdelimiter\expandafter{\modref@delimiter}%
\fi
\newcommand\GlobalRefStyle[1]{\def\modref@@basestyle##1##2{#1}}
\newcommand\GlobalVarRefStyle[1]{\def\modref@@varbasestyle##1##2{#1}}
\@onlypreamble\GlobalRefStyle
\@onlypreamble\GlobalVarRefStyle
\def\modref@basestyle#1#2#3{\modref@@basestyle{#1{#2}}{#3}}%
\def\modref@varbasestyle#1#2#3{\modref@@varbasestyle{#1{#2}}{#3}}%
\GlobalRefStyle{#1}%
\GlobalVarRefStyle{#1}%
\edef\reserved@a{refstyle}%
\@ifundefined\reserved@a{%
   \newcommand\refstyle[2]{%
      \expandafter\def\csname @modref@#1\endcsname##1{#2}}%
}{%
   \modref@error{%
       Command \string\refstyle\ defined already; refer to the help message.
   }{%
       The "modref" package defines the command \string\refstyle; however,
       in this instance, \string\refstyle\ already had a meaning when "modref"
       started running. Please determine what is defining \string\refstyle, and
       whether you need it.}}
\newcommand\eqrefstyle[1]{%
   \def\eqref##1{%
      \maketag@@@{%
         \expandafter\@setref\csname r@##1\endcsname{%
            \modref@trivbasestyle\expandafter\modref@eqref}{##1}}}%
   \def\modref@eqref##1{#1}}%
\def\modref@trivbasestyle#1#2#3{#1{#2}}
\newcommand\displaytagstyle[1]{%
   \def\modref@tagstyle##1{#1}%
   \def\tagform@##1{\maketag@@@{\modref@tagstyle{##1}}}%
   \@ifundefined{modref@eqref}{%
      \eqrefstyle{\textup{(\ignorespaces#1\unskip\@@italiccorr)}}%
   }\relax
}%
\makeatother
\endinput
%%
%% End of file `modref.drv'.