]> git.lyx.org Git - lyx.git/blob - lib/chkconfig.ltx
Improve LaTeX version checking
[lyx.git] / lib / chkconfig.ltx
1 % This is chkconfig.ltx, a script which tries to autodetect and
2 %    document your LaTeX configuration.
3 % Author: Jean-Marc Lasgouttes (Jean-Marc.Lasgouttes@inria.fr)
4 % with minimal changes by Asger Alstrup (alstrup@diku.dk).
5 %
6 % This script should only be run from the configure script to update
7 % the files textclass.lst and doc/LaTeXConfig.lyx
8 %
9 % This script is in fact a complete rewrite of the original chkconfig
10 % script. Expect bugs.
11
12 %%% If you want to add new packages/document classes to be recognized,
13 %%% read the explanation that follow and jump to the section 'Actual
14 %%% inspection code' below. You do not need to understand the ugly
15 %%% LaTeX code below to help improving chkconfig.ltx :-)
16 %%%
17 %%% If you want to add the new package <name>, all you need most of
18 %%% the times is a two-steps work:
19 %%% 1- Add the command \TestPackage{<name>}. The syntax is:
20 %%%    \TestPackage[<file>]{<name>}, which  tests whether <name>.sty
21 %%%    (or <file>, if this optional parameter is provided) exists.
22 %%% 2- Add a description for <name> in doc/LaTeXConfig.lyx,
23 %%%    containing in particular a line like
24 %%%         Found: [InsetInfo]
25 %%%    where [InsetInfo] is obtained by entering in the minibuffer (Alt+X)
26 %%%    info-insert package <name>
27 %%%    This inset will automatically display a boxed "yes" or "no"
28 %%%    depending on the availability of the package.
29 %%%
30 %%% Since \TestPackage does not find font metric (tfm) files, there's an
31 %%% additional test \TestFont[<file>]{<name>} for this purpose.
32 %%%
33 %%% For document classes, things are even simpler, since you do not
34 %%% need to edit this file. Just put your layout file in some place
35 %%% where LyX can find it and add if you wish a description in
36 %%% LaTeXConfig.lyx, as described above but using
37 %%% "info-insert textclass <name>" instead of "info-insert package <name>".
38
39 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
40 %%%%%%%%%%%%%%%%%%%%%%% Initialization part (skip) %%%%%%%%%%%%%%%%%%%%%
41 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
42
43 % we do not want to stop on errors
44 \nonstopmode\makeatletter
45
46 %%% Some useful macros.
47 %   Several commands are defined to test for packages:
48 %    \AddLayout{<layout>} adds an entry for <layout> in textclass.lst
49 %    \AddVariable{<name>}{<value>} creates a new variable chk_<name>,
50 %      and gives it the value <value>.
51 %    \TestDocClass{<name>}{<command>} if layout <name> has not already
52 %      been tested for, execute <command>. Note that you will
53 %      probably not need to use this directly, since the configure
54 %      script generates the needed macro calls automatically.
55 %    \TestPackage[<file>]{<name>} tests whether <name>.sty (or <file>,
56 %      if it is provided) exists.
57 %    \TestFont[<file>]{<name>} test whether <name>.tfm (or <file>.tfm,
58 %      if provided) exists.
59 %   These three commands call \AddVariable to give value 'yes' or 'no' to
60 %   the variable chk_<name>.
61 %%%
62
63 \newcommand{\prefix}{+} % the character used by grep to filter 'good' output
64
65 \newcommand{\AddLayout}[5][\default]{
66   \def\default{#2}
67   \@ifundefined{category@#2}{%
68        \immediate\write\layouts{"#2"   "#1"   "#3"   "#4"   "#5"   ""}%
69    }{%
70        \immediate\write\layouts{"#2"   "#1"   "#3"   "#4"   "#5"   "\@nameuse{category@#2}"}%
71    }
72 }
73        
74
75 \newcommand{\AddVariable}[2]{
76   \immediate\write\vars{chk_#1='#2'}}
77
78 \newcommand{\AddPackage}[2][]{
79   \immediate\write\packages{#2 #1}}
80
81 % Tests whether an item is present
82 % Syntax: \TestItem[<file>]{<name>}{<type>}{<ext>}{<iftrue>}{<iffalse>}
83 \newif\ifexists
84
85 \newcommand{\TestItem}[6][\default]{
86   \def\default{#2}
87   \def\files{#1}
88   \message{^^J\prefix checking for #3 #2 [#1]...}
89   \let\firstelement\relax
90   \let\missingelements\empty
91   \existstrue
92   \@for\file:=\files\do{
93     \ifx\firstelement\relax
94        \edef\firstelement{\file}
95     \fi
96     \@expandtwoargs\in@{.}{\file}
97     \ifin@
98       \def\myfile{\file}
99     \else
100       \def\myfile{\file.#4}
101     \fi
102     \IfFileExists{\myfile}
103       {}
104       {
105         \existsfalse
106         \ifx\missingelements\empty
107           \edef\missingelements{\myfile}
108         \else
109           \edef\missingelements{\missingelements,\myfile}
110         \fi
111       }
112   }
113   \ifexists
114     \message{yes^^J}
115     \AddVariable{#2}{yes}
116     #5
117   \else
118     \message{no^^J}
119     \AddVariable{#2}{no}
120     #6
121   \fi}
122
123 % Tests whether an package is present in a specific version (or newer)
124 % Syntax: \TestPackageVersion{<name>}{<yyyy/mm/dd>}
125
126 \newcommand{\TestPackageVersion}[2]{
127    % The actual test only works if the package has been loaded before
128    \IfFileExists{#1.sty}{\RequirePackage{#1}}{}
129    \@TestPackageVersion{#1}{#2}
130 }
131
132 \newcommand{\@TestPackageVersion}[2]{
133   \message{^^J\prefix checking for package #1 at least as of #2...}
134   \IfFileExists{#1.sty}
135   {
136     \@ifpackagelater{#1}{#2}{\existstrue}{\existsfalse}
137   }
138   {
139     \existsfalse
140   }
141   \ifexists
142     \message{yes^^J}
143     \AddVariable{#1}{yes}
144     \AddPackage{#1-#2}
145   \else
146     \message{no^^J}
147     \AddVariable{#1}{no}
148   \fi}
149
150
151 % Adapted from ltxcheck.tex
152 \newcommand{\TestFont}[2][\default]{
153   \def\default{#2}
154   \batchmode
155   \font\test=#1\relax
156   \nonstopmode
157   \message{^^J\prefix checking for font #2 [#1]...}
158   \ifx\test\nullfont
159     \message{no^^J}
160     \AddVariable{#2}{no}
161     \@tempswatrue
162   \else
163     \message{yes^^J}
164     \AddVariable{#2}{yes}
165     \AddPackage{#2}
166   \fi}
167
168 \newcommand{\TestPackage}[2][\default]{
169   \def\default{#2}
170   \TestItem[#1]{#2}{package}{sty}{\AddPackage{#2}}{}}
171
172 \newcommand{\TestDocClass}[2]{
173    \def\layoutname{#1}  % remember the name of the layout file
174    \@ifundefined{layout@#1}
175      {#2  % execute the command
176       \global\@namedef{layout@#1}{}}
177      {} % we have already tried this one.
178 }
179
180 \newcommand{\DeclareLaTeXClass}[2][\default]{
181   \TestItem[#1]{\layoutname}{document class}{cls}
182            {\AddLayout[\firstelement]{\layoutname}{#2}{true}{\missingelements}}
183            {\AddLayout[\firstelement]{\layoutname}{#2}{false}{\missingelements}}
184 }
185
186 \newcommand{\DeclareCategory}[2]{
187    \@ifundefined{category@#1}
188      {\global\@namedef{category@#1}{#2}}%
189      {}% we have already defined this one.
190 }
191
192 % Stolen from article.cls
193 \newcommand{\today}{\ifcase\month\or
194   January\or February\or March\or April\or May\or June\or
195   July\or August\or September\or October\or November\or December\fi
196   \space\number\day, \number\year}
197
198 % Initializes the files
199 \typeout{\prefix Inspecting your LaTeX configuration.}
200 \newwrite{\layouts} \immediate\openout \layouts = textclass.lst.tmp
201 \newwrite{\vars} \immediate\openout \vars = chkconfig.vars
202 \newwrite{\packages} \immediate\openout \packages = packages.lst.tmp
203
204 \immediate\write\layouts{%
205 # This file declares layouts and their associated definition files.^^J%
206 # It has been automatically generated by configure^^J%
207 # Use "Tools/Reconfigure" if you need to update it after a^^J%
208 # configuration change. Run ./configure manually to update the^^J%
209 # system wide version of this file.}
210
211 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
212 %%%%% ACTUAL CONFIGURATION INSPECTION CODE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
213 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
214
215 %%% Add any new package or document class here.
216
217 %%% First, we want the day on which the test has been run.
218 \AddVariable{date}{\today}
219
220 %%% Then, the version of LaTeX we are using
221 \message{^^J\prefix checking for LaTeX version... \fmtversion}
222 \AddVariable{fmtversion}{\fmtversion}
223
224 %%% Store the current LaTeX version
225 \AddPackage[\fmtversion]{LaTeX}
226
227 %%% And now, the list of available languages
228 % The trick is to know that \the\everyjob contains something like
229 %  \typeout{LaTeX2e <2001/06/01>}
230 %  \typeout{Babel <v3.7h> and hyphenation patterns for american, french, german, ngerman, nohyphenation, loaded.}
231 % All we have to do is to extract the list from there:
232 % (1) concatenate all the messages that are displayed everytime the
233 % format is loaded. The is done by redefining locally \typeout to
234 % append its argument to the macro \mesg.
235 \def\mesg{}
236 {\def\typeout#1{\xdef\mesg{\mesg #1}}
237  \the\everyjob}
238
239 % (2) strip the useless parts from \mesg. This uses the fact that TeX
240 % allows to define macros with parameters delimited by arbitrary text.
241 \def\platexname{pLaTeX2e}
242 \ifx\pfmtname\platexname
243   \def\langs{japanese}
244 \else
245   \def\strip#1patterns for #2, loaded.#3\endmark{\def\langs{#2}}
246   \expandafter\strip\mesg\endmark
247 \fi
248
249 % (3) handle the result
250 % FIXME: As of 2016, babel does not print out the loaded hyphenation patterns to
251 %        the log anymore, so this discontinues to work. For possible workarounds
252 %        (with babel), see https://tex.stackexchange.com/questions/330085/
253 %        Leaving this activated for the time being, since it probably still
254 %        works with older distributions.
255 \message{^^J\prefix checking for available hyphenation patterns... \langs}
256 \AddVariable{languages}{\langs}
257
258 %%% Check for ec fonts. Most of this code has been shamelessely stolen
259 %%% from the file ltxcheck.tex in the LaTeX distribution. In particular,
260 %%% don't ask me how the macro \ecrm works...
261 \def\ecrm{%
262   \begingroup
263     \escapechar-1
264     \xdef\reserved@a{%
265       \noexpand\in@
266         {\expandafter\string\csname ecrm\endcsname}%
267         {\expandafter\expandafter\expandafter
268            \string\csname T1/cmr/m/n\endcsname}}%
269   \endgroup
270   \reserved@a}
271
272 \message{^^J\prefix checking for default encoding (this may take a long time)^^J}
273 \font\test=ecrm1000\relax
274
275 \ifx\test\nullfont
276   \message{^^J\prefix\prefix checking for ec fonts... no^^J}
277   \AddVariable{ec}{no}
278   \AddVariable{fontenc}{default}
279 \else
280   \message{^^J\prefix\space\space checking for ec fonts... yes^^J}
281   \message{^^J\prefix\space\space checking for ec support in LaTeX format...}
282   \ecrm
283   \ifin@
284     \message{yes^^J}
285     \AddPackage{ec}
286     \AddVariable{fontenc}{T1}
287     \message{^^J\prefix\space\space default encoding will be set to T1^^J}
288   \else
289     \message{no^^J}
290     \AddVariable{fontenc}{default}
291   \fi
292 \fi
293
294
295 %%% Packages
296 \TestPackage{a0poster}
297 \TestPackage{accents}
298 \TestPackage{achicago}
299 \TestPackage{afterpage}
300 \TestPackage{algorithm}
301 \TestPackage{algorithm2e}
302 \TestPackage{amsmath}
303 \TestPackage{amstext}
304 \TestPackage{apacite}
305 \TestPackage{apalike}
306 \TestPackage[arabic.ldf]{arabi}
307 \TestPackage{array}
308 \TestPackage{astron}
309 \TestPackage{authordate1-4}
310 \TestPackage{babel}
311 \TestPackage{beamerposter}
312 \TestPackage{biblatex}
313 \TestPackage{biblatex-chicago}
314 \TestPackage{bibtopic}
315 \TestPackage{bicaption}
316 \TestPackage{bidi}
317 \TestPackage{bm}
318 \TestPackage{booktabs}
319 \TestPackage{braille}
320 \TestPackage{breakurl}
321 \TestPackage{CJK}
322 \TestPackage{calc}
323 \TestPackage{cancel}
324 \TestPackage{changebar}
325 \TestPackage{chapterbib}
326 \TestPackage{chemgreek}
327 \TestPackage{chessboard}
328 \TestPackage{chessfss}
329 \TestPackage{chicago}
330 \TestPackage{color} % this one should be there if graphics.sty is there.
331 \TestPackage{covington}
332 \TestPackage{cprotect}
333 \TestPackage{csquotes}
334 \TestPackage{drs}
335 \TestPackage[koi8-r.def]{cyrillic}
336 \TestPackage{endnotes}
337 \TestPackage{enotez}
338 \TestPackage{enumitem}
339 \TestPackage{environ} % required by tcolorbox
340 \TestPackage{esint}
341 \TestPackage{eso-pic}
342 \TestPackage{fancybox}
343 \TestPackage{fancyhdr}
344 \TestPackage{filehook}
345 \TestPackage{fixltx2e}
346 \TestPackage{fix-cm}
347 \TestPackage{float}
348 \TestPackage{fontspec}
349 \TestPackage{footmisc}
350 \TestPackage{footnote}
351 \TestPackage{footnotehyper}
352 \TestPackage{forest}
353 \TestPackage{framed}
354 \TestPackage{geometry}
355 \TestPackage{graphicx}
356 \TestPackage[iso-8859-7.def]{greek-inputenc}
357 \TestPackage{harvard}
358 \TestPackage{hhline}
359 \TestPackage{hyperref}
360 \TestPackage{hyphenat}
361 \TestPackage{iftex}
362 \TestPackage{ifthen}
363 \TestPackage[japanese.ldf]{japanese}
364 \TestPackage{jurabib}
365 \TestPackage{l3experimental} % required by various packages
366 \TestPackage{l3kernel} % required by various packages
367 \TestPackage{l3packages} % required by various packages
368 \TestPackage{latex8}
369 \TestPackage{lettrine}
370 \TestPackage{listings}
371 \TestPackage[lithuanian.ldf]{lithuanian}
372 \TestPackage{longtable}
373 \TestPackage{lscape}
374 \TestPackage{luainputenc}
375 \TestPackage{mathdots}
376 \TestPackage{mathrsfs}
377 \TestPackage{mathtools}
378 \TestPackage{mhchem}
379 \TestPackage[mongolian.ldf]{mongolian}
380 \TestPackage{mslapa}
381 \TestPackage{multirow}
382 \TestPackage{named}
383 \TestPackage{natbib}
384 \TestPackage{nicefrac}
385 \TestPackage{nomencl}
386 \TestPackage{paralist}
387 \TestPackage{parskip}
388 \TestPackage{pdfcolmk}
389 \TestPackage{pdflscape}
390 \TestPackage{polyglossia}
391 \TestPackage{pdfcomment}
392 \TestPackage{pdfpages}
393 \TestPackage{pgf} % required by tcolorbox
394 \TestPackage{pict2e}
395 \TestPackage{prettyref}
396 \TestPackage{preview}
397 \TestPackage{refstyle}
398 \TestPackage{rotating}
399 \TestPackage{rotfloat}
400 \TestPackage{sciposter}
401 \TestPackage{sectionbox}
402 \TestPackage[serbianc.ldf]{serbianc}
403 \TestPackage{setspace}
404 \TestPackage{slashed}
405 \TestPackage{soul}
406 \TestPackage{splitidx}
407 \TestPackage{stackrel}
408 \TestPackage{stmaryrd}
409 \TestPackage{subfig}
410 \TestPackage{subscript}
411 \TestPackage{Sweave}
412 \TestPackage{tablefootnote}
413 \TestPackage{tabularx}
414 \TestPackage{tcolorbox}
415 \TestPackage{textcomp}
416 \TestPackage{thswitch}
417 \TestPackage{tikz}
418 \TestPackage[turkmen.ldf]{turkmen}
419 \TestPackage{ulem}
420 \TestPackage{undertilde}
421 \TestPackage{unicode-math}
422 \TestPackage{units}
423 \TestPackage{url}
424 \TestPackage{varioref}
425 \TestPackage{varwidth}
426 \TestPackage{wallpaper}
427 \TestPackage{wrapfig}
428 \TestPackage{xargs}
429 \TestPackage{xcolor}
430 \TestPackage[xetex.def]{xetex-def}
431 \TestPackage{xkeyval}
432 \TestPackage{xltabular}
433 \TestPackage{xskak} % required by chessboard
434
435 % Packages used by LyX's documentation files
436 \TestPackage{arydshln}
437 \TestPackage{braket}
438 \TestPackage{cancel}
439 \TestPackage{caption}
440 \TestPackage{colortbl}
441 \TestPackage{diagbox}
442 \TestPackage{etoolbox} % required by polyglossia and tcolorbox
443 \TestPackage{eurosym}
444 \TestPackage{fp}
445 \TestPackage{makecmds} % required by polyglossia
446 \TestPackage{marginnote}
447 \TestPackage{picinpar}
448 \TestPackage{pict2e}
449 \TestPackage{sidecap}
450 \TestPackage{upgreek}
451
452 % psnfss is in fact the name of a set of style files, among which
453 % times.sty. If times.sty is here, we will assume that everything is fine.
454 \TestPackage[times.sty]{psnfss}
455 % test the following fonts in case they are not in all versions of psnfss
456 \TestPackage{avant}
457 \TestPackage{bookman}
458 \TestPackage{chancery}
459 \TestPackage{charter}
460 \TestPackage{cochineal}
461 \TestPackage{courier}
462 \TestPackage{crimson}
463 \TestPackage{CrimsonPro}
464 \TestPackage{helvet}
465 \TestPackage{mathpazo}
466 \TestPackage{mathpple}
467 \TestPackage{mathptm}
468 \TestPackage{mathptmx}
469 \TestPackage{newcent}
470 \TestPackage{pifont}
471 \TestPackage{utopia}
472 % Other font packages
473 \TestPackage{ae}
474 \TestPackage{bera}
475 \TestPackage{biolinum}
476 \TestPackage{biolinum-type1}
477 %\TestFont[glic1000]{cbgreek}% for Greek % suported by LyX but too large to force downloading
478 \TestPackage{cantarell}
479 \TestPackage{ccfonts}
480 \TestPackage{Chivo}
481 \TestFont[ccr10]{concrete} % required by ccfonts
482 \TestFont[eorm10]{ecc} % required by ccfonts
483 \TestPackage[ot1ccr.fd]{concmath} % required by ccfonts
484 \TestPackage{cmbright}
485 \TestPackage{DejaVuSans}
486 \TestPackage{DejaVuSansCondensed}
487 \TestPackage{DejaVuSansMono}
488 \TestPackage{DejaVuSerif}
489 \TestPackage{DejaVuSerifCondensed}
490 \TestPackage{eco}
491 \TestPackage{eulervm}
492 \TestPackage{feyn}
493 \TestPackage{fourier}
494 \TestPackage{FiraMono}
495 \TestPackage{FiraSans}
496 \TestPackage{garamondx}
497 \TestPackage{plex-serif}
498 \TestPackage{plex-sans}
499 \TestPackage{plex-mono}
500 \TestPackage{sourceserifpro}
501 \TestPackage{sourcesanspro}
502 \TestPackage{sourcecodepro}
503 \TestFont[zgmr8r]{garamondx-fonts}
504 \TestPackage{iwona}
505 \TestPackage{kurier}
506 \TestPackage{lh-lcy}
507 \TestPackage{fontaxes} % required by libertine
508 \TestPackage{libertine}
509 \TestPackage{libertine-type1}
510 \TestPackage{libertineMono-type1}
511 \TestPackage{libertineMono}
512 \TestPackage{libertineRoman}
513 \TestPackage{libertinus}
514 \TestPackage{libertinust1math}
515 \TestPackage{lmodern}
516 \TestPackage{luximono}
517 \TestPackage{mathdesign}% for Roman fonts
518 \TestPackage{mdbch}
519 \TestPackage{mdput}
520 \TestPackage{mdugm}
521 \TestPackage{menukeys}
522 \TestPackage{MinionPro}
523 \TestFont[rzmnr]{minion2newtx}
524 \TestPackage{newtxmath}
525 \TestPackage[binhex.tex]{binhex} % required by newtxmath
526 \TestPackage{noto}
527 \TestPackage{noto-serif}
528 \TestPackage{noto-sans}
529 \TestPackage{noto-mono}
530 \TestPackage{paratype}
531 \TestFont[psyr]{symbol}
532 \TestPackage{tgadventor}
533 \TestPackage{tgbonum}
534 \TestPackage{tgchorus}
535 \TestPackage{tgcursor}
536 \TestPackage{tgheros}
537 \TestPackage{tgpagella}
538 \TestPackage{tgschola}
539 \TestPackage{tgtermes}
540 \TestFont[ugmr8r]{ugm}
541 \TestFont[uopr8r]{urwclassico}
542 \TestPackage{tipa}
543 \TestPackage{tipx}
544 \TestPackage{tone}
545 \TestPackage{txfonts}% For the txtt monospaced font
546 \TestPackage{XCharter}
547 % symbol packages supported by LyX for items and the special character dialog
548 % see the unicodesymbols file
549 \TestPackage{ascii}
550 \TestPackage{bbding}
551 \TestPackage{ifsym}
552 \TestPackage{marvosym}
553 \TestPackage{pmboxdraw}
554 \TestPackage{textgreek}
555 \TestPackage{tfrupee}
556 \TestFont[wasy10]{wasy}
557 \TestPackage{wasysym}
558 % These packages are disabled in the unicodesymbols file
559 % see comment there
560 %\TestPackage{txfonts}% But see above!
561 %\TestPackage{pxfonts}
562 %\TestPackage{mathabx}
563 %\TestPackage{mathdesign}% But see above!
564
565 %%% Specific package versions
566 % This introduces \babelfonts
567 \TestPackageVersion{babel}{2017/11/03}
568 % This introduces multiple paragraphs in multirows
569 \TestPackageVersion{multirow}{2021/01/29}
570 % With this version, hyperref option unicode is true
571 % by default
572 \TestPackageVersion{hyperref}{2021/02/04}
573 % As of this version, the ucs package must be explicitly
574 % loaded to get utf8x (rather than utf8) encoding tables
575 \TestPackageVersion{ucs}{2022/08/07}
576
577 %%% Document classes
578 % The list of layout files has been put in this file here by the
579 % configure script.
580 \input{chklayouts}
581 \input{chkmodules}
582 \input{chkciteengines}
583
584 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
585 %%%%% END ACTUAL CONFIGURATION INSPECTION CODE %%%%%%%%%%%%%%%%%%%%%%%%%%%%
586 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
587
588 % End of the LaTeX job
589 \immediate\closeout\layouts
590 \immediate\closeout\vars
591 \immediate\closeout\packages
592 \typeout{\prefix Inspection done.}
593 \typeout{\prefix Read the file doc/LaTeXConfig.lyx for more information.}
594
595 % Get the real \end command, that has been hidden by LaTeX
596 \@@end