summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-12-03 23:36:43 +0000
committerKarl Berry <karl@freefriends.org>2011-12-03 23:36:43 +0000
commit588d746c4db3a95ed8ec234bf392c8ca7061fc3e (patch)
treedd0f18d1e6f381bf37290dc41c7012e88f13bf1e /Master/texmf-dist/tex/latex
parentf884cf55d378c5815215caa25f5fb7ff1d8f83cd (diff)
nag (3dec11)
git-svn-id: svn://tug.org/texlive/trunk@24741 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r--Master/texmf-dist/tex/latex/nag/nag-experimental.cfg50
-rw-r--r--Master/texmf-dist/tex/latex/nag/nag.sty61
2 files changed, 110 insertions, 1 deletions
diff --git a/Master/texmf-dist/tex/latex/nag/nag-experimental.cfg b/Master/texmf-dist/tex/latex/nag/nag-experimental.cfg
index 330b792be6b..e65c4800cd6 100644
--- a/Master/texmf-dist/tex/latex/nag/nag-experimental.cfg
+++ b/Master/texmf-dist/tex/latex/nag/nag-experimental.cfg
@@ -21,6 +21,56 @@
%%
\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
diff --git a/Master/texmf-dist/tex/latex/nag/nag.sty b/Master/texmf-dist/tex/latex/nag/nag.sty
index a627c9b0292..188f57cb964 100644
--- a/Master/texmf-dist/tex/latex/nag/nag.sty
+++ b/Master/texmf-dist/tex/latex/nag/nag.sty
@@ -20,7 +20,7 @@
%% http://www.latex-project.org/lppl.txt
%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{nag}[2010/05/17 0.622 warning about old commands (ulmi)]
+\ProvidesPackage{nag}[2011/11/25 0.7 warning about old commands (ulmi)]
\let\@xa\expandafter
\let\@nx\noexpand
\newcounter{nag@c}
@@ -73,6 +73,12 @@
\addtocounter{nag@sins}{1}%
\PackageWarningNoLine{nag}%
}
+\providecommand\PackageInfoNoLine[2]{%
+ \PackageInfo{#1}{#2\@gobble}%
+}
+\DeclareRobustCommand\nag@suggestNoLine[1]{%
+ \PackageInfoNoLine{nag}{#1}%
+}
\newcommand\ObsoleteCS[3][obsolete]{%
\AtBeginDocument{%
\nag@prepend{#2}{%
@@ -124,6 +130,27 @@ Use #3 instead}%
}{}%
}%
}
+\newcommand\SuggestedPackage[2][might be useful to you]{%
+ \AtEndDocument{%
+ \nag@ifcsname{ver@#2.sty}{%
+ % Attaboy!
+ }{%
+ \nag@suggestNoLine{%
+ Not loaded: Package #2 #1}%
+ }%
+ }%
+}%
+\newcommand\IncompatiblePackages[4][are incompatible]{%
+ \AtEndDocument{%
+ \nag@ifcsname{ver@#2.sty}{%
+ \nag@ifcsname{ver@#3.sty}{%
+ \nag@warnNoLine{%
+ Packages #2 and #3 #1.\MessageBreak
+ #4}%
+ }{}%
+ }{}
+ }%
+}%
\newcommand\ObsoleteClass[3][obsolete]{%
\AtEndDocument{%
\nag@ifcsname{ver@#2.cls}{%
@@ -133,6 +160,38 @@ Use #3 instead}%
}{}%
}%
}
+\def\nag@quark{\nag@quark}
+\ifx\@listfiles\@undefined
+ % emulate a silent listfiles
+ \def\@listfiles#1\@@{}%
+\fi
+\newcommand\BadFileLoadOrder[3][This might cause problems]{%
+ \AtEndDocument{%
+ \nag@ifLoadOrder{#2}{#3}{%
+ \nag@warnNoLine{%
+ `#3' loaded after `#2'.\MessageBreak
+ #1}%
+ }%
+ }%
+}
+\def\nag@ifLoadOrder#1#2{%
+ \def\nag@tmporder@a ##1#1##2\relax{%
+ \ifx\nag@quark##2\nag@quark
+ \noexpand\@gobble
+ \else
+ \nag@tmporder@b ##2,#2\relax
+ \fi
+ }%
+ \def\nag@tmporder@b ##1#2##2\relax{%
+ \ifx\nag@quark##2\nag@quark
+ \noexpand\@gobble
+ \else
+ \noexpand\@firstofone
+ \fi
+ }%
+ \@xa\protected@edef\@xa\nag@tmporder\@xa{\@xa\nag@tmporder@a\@filelist,,#1\relax}%
+ \nag@tmporder
+}
\newif\ifnag@haslabel
\newif\ifnag@hascaption\nag@hascaptiontrue
\newcommand\nag@hackfloat[1]{%