summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/nag/nag-experimental.cfg
blob: e65c4800cd690d099fff1153da0e46c40a8c8108 (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
%%
%% This is file `nag-experimental.cfg',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% nag.dtx  (with options: `experimentalnag')
%% 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-experimental.cfg}
             [2009/07/04 v0.62alpha2 experimental additions to nag (ulmi)]
\long\def\nag@protected@dontwrite#1#2#3%
  {\write\m@ne{}%
   \def\nag@line{#3}%
   \@onelevel@sanitize\nag@line
   \PackageInfo{nag}{%
    \string\nofiles\space in effect.
    Did not write line \MessageBreak
    `\nag@line'
   }%
   \if@nobreak\ifvmode\nobreak\fi\fi}%

\if@filesw
  \def\nofiles{%
    \@fileswfalse
    \typeout{No auxiliary output files.^^J}%
    \global\let\protected@write=\nag@protected@dontwrite
    \let\makeindex\relax
    \let\makeglossary\relax}
\else
  % already \nofiles.
  \global\let\protected@write=\nag@protected@dontwrite
\fi
\gdef\ch@ck#1#2#3{%
  \ifnum\count1#1<#2\else
    \errhelp{%
      eTeX has more counters, dimens, etc., maybe
      that will help.
    }
    \errmessage{No room for a new #3}%
\fi}
\def\@testdef #1#2#3{%
  \def\reserved@a{#3}%
  \expandafter \ifx \csname #1@#2\endcsname\reserved@a
  \else
    \@tempswatrue
    \begingroup
    \@onelevel@sanitize\reserved@a
    \expandafter\let\expandafter\nag@tmpb\csname #1@#2\endcsname
    \ifx\nag@tmpb\relax
      \let\nag@tmpb\@empty
    \else
      \@onelevel@sanitize\nag@tmpb
    \fi
    \PackageInfo{nag}{%
      Label `#2' appears to have changed from\MessageBreak
      `\nag@tmpb'\MessageBreak
      to `\reserved@a'
    }%
    \endgroup
  \fi}
\let\@xa\expandafter
\newif\ifnag@dofloatsizecheck
\newif\ifnag@allfloatpositionsfailed
\newcommand\nag@allfloatsizechecks{}%
\newcommand\nag@onefloatsizecheck[2]{%
  % #1 is size fraction of textheight,
  % #2 is position to say in warning.
  \ifdim \ht\@currbox>#1\textheight
    \@tempdima -#1\textheight
    \advance \@tempdima \ht\@currbox
    \PackageInfo{nag}{Float too large for #2 by \the\@tempdima}%
    % note we do not truncate.
    % also, it's too late to add "p" now.
  \else
    \nag@allfloatpositionsfailedfalse
  \fi
}
\renewcommand\@largefloatcheck{%
  \ifdim \ht\@currbox>\textheight
    \@tempdima -\textheight
    \advance \@tempdima \ht\@currbox
    \@latex@warning {Float too large for page by \the\@tempdima}%
    \ht\@currbox \textheight
  \fi
  %% the preceding is the original check.
  \nag@dofloatsizechecktrue
  \nag@allfloatpositionsfailedtrue
  \def\nag@allfloatsizechecks{}%
  \@xa\@xa\@xa\@tfor\@xa\@xa\@xa\nag@fltsz@tmp\@xa\@xa\@xa:\@xa\@xa\@xa=\csname @fps\endcsname\do{%
    \ifx\nag@fltsz@tmp\relax
      \nag@dofloatsizecheckfalse
    \fi
    \if\nag@fltsz@tmp !
      \nag@dofloatsizecheckfalse
    \else
      \if\nag@fltsz@tmp t
        \g@addto@macro\nag@allfloatsizechecks
          {\nag@onefloatsizecheck{\topfraction}{top of page}}%
      \else
        \if\nag@fltsz@tmp b
          \g@addto@macro\nag@allfloatsizechecks
            {\nag@onefloatsizecheck{\bottomfraction}{bottom of page}}%
        \else
          \if\nag@fltsz@tmp p
            \nag@allfloatpositionsfailedfalse
          \fi
        \fi
      \fi
    \fi
  }%
  \ifnag@dofloatsizecheck
    \nag@allfloatsizechecks
    \ifnag@allfloatpositionsfailed
      \nag@warn{All float specifiers `\@fps' won't work}%
    \fi
  \fi
}%
\def\@input#1{%
  \IfFileExists{#1}{\@@input\@filef@und}{%
  \typeout{No file #1.}
  \@latex@warning{File `#1' not found}
  %{The file `#1' was requested but not found }
  \protected@edef\nag@nofile{File `#1' requested, but not found}%
  \@xa\AtEndDocument\@xa{%
    \@xa\@latex@info@no@line\@xa{%
      \nag@nofile
    }%
  }%
}}%
\def\@input@#1{\InputIfFileExists{#1}{}{%
  \typeout{No file #1.}
  \@latex@warning{File `#1' not found}
  {The file `#1' was requested but not found }
  \edef\nag@nofile{File `#1' requested, but not found}%
  \@xa\AtEndDocument\@xa{%
    \@xa\@latex@info@no@line\@xa{%
      \nag@nofile
    }%
  }%
}}%
%%X Local Variables:
%%X mode: latex
%%X End:
\endinput
%%
%% End of file `nag-experimental.cfg'.