summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/nag/nagdemo.tex
blob: afb54fca74411bbfaedb8d7352cf4343f82cff46 (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
%%
%% This is file `nagdemo.tex',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% nag.dtx  (with options: `nagdemo')
%% 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@users.sarovar.org
%% 
%% Copyright (C) 2005, 2006 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
%% 
%% Test document: finding and complaining about obsolete macros.
%%
\RequirePackage[l2tabu, orthodox]{nag}
\documentclass{article}
%% some usual culprits
\usepackage{times, a4wide, epsfig, palatino}
\begin{document}
\typeout{Next: it and bf complaints}
{\it f{\bf oo}f}highter

\typeout{Next: not-an-env complaints}
\begin{Large}
  \begin{sffamily}
    Foo!
  \end{sffamily}
\end{Large}

\typeout{Next: center in float complaint}
\begin{figure}
  \begin{center}
    Foo.
  \end{center}
  \caption{\label{fig}Higher!}
\end{figure}

\typeout{Next: no complaints: manually fake caption}
\begin{figure}
    Foo.
\makeatletter\nag@hascaptiontrue\makeatother
  \label{date}
\end{figure}

\typeout{Next: put-label-after-caption complaint}
\begin{figure}
    Foo.
  \label{coconut}\caption{Bar.}
\end{figure}

\typeout{Next: no-caption complaint}
\begin{figure}
    Foo.
\end{figure}

\typeout{Next: appendix complaints}
\begin{appendix}
  \begin{center}
    Foo.
  \end{center}
\typeout{Next: no over complaint, centerline complaint, no frac complaint}
  \centerline{Ferner gilt $4\over 2=2$.}
  $\frac 42$
\end{appendix}
\typeout{Next: unmatched endflushright}
\endflushright
\typeout{Next: unclosed center}
{\center Smack in the middle!}
\typeout{Next: mismatched endflushright}
\endflushright

\typeout{You should get 17 warnings.}
\end{document}
%%X Local Variables:
%%X mode: latex
%%X End:
\endinput
%%
%% End of file `nagdemo.tex'.