summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/nag/nag-l2tabu.cfg
blob: 7d1a632ce859239384ea76b48fc9067e795f8753 (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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
%%
%% This is file `nag-l2tabu.cfg',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% nag.dtx  (with options: `l2tabunag')
%% This is a generated file.
%% 
%% This file is part of the `nag' package.
%% The `nag' package has the LPPL maintenance status: maintained.
%% Current Maintainer is Ulrich M. Schwarz, ulmi@absatzen.de
%% 
%% Copyright (C) 2005-8 by Ulrich M. Schwarz.
%% 
%% This file may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
%% version 1.3a of this license or (at your option) any later
%% version. The latest version of this license is in:
%% http://www.latex-project.org/lppl.txt
%% 
\ProvidesFile{nag-l2tabu.cfg}
             [2008/01/27 v2.1alpha1 l2tabu rules for nag.sty (ulmi)]
%%
%% The sins.
%%
%% Section numbers refer to l2tabuen 1.7 revised/enlarged dated 2004OCT24
%% \S 1.1
\ObsoletePackage{a4wide}{the \lq a4paper\rq\space class option}
\ObsoletePackage{a4}{the \lq a4paper\rq\space class option}
%% \S 1.2--1.5 cannot reasonably be checked programmatically
%% \S 1.6
\def\nag@doubledollar{$$}%$$
\def\nag@singledollar{$}%$
\def\nag@expanding@voodoo#1#2#3{\relax\relax\nag@singledollar}

\def\nag@maybedispmath{%
  \texorpdfstring{%
    %% in TeX context, do tricky stuff.
    \ifinner\expandafter\@firstoftwo
    \else\expandafter\@secondoftwo\fi
    {%% in inner mode, $$ is an empty formula, so no testing wanted.
      \nag@singledollar}%
    {%%
      \ifx\protect\@typeset@protect\expandafter\@firstoftwo
      \else\expandafter\@secondoftwo\fi
      {%% normal case: looks like typesetting
        %% protect against strictly expanding context
        %% like TeX' \message: the first expanding voodoo will expand,
        %% removing the rest, inserting \relax\relax$ instead. This is
        %% not totally transparent, but \let\relax\relax is as close
        %% to a no-op as we can get.
        \let\nag@expanding@voodoo\nag@expanding@voodoo
        \protect\nag@maybe@dispmath}%
      {%% some other case, hide ourselves
        \nag@singledollar}%
    }%
  }{%
    %% in pdf context, just be a math shift. This creates the "math
    %% shift not allowed" warnings we all love.
    \nag@singledollar
  }%
}
\AtBeginDocument{\providecommand\texorpdfstring{\@firstoftwo}}
\AtBeginDocument{\catcode`$\active}%$
\bgroup
  \catcode`$\active%$
  \gdef\nag@maybe@dispmath{%
    \bgroup
    \let\@sptoken\nag@quark% prevent skipping of spaces
    \@ifnextchar${%$%
      \ifmmode
      % we already warned upon entering.
      \else
      \nag@warn{%
        \nag@doubledollar...\nag@doubledollar\space is obsolete.\MessageBreak
        Use \string\[...\string\] et al. instead}%
      \fi
      \egroup\expandafter\nag@doubledollar\@gobble
    }{%
     \egroup\nag@singledollar
    }%
  }
  % we do the assignment here, which means any package that redefines
  % \$ as well will silently disable us. This is a feature.
  \global\let$\nag@maybedispmath%$
\egroup
%% new in 2.1alpha1: more compat testing. Version control keywords are dollar-delimited.
%% all five implementations get it wrong.
\AtBeginDocument{%
  \@ifpackageloaded{rcs}{%
    % this redefinition is functionally equivalent,
    % but does not share actual code.
    \renewcommand\RCS{\bgroup%
      \catcode`\_ =\active
      \catcode`\$=3 % this line added for compatibility.
      \csname RCS_get_argument\endcsname
    }
    \PackageInfo{nag}{rcs.sty hack applied}%
  }{}%
  \@ifpackageloaded{svninfo}{%
    \g@addto@macro\@svnBeginRead{\catcode`\$ 3 }%
    \PackageInfo{nag}{svninfo.sty hack applied}%
  }{}%
  \@ifpackageloaded{svn}{%
    \PackageInfo{nag}{svn.sty is broken: disabling dollar check}%
    \catcode`\$ 3
  }{}%
  \@ifpackageloaded{rcsinfo}{%
    \PackageInfo{nag}{rcsinfo.sty is broken: disabling dollar check}%
    \catcode`\$ 3
  }{}%
  \@ifpackageloaded{pgf}{%
    \PackageInfo{nag}{pgf.sty is broken: disabling dollar check}%
    \catcode`\$ 3
  }{}%
}

%% \S 1.7 cannot reasonably be checked programmatically
%% \S 1.8 \sloppy is called by parbox, among others, and would
%% give many spurious warnings.
%% \S 2.1.1
\ObsoleteCS[an old LaTeX 2.09 command]{bf}
           {\protect\bfseries\space or \protect\textbf}
\ObsoleteCS[an old LaTeX 2.09 command]{it}
           {\protect\itshape\space or \protect\textit}
\ObsoleteCS[an old LaTeX 2.09 command]{rm}
           {\protect\rmfamily\space or \protect\textrm}
\ObsoleteCS[an old LaTeX 2.09 command]{sc}
           {\protect\scshape\space or \protect\textsc}
\ObsoleteCS[an old LaTeX 2.09 command]{sf}
           {\protect\sffamily\space or \protect\textsf}
\ObsoleteCS[an old LaTeX 2.09 command]{sl}
           {\protect\slshape\space or \protect\textsl}
\ObsoleteCS[an old LaTeX 2.09 command]{tt}
           {\protect\ttfamily\space or \protect\texttt}
\ObsoleteCS[an old LaTeX 2.09 command]{cal}
           {\protect\mathcal}% Hmm, this is not in l2tabu?
%% \S 2.1.2
%% Gone with 1.8 because this never worked for the kernel \frac anyway.
%% \ObsoleteCS[TeX]{over}{\protect\frac}
%% \ObsoleteCS[TeX]{choose}{\protect\frac\space or amsmath's \protect\binom}
%% \S 2.1.3
\ObsoleteCS[TeX]{centerline}{\protect\centering\space or center environment}
%% \S 2.2.1
\ObsoleteClass{scrlettr}{the scrlttr2 package}
%% \S 2.2.2
\ObsoletePackage{epsf}{the graphicx package}
\ObsoletePackage{psfig}{the graphicx package}
\ObsoletePackage[deprecated]{epsfig}{the graphicx package directly}
%% \S 2.2.3
\ObsoletePackage{doublespace}{the setspace package}
%% \S 2.2.4
\ObsoletePackage{fancyheadings}{the fancyhdr or scrpage2 packages}
\ObsoletePackage{scrpage}{the scrpage2 package}
%% \S 2.2.5
\ObsoletePackage{isolatin}{the inputenc package with option latin1}
\ObsoletePackage{umlaut}{the inputenc package with suitable option
  (latin1, utf8 ...)}
\ObsoletePackage{isolatin1}{the inputenc package with option latin1}
%% \S 2.2.6
\ObsoletePackage{t1enc}{the fontenc package with option T1}
%% \S 2.2.7 we don't check for bst yet.
%% (This is in l2tabu 1.8)
\ObsoletePackage{caption2}{the caption package v3.0 or later}
%% \S 2.3.1-3
\ObsoletePackage{times}
                {the mathptmx, helvet (option scaled=.9), courier packages}
\ObsoletePackage{pslatex}
                {the mathptmx, helvet (option scaled=.9), courier packages}
\ObsoletePackage{mathptm}
                {the mathptmx package}
%% \S 2.3.4-5
\ObsoletePackage{palatino}
                {the mathpazo, helvet (option scaled=.95), courier packages}
\ObsoletePackage{mathpple}{the mathpazo package}
%% \S 2.3.6 can't be checked
%% \S 2.3.7
\ObsoletePackage{euler}{the eulervm package}
\ObsoletePackage{utopia}{the fourier package}
%% \S 3.1
\NagDeclareFloat{figure}\NagDeclareFloat{table}%
\g@addto@macro\nag@labels{,label}%
\nag@prepend{endcenter}{%
  \ifx\@captype\@undefined\else
    \nag@warn{\lq center\rq\space environment in \@captype.\MessageBreak
      Maybe you want \protect\centering\space instead}%
  \fi
}%
%% The latter two are used by KOMA-Script, the last by hypcap.
\g@addto@macro\nag@captions{,caption,captionabove,captionbelow,hc@caption,topcaption}%

%% \S 3.2
\NotAnEnvironment{appendix}%
%% In the same vein:
\@for\sectioning:=frontmatter,mainmatter,backmatter\do{%
  \expandafter\NotAnEnvironment\expandafter{\sectioning}%
}
%% \S 3.3
%% It's more trouble than it's worth to have another warning for
%% align*, since it passes through align.
\ObsoleteEnv{eqnarray}{amsmath's align}
%% \S 3.4 -- nothing to be done --
%%X Local Variables:
%%X mode: latex
%%X End:
\endinput
%%
%% End of file `nag-l2tabu.cfg'.