1 % Regression test file for latex.tex
3 % this file will produce some errors in the tables because of the
4 % setting of tracingfonts=3. Those can be ignored. It will also
5 % produce errors whenever array etc. is updated.
10 % test files for latex.tex testing bugs:
32 \FORMAT{LaTeX2e<1994/01/24>}
38 \documentclass{article}
43 \setlength{\textheight}{.5\textheight}
47 \setcounter{errorcontextlines}{-1}
49 \newif\ifA \Afalse % needed for test 246
51 % 176. \maketitle or other commands that internally invoke a list
52 % environment would not be detected before \begin{document}. (Corrected
53 % 26 Aug 91.) NOTE: THIS CHANGE AFFECTS ALL STYLES AND STYLE OPTIONS
54 % THAT CHANGE THE \begin{document} COMMAND! IT IS NECESSARY TO ADD
59 \title{\LaTeX{} bug fix test}
66 % 174. Extra blank space between the second and third mandatory argument
67 % of \newenvironment and \renewenvironment would lead to an
68 % unintelligible error message. (Long known. Change made 26 Aug 91.)
71 \newenvironment{messy}
76 % 205. Use of a nonexisting theorem environment in the first optional
77 % argument to \newtheorem led to an incomprehensible error message.
78 % (Reported by Luzia Dietsche. Fixed 10 Jan 92.)
80 % bug (205) this is not a fix but a bug!
82 \newtheorem{foo}[xyzbar]{FOO}
83 \newtheorem{xyzbar}{BAR}
89 % 200. Corrected an obscure bug in the output routine that could cause a
90 % division by zero when \twocolumn[] was used. (Suggested by Chris
91 % Rowley. Corrected 22 Nov 91.)
93 % bug (200) not sure if this really tests 200!
97 % 181. \protect'ed the \LaTeX and \SLiTeX logos, as a consequence of
98 % change 178. (Change made 17 Oct 91.)
100 % 177. Moved the \SLiTeX logo to latex.tex so that it can be used in
101 % LaTeX as well. (Change made 29 Sep 91.)
105 \section{A \LaTeX{} logo}
106 \subsection{A \SliTeX{} logo}
116 jo, \begin{messy} jo \end{messy} jo
118 % 199. Changed definition of \item to call \makelabel only once instead
119 % of twice. This solves a number of problems with side effects in
120 % \makelabel, and is even more efficient. (Change made 22 Nov 91.)
125 \item[\stepcounter{enumi}\theenumi.]
126 should start with 1 not 2!
131 % 195. \cite will now ignore leading blanks in a citation key. (Change
134 % bug (195) not fully corrected so far!
136 \cite{ abc} and \cite{abc, abc}
140 % 163. When a double-column figure or table that is too large to fit on
141 % a page is encountered when producing two-column output, that figure and
142 % all subsequent ones are never printed. (Reported 13 Mar 91 by David
143 % Long. Corrected 15 Mar 91.)
145 % 194. Added warning message when height of single column float exceeds
146 % \textheight. (Change made 6 Nov 91.)
151 \framebox[\linewidth]{%
152 \parbox{\textwidth}{\vspace{1.2\textheight}}}
162 % 170. A \samepage declaration would not prevent a verbatim environment
163 % from being broken across pages. (Corrected 27 Jul 91.)
195 % 193. Added a lot of missing \m@th (mathsurround=0pt) assignments.
196 % (Changes made 4 Nov 91.)
199 % not tested \@dottedtocline
202 % 226. In the frame command, the generated box was higher than the box
203 % it encloses. (Discovered by Eric Schenk. Corrected 24 Aug 92.)
208 \setlength{\mathsurround}{27pt}
211 \frame{\parbox{1cm}{A}}
212 \frame{\begin{minipage}{1cm}B\end{minipage}}
214 E \begin{tabular}{|c|}D\end{tabular} E % shows ignore bug!
216 F\begin{array}{|r|}G\end{array}H
221 \scrollmode % who added \errorstopmode into \showoutput?
227 % 191. Added default definition of \makelabel, so that an \item command
228 % outside a list environment gives a sensible error message instead of
229 % messing up the whole job. (Change made 4 Nov 91.)
235 % 190. Fragile commands in the definition of \thefootnote led to an
236 % error, even with the use of \protect. (Found by Chris Hamlin.
237 % Corrected 1 Nov 91.)
241 \renewcommand{\thefootnote}{\protect\framebox{\arabic{footnote}}}
242 \renewcommand{\thempfootnote}{\protect\framebox{\arabic{footnote}}}
248 \begin{minipage}{2cm}
252 % 184. Added \reset@font in \ref, \pageref, and \@citex. (Suggested by
253 % Bernd Raichle. Change made 25 Oct 91.)
255 % bug (184) only NFSS
257 {\sc A \ref{notfound} to \pageref{notfound} in \cite{notfound}.}
260 % 179. Changed \output to reset \par to its default value. This avoids
261 % problems when the output routine is called within a list where \par
262 % may be a no-op. (Reported by Eberhard Mattes. Fix suggested by Chris
263 % Rowley. Change made 29 Sep 91.)
268 {\renewcommand{\footnoterule}{\rule{6cm}{0.1mm}}
269 \begin{minipage}{13cm}
270 \vspace{6\baselineskip}
273 \footnote{\vspace{4\baselineskip}}
274 \vspace{5\baselineskip}
283 \begin{thebibliography}{ABCDEFG}
284 \bibitem{abc} the entry abc
286 % 206. As a consequence of change 66 in the styles (see below) labels in
287 % the bibliography environment would now come out left aligned.
288 % (Reported by Andy Fyfe. Corrected 14 Jan 92.)
292 \bibitem[ABC]{x1} check align
293 \bibitem[ABCDE]{x2} check align
294 \end{thebibliography}
296 % 221. The baseline of a bottom aligned minipage is 0pt, except if a
297 % footnote is present. (Reported by Wolfgang Kaspar. Fixed 14 Aug 92.)
299 \begin{minipage}[b]{5cm}
300 bla bla bla bla bla bla bla bla bla bla
301 bla bla bla bla bla bla bla bla bla bla
302 bla bla bla bla bla bla bla bla bla bla
303 bla bla bla bla bla bla bla bla bla bla
305 \begin{minipage}[b]{5cm}
306 bla bla bla bla bla bla bla bla bla bla
307 bla bla bla bla bla bla bla bla bla bla\footnote{alb}
308 bla bla bla bla bla bla bla bla bla bla
309 bla bla bla bla bla bla bla bla bla bla
314 \scrollmode % who added \errorstopmode into \showoutput?
319 % 229. An \item in math mode will produce the famous ``Perhaps a missing
320 % \item error''. (Reported by Paul Taylor. Added a warning message 18
329 % 236. A \framebox in a picture environment that contains text with
330 % descenders comes out too deep. (Reported by Andrew Kurn. Corrected 21
333 \setlength{\unitlength}{1in}
336 \framebox(1,1)[b]{Text with descenders: gggg}
342 \scrollmode % who added \errorstopmode into \showoutput?
348 % 238. Nesting of \include causes strange effects. (Reported by Chris
349 % Thompson. Check added 05 Aug 93.)
354 % 239. Multiply defined labels are reported only at the begin of a run,
355 % but cause the warning about labels having changed top be printed. This
356 % is not a bug, but an unfortunate behaviour that is easily
357 % misunderstood. Added code to print an appropriate message at the end
358 % of the run. (Change made 05 Aug 93.)
364 % 240. \protect didn't work correctly in the command for printing the
365 % number in a section heading (e.g. \thesection). (Reported by several
366 % people. Corrected 05 Aug 93.)
368 \renewcommand{\thesection}{$\protect\sqrt{\roman{section}}$}
370 \section{Square root}
372 % 241. \dotfill and \hrulefill did not behave properly in vertical
373 % mode. (Reported by Elmar David. Corrected 05 Aug 93.)
377 The square root is a square root.
380 The square root is a square root.
383 % 242. A negative length argument to \line or \vector causes very
384 % strange results. Added a check for that case. (Reported by Chris
385 % Rowley. Change made 05 Aug 92.)
387 \setlength{\unitlength}{1mm}
389 \begin{picture}(50,50)
390 \put(10,10){\line(1,1){-10}}
391 \put(10,10){\vector(-1,1){-10}}
392 \put(10,10){\line(1,1){+10}}
393 \put(10,10){\vector(-1,1){+10}}
397 % 243. \circle in math mode causes a strange glyph to appear. (Reported
398 % by Paul Taylor. Added error message 05 Aug 93.)
401 $\circle{2} \line(1,1){10}$
406 \scrollmode % who added \errorstopmode into \showoutput?
412 % 246. \global assignments in the .aux file would lead to an error.
413 % (Change made 31 Aug 93.)
416 \immediate\write\csname @auxout\endcsname{\noexpand\global\noexpand\Atrue}
419 % 247. Added protection against active characters in output routine.
420 % (Proposed by Chris Rowley. Change made 06 Sep 93.)
424 \obeylines\obeyspaces%
425 \markboth{test1\protect test2\ test3
426 test4}{test1\protect test2\ test3
430 \pagestyle{myheadings}
432 test test test test test test test test test test test test test test
433 test test test test test test test test test test test test test test
434 test test test test test test test test test test test test test test
435 test test test test test test test test test test test test test test
436 test test test test test test test test test test test test test test
437 test test test test test test test test test test test test test test
438 test test test test test test test test test test test test test test
439 test test test test test test test test test test test test test test
440 test test test test test test test test test test test test test test
441 test test test test test test test test test test test test test test
442 test test test test test test test test test test test test test test
446 test test test test test test test test test test test test test test
447 test test test test test test test test test test test test test test
448 test test test test test test test test test test test test test test
449 test test test test test test test test test test test test test test
450 test test test test test test test test test test test test test test
451 test test test test test test test test test test test test test test
452 test test test test test test test test test test test test test test
453 test test test test test test test test test test test test test test
454 test test test test test test test test test test test test test test
455 test test test test test test test test test test test test test test
456 test test test test test test test test test test test test test test
465 % 249. An invalid use of \verb can send LaTeX into a state where
466 % commands are no longer recognized. This can only be solved partially,
467 % but better error messages have been added. (Change made 19 Sep 93.)
476 % 250. Control characters in the input would produce unexpected
477 % characters in the printed output. Corrected by making these characters
478 % produce a suitable error message. (Change made 19 Sep 93.)
481 ^^A^^B^^C^^D^^E^^F^^G^^H^^I^^J^^K
483 ^^N^^O^^P^^Q^^R^^S^^T^^U^^V^^W^^X^^Y^^Z
487 % 251. An empty verbatim environment would generate the error message
488 % ``Something's wrong, perhaps a missing item.'' (Change made 19 Sep 93.)
494 % 252. The word `plus' immediately after a \centering command leads to
495 % an error. (Reported by Piet van Oostrum. Corrected 27 Oct 93 by
496 % replacing many \z@ by \z@skip, as suggested by Donald Arseneau.)
499 {\centering Plus an immediate extra throughput of $200$~Mittlebach per
500 second that can be further increased by application of the so-called
501 ``stand up and deliver'' technique.}
503 {\raggedleft Minus the time it takes to write the documentation, quaff
504 the milk, eat the cake\footnote{Quaffing is like drinking, but you
505 spill more\protect\cite{Pratchett:Weird-Sisters}.}
507 % 253. Putting more than two & per row in an eqnarray environment sends
508 % LaTeX into a strange state without obvious escape. Changed this so
509 % that a sensible error message appears. (Reported by Paul Taylor.
510 % Change made 27 Oct 93.)
513 %%%% Notice that the fourth column has been used.
520 % 220. \ref is a fragile command (as documented). However, it is easy
521 % to make it and \pageref robust. (Change made 14 Aug 92.)
523 \section{Figure \ref{fig} on page \pageref{fig}.}
524 \addcontentsline{lof}{section}{Figure \ref{fig} on page \pageref{fig}.}
529 % 207. A \tableoffigures at the end of the document would sometimes not
530 % typeset the table. (Reported by Friedrich Haubensak. Corrected 14 Jan
533 % bug (207) I hope I got it right: