1 % \iffalse meta-comment
4 % The LaTeX3 Project and any individual authors listed elsewhere
7 % This file is part of the LaTeX base system.
8 % -------------------------------------------
10 % It may be distributed and/or modified under the
11 % conditions of the LaTeX Project Public License, either version 1.3c
12 % of this license or (at your option) any later version.
13 % The latest version of this license is in
14 % http://www.latex-project.org/lppl.txt
15 % and version 1.3c or later is part of all distributions of LaTeX
16 % version 2005/12/01 or later.
18 % This file has the LPPL maintenance status "maintained".
20 % The list of all files belonging to the LaTeX base distribution is
21 % given in the file `manifest.txt'. See also `legal.txt' for additional
24 % The list of derived (unpacked) files belonging to the distribution
25 % and covered by LPPL is defined by the unpacking scripts (with
26 % extension .ins) which are part of the distribution.
31 %% File `ltxcheck.tex'.
32 %% Copyright (C) 1994-1997 LaTeX3 project, David Carlisle
37 % Processing this file with a newly installed LaTeX
38 % will test various aspects of the installation.
40 % To typeset the comments in this file, create a small
41 % file ltxcheck.drv that looks like the following (without the %)
43 % \documentclass{ltxdoc}
45 % \DocInput{ltxcheck.tex}
48 % and process `latex ltxcheck.drv'.
50 \NeedsTeXFormat{LaTeX2e
}[1997/
06/
01]
56 % \changes{v1.0c}{1994/03/15}
57 % {Add \cmd{\NeedsTeXFormat}}
58 % \changes{v1.0t}{1996/09/25}
59 % {Move ltxcheck to separate file}
60 % \changes{v1.0v}{1996/11/20}
61 % {lowercase filenames /1044}
62 % \changes{v1.1d}{2004/02/11}
65 \ProvidesFile{ltxcheck.tex
}[2015/
03/
30 v1.1d LaTeX check file (DPC)
]
67 % \GetFileInfo{ltxcheck.tex}
68 % \title{\textsf{ltxcheck}: The \LaTeX\ test program\thanks
69 % {version~\fileversion, dated \filedate}}
70 % \author{David Carlisle}
72 % \MaintainedByLaTeXTeam{latex}
75 % This file, |ltxcheck.tex| should be run after \LaTeX\ has been
76 % installed. It Checks some system dependent parts of \LaTeX\ are set up
77 % correctly for your system, and checks that the main input files and
78 % fonts that \LaTeX\ uses are present and can be found by \LaTeX.
86 LaTeX2e installation check file^^J
%
87 ===============================
}
92 Before running this file through LaTeX2e you should have installed^^J
%
93 the Standard LaTeX files in their final `system' directories.^^J
%
94 This file should *not* be run in a directory that contains article.cls
}
97 % |\pause| just slows things down so that not too much appears on the
98 % screen at once, or scrolls off the top.
102 \message{** Hit return to continue:
}%
109 After certain tests, LaTeX will pause so that you can read the^^J
%
110 output without it scrolling off the screen.^^J
%
111 When you are ready just hit <return> and LaTeX will continue.^^J
%
112 When LaTeX pauses, you will see a prompt like the one below.^^J^^J
%
113 If a test fails, a message will be displayed followed by^^J
%
114 an error message starting `! BAD'.^^J
%
115 LaTeX will quit if you try to scroll past some error messages.
}
119 % Check that the system has defined |\@currdir| correctly
120 % by writing an |.aux| file and then trying to find it again.
123 Checking the current directory syntax^^J
%
124 =====================================
}
128 \newif\iftest\testfalse
132 \ifx\@currdir\@undefined
134 \noexpand\@currdir is undefined !!^^J
%
135 Something is seriously wrong with the LaTeX2e initialisation.^^J
%
136 Either you have corrupted files or this is a LaTeX bug.
}
137 \errmessage{BAD LaTeX2e system!!
}
145 \noexpand\@currdir is defined to be empty.^^J
%
146 This means that LaTeX can not distinguish between a file^^J
%
148 that exists in the current directory, and a file aaaaa.tex^^J
%
149 in another directory.^^J
%
150 It may be that this Operating System has no concept of `directory'^^J
%
151 in which case the setting is correct. If however it is possible to^^J
%
152 uniquely refer to a file then a suitable definition of
153 \noexpand\@currdir^^J
%
154 should be added to texsys.cfg, and the format remade.
}
161 \noexpand\@currdir is defined as
162 \expandafter\strip@prefix
\meaning\@currdir^^J
%
173 \advance\count2 \time
175 \the\year/
\two@digits
{\the\month}/
\two@digits
{\the\day}:
%
176 \two@digits
{\the\count@
}:
\two@digits
{\the\count2}}
180 \immediate\openout15=ltxcheck.aux
181 \immediate\write15{\today^^J
}
182 \immediate\closeout15 %
186 \openin\@inputcheck\@currdir ltxcheck.aux
%
188 \typeout{\@currdir ltxcheck.aux not found
}%
190 \read\@inputcheck to
\reserved@a
191 \ifx\reserved@a
\today
192 \typeout{\@currdir ltxcheck.aux found
}
195 \typeout{BAD: old file
\reserved@a(should be
\today)
}%
205 \typeout{\noexpand \@currdir OK!
}
212 The LaTeX2e installation has defined
\noexpand\@currdir^^J
%
213 to be
\expandafter\strip@prefix
\meaning\@currdir.^^J
%
214 This appears to be incorrect.^^J
%
215 You should add a correct definition to texsys.cfg^^J
%
216 and rebuild the format.
}
217 \errmessage{BAD LaTeX2e system!!
}
218 \expandafter\expandafter\expandafter\@@end
227 % \changes{v1.0k}{1995/09/27}
228 % {Check filename parser}
229 % Check the filename parser can at least cope with a simple
230 % name + extension, |article.cls|.
233 Checking the filename parser^^J
%
234 ============================
}
238 \filename@parse
{article.cls
}
239 \def\reserved@a
{article
}
244 \ifx\filename@base
\reserved@a
245 \ifx\filename@ext\@clsextension
253 \typeout{filename parser OK!
}\pause
256 The LaTeX2e installation has defined
\noexpand\filename@parse.^^J
%
257 This appears to be incorrect.^^J
%
258 You should remove the incorrect definition from texsys.cfg^^J
%
259 and rebuild the format.
}
260 \errmessage{BAD LaTeX2e system!!
}
261 \expandafter\expandafter\expandafter\@@end
266 % Check the input path by looking for |article.cls|. If |article.cls|
267 % is in the current directory it would be found anyway, so first check
271 Checking the input path^^J
%
272 =======================^^J
}
277 \let\input@path\@undefined
278 \ifx\@currdir\@empty
\else
279 \IfFileExists{\@currdir article.cls
}
281 article.cls appears to be in current directory!^^J^^J
%
282 If this is the case, install article.cls into a^^J
%
283 `standard input directory'^^J
%
284 and copy ltxcheck.tex to another directory before^^J
%
285 processing with LaTeX.^^J
%
287 If article.cls is not in the current directory,^^J
%
288 then you need to edit texsys.cfg.^^J
%
289 Read the comments in that file. If nothing else works, add:^^J
%
290 \string\let\string\@currdir
\string\@empty^^J
}%
291 \errhelp{Move files, or edit texsys.cfg
}
292 \def\ArticleClassFoundInCurrentDirectory{%
293 This file should not be run in a `standard input directory'
}
294 \errmessage{BAD:
\ArticleClassFoundInCurrentDirectory}}
301 \IfFileExists{article.cls
}
302 {\typeout{input path OK!
}}
304 LaTeX claims that article.cls is not on the system.^^J
%
305 Either LaTeX has been incorrectly installed, or the
306 \noexpand\input@path^^J
%
307 is incorrect. A correct definition should be added to^^J
%
308 texsys.cfg, and the format remade.
}
311 Typical definitions of
\noexpand\input@path include:^^J^^J
%
312 \string\let\string\input@path=
\noexpand\@undefined
313 (the default definition)^^J^^J
%
314 \string\def\string\input@path
{\@percentchar^^J
315 {/usr/lib/tex/inputs/
} {/usr/local/lib/tex/inputs/
} }^^J^^J
%
316 \string\def\string\input@path
{\@percentchar^^J
317 {c:/tex/inputs/
} {a:/
} }^^J^^J
%
318 \string\def\string\input@path
{\@percentchar^^J
319 {tex_inputs:
} {SOMEDISK:
[SOMEWHERE.TEX.INPUTS
]} }^^J
}%
322 Note that
\noexpand\input@path should be undefined
324 TeX installation does not make
325 \noexpand\openin and
\noexpand\input^^J
%
326 search the same directories.^^J
%
327 If
\noexpand\input@path is defined, entries should be^^J
%
328 in the same syntax as
\noexpand\@currdir^^J
%
329 ie full directory names that may be concatenated with the^^J
%
330 basename (note the final / and
] in the above examples).^^J
%
331 Some systems may need more complicated settings.^^J
%
332 See texsys.cfg for more examples.^^J
%
333 ! BAD
\noexpand\input@path!!
}
338 % For versions prior to \TeX3 complain to the installer. (Although
339 % \LaTeX\ will work with these old \TeX\ versions).
340 % For versions between 3 and 3.14 check that \LaTeX\ is using the
341 % work-around for the |^^J| in |\message| bug.
344 Checking the TeX version^^J
%
345 ========================
}
348 % \changes{v0.2j}{1994/02/25}
349 % {\cs{noboundary} is \cs{relax} not undef in TeX2 (initialised
352 \dimen@
\ifx\@TeXversion\@undefined4
\else\@TeXversion
\fi\p@
%
353 \ifx\noboundary\relax
355 This is TeX
2. You will not be able to use all the new features^^J
%
356 of LaTeX2e with such an old TeX.^^J
%
357 The current version (
1995/
12/
11) is TeX
3.14159.^^J
%
358 Consider upgrading your TeX.
}
359 \ifdim\dimen@<
3\p@
\else
360 \errhelp{Check that texsys.cfg has not defined \@TeXversion
}
362 BAD:
\noexpand\@TeXversion is incorrect:
\meaning\@TeXversion
}
368 % \changes{v1.0h}{1994/10/11}
369 % {Check for TeX3.141}
371 \ifdim\dimen@>
3.14\p@
372 \typeout{This appears to be a recent version of TeX!^^J
%
373 If the following `lines' all appear on the same line,^^J
%
374 separated by
\string^
\string^J
%
375 then there has been an incorrect installation.
}
378 This appears to be a TeX between
3.0 and
3.14^^J
%
379 but the current version (
1995/
12/
11) is TeX
3.14159^^J
%
380 consider upgrading your TeX.^^J
%
381 The following `lines' will appear on the same line,^^J
%
382 separated by
\string^
\string^J;^^J
%
383 the same problem may affect other messages from LaTeX.
}
388 \message{line1^^Jline2^^Jline3
}
397 % To check that the \LaTeX\ fonts have been installed, the well known
398 % trick of going into |\batchmode|, and testing for |\nullfont| is used.
399 % Not all fonts are tested, just a representative sample.
403 =====================================
}
405 % \changes{v1.0h}{1994/10/11}
413 \typeout{\@spaces! BAD:
#1.tfm not found!
}
416 \typeout{\@spaces OK:
#1.tfm found
}
421 \typeout{^^JChecking Standard TeX fonts...
}
427 \errhelp{Obtain a complete standard TeX font distribution.
}
428 \errmessage{BAD: Missing Standard Fonts
}
431 % \changes{v1.0s}{1996/07/19}
432 % {Check for bad cm fonts}
440 OK: correct Computer Modern fonts installed.
}%
443 An unauthorised and incompatible release of the^^J
%
444 Computer Modern fonts has been installed on your system.^^J
%
445 The official fonts may be obtained from CTAN archives in:^^J
%
447 For further details see Donald Knuth's Home page:^^J
%
448 http://www-cs-faculty.stanford.edu/
\protect~knuth/cm.html
}%
449 \errhelp{Re-install Computer Modern fonts, and then rebuild LaTeX
}
450 \errmessage{BAD Standard fonts!!
}
460 \typeout{^^JChecking LaTeX Picture Mode fonts...
}
462 \checkfont{lcircle10
}
463 \checkfont{lcirclew10
}
467 \checkfont{circlew10
}
469 \typeout{^^J! BAD: You do not have the picture mode fonts:^^J
%
470 lcircle10 and lcirclew10
}
473 You have the picture mode fonts with their old names:^^J
%
474 circle10 and circlew10 have been renamed to^^J
%
475 lcircle10 and lcirclew10
}
477 \errhelp{Obtain a complete standard LaTeX font distribution.
}
478 \errmessage{BAD: Missing LaTeX Fonts
}
485 \typeout{^^JChecking Extra LaTeX Computer Modern fonts...
}
492 LaTeX2e uses a few `extra' Computer Modern fonts produced by^^J
%
493 The American Mathematical Society.^^J
%
494 If you install The AMSFONTS font collection, then these, and other,^^J
%
495 fonts will be available to LaTeX.^^J
%
496 Although installing AMSFONTS is recommended, LaTeX does not require^^J
%
497 The full collection; you may obtain a minimal set of extra LaTeX^^J
%
498 fonts from any CTAN archive, in: ctan:macros/latex/fonts/
}
499 \errhelp{Obtain LaTeX fonts or the AMSFONTS collection.
}
500 \errmessage{BAD: Missing LaTeX Fonts
}
506 % \changes{v1.0k}{1995/09/27}
507 % {Check for dc and tc fonts}
508 % \changes{v1.1a}{1997/01/14}
509 % {Check for ec fonts}
510 % \changes{v1.1c}{1997/06/10}
511 % {Modify messages now ec released}
513 \typeout{^^JChecking
T1 encoded Computer Modern (dc & ec) fonts...
}
515 % \changes{v1.0m}{1995/10/31}
516 % {Check the T1 fd files match the dc release.}
517 % This command looks for the string |dcr17<| in the font tables for
518 % T1/cmr. If it is there, then the T1 fd files match the old dc fonts,
519 % for dc release 1.1 or earlier. If not then presumably new fd files
527 {\expandafter\string\csname dcr17
\endcsname<
}%
528 {\expandafter\expandafter\expandafter
529 \string\csname T1/cmr/m/n
\endcsname<
}}%
533 % Similarly this command looks for the string |ecrm| in the font tables
534 % for T1/cmr. If it is there, then the T1 fd files match the ec fonts,
535 % for ec release 1.0 or later.
542 {\expandafter\string\csname ecrm
\endcsname}%
543 {\expandafter\expandafter\expandafter
544 \string\csname T1/cmr/m/n
\endcsname}}%
548 % \changes{v1.0o}{1995/11/14}
549 % {dont produce a BAD message if just one set of dc fonts is missing}
550 % Remove the ``! BAD'' typeout while checking for dc fonts so
551 % as not to worry sites with just the new ones.
558 \typeout{\@spaces\@spaces
#1.tfm not found
}
561 \typeout{\@spaces OK:
#1.tfm found
}
571 % No ec fonts. Check the state of the dc fonts.
574 \typeout{No EC fonts found, checking DC fonts...
}
582 % No dc fonts at all.
585 ! BAD: No ec fonts found!!^^J
%
586 LaTeX does not require the use of ec fonts^^J
%
587 however they are strongly recommended.^^J
%
588 The ec fonts are available in a more natural range of sizes^^J
%
589 and allow better hyphenation and kerning than the^^J
%
590 old fonts such as cmr10.^^J
%
591 These ec fonts may be obtained from CTAN archives, in:^^J
%
595 % No old dc fonts, but new ones installed.
596 % First check whether the latest patch has been applied.
597 % \changes{v1.0p}{1995/12/11}
598 % {Check for dc fonts 1.2 patch level 1 (Bernd Raichle) /2003}
599 % \changes{v1.0q}{1996/06/03}
600 % {Check for dc fonts 1.3}
601 % \changes{v1.1b}{1997/01/24}
602 % {extra closing brace removed from this branch}
610 ! BAD: dc fonts release
1.3 installed^^J
%
611 The dc fonts are now replaced by the ec fonts^^J
%
612 These ec fonts may be obtained from CTAN archives, in:^^J
%
616 ! BAD dc fonts
1.2 or older installed.^^J
%
617 The dc fonts are now replaced by the ec fonts^^J
%
618 These ec fonts may be obtained from CTAN archives, in:^^J
%
624 The fd files for the obsolete release
1.1 of the^^J
%
625 dc fonts have been loaded into the LaTeX format.^^J
%
626 However, you appear to have at least release
1.2 of the dc fonts.^^J
%
627 You should generate suitable fd files by running:^^J
%
629 and then rebuild the format by rerunning:^^J
%
631 \errmessage{BAD LaTeX2e system!!
}
642 % Old DC fonts, but no new ones.
645 Old dc fonts found!!^^J
%
646 Only the original dc fonts are on your system.^^J
%
647 Later releases of the dc/ec fonts introduced^^J
%
648 many improvements and are strongly recommended.^^J
%
649 They may be obtained from CTAN archives, in:^^J
%
655 The LaTeX2e installation has installed fd files for^^J
%
656 release
1.2 (or later) of the dc fonts.^^J
%
657 However, you appear to have only release
1.1 of these fonts.^^J
%
658 You must now generate the correct fd files by running:^^J
%
660 and then rebuild the format by rerunning:^^J
%
662 \errmessage{BAD LaTeX2e system!!
}
666 % Both old and new DC fonts.
674 ! BAD: dc fonts release
1.3 installed^^J
%
675 The dc fonts are now replaced by the ec fonts^^J
%
676 These ec fonts may be obtained from CTAN archives, in:^^J
%
680 ! BAD dc fonts
1.2 or older installed.^^J
%
681 The dc fonts are now replaced by the ec fonts^^J
%
682 These ec fonts may be obtained from CTAN archives, in:^^J
%
691 The fd files for the obsolete release
1.1 of the^^J
%
692 dc fonts have been loaded into the LaTeX format.^^J
%
693 However, you appear to have at least release
1.2 of the dcfonts.^^J
%
694 You should use generate suitable fd files by running:^^J
%
696 and then rebuild the format by running:^^J
%
698 Otherwise LaTeX will always use the older fonts.
}
699 \errmessage{BAD LaTeX2e system!!
}
704 The fd files for the new EC fonts have been loaded into^^J
%
705 the LaTeX format.^^J
%
706 However, these fonts are not found by LaTeX.^^J
%
707 You should either install the ec fonts, or generate suitable^^J
%
708 fd files for the dc fonts by running:
\space latex newdc.ins^^J
%
709 and then rebuild the format by running:
\space initex latex.ltx
}
710 \errmessage{BAD LaTeX2e system!!
}
714 (Both old and new dc font releases are installed.)^^J
%
715 Note that the dc fonts are expected to be replaced by ec^^J
%
722 % Else EC fonts are found, so check whether LaTeX is going to use them.
731 \typeout{EC fonts OK!
}
734 EC fonts installed but LaTeX is still using dc fonts.^^J
%
735 You may want to run ec.ins and remake the LaTeX format
}
746 % The following files will be unpacked by running iniTeX on
750 \typeout{^^JChecking LaTeX input files...^^J
}
753 % If the specified file is not there, add it to the list.
756 \IfFileExists{#1}{}{\edef\missingfile{\missingfile#1,
}}}
759 % Report any missing files in the last batch tested.
761 \def\filereport#1#2{%
762 \ifx\missingfile\@empty
764 OK: The
#1 files such as
#2^^J
%
765 are accessible to LaTeX.
}
767 \expandafter\@gobbletwo
770 ! BAD: The
#1 files:^^J
%
772 are not accessible to LaTeX.
}
773 \errhelp{Check the installation!
}
774 \let\missingfile\@empty
776 \errmessage{Missing LaTeX files
}}
781 \let\missingfile\@empty
785 \checkfile{hyphen.ltx
}
786 \checkfile{fontmath.ltx
}
787 \checkfile{fonttext.ltx
}
788 \checkfile{preload.ltx
}
789 \checkfile{texsys.cfg
}
790 \checkfile{latex.ltx
}
793 % Don't use |\filereport| here as the message is rather different
794 % as the |.ltx| files don't really need to be available to \LaTeX\
795 % once the format is made.
797 \ifx\missingfile\@empty
799 OK: The files such as latex.ltx that are used to make^^J
%
800 the format are accessible to LaTeX.
}
805 that are used to make the format are not accessible to LaTeX.^^J
%
806 This is OK, but you will need those files if you need to remake the^^J
%
810 \let\missingfile\@empty
813 % Class files and class options:
815 \checkfile{article.cls
}
816 \checkfile{report.cls
}
818 \checkfile{letter.cls
}
819 \checkfile{ltxdoc.cls
}
821 \checkfile{slides.cls
}
825 \checkfile{size10.clo
}
826 \checkfile{size11.clo
}
827 \checkfile{size12.clo
}
828 \checkfile{fleqn.clo
}
829 \checkfile{leqno.clo
}
833 \filereport{main class
}{article.cls
}
838 \checkfile{alltt.sty
}
840 \checkfile{exscale.sty
}
841 \checkfile{flafter.sty
}
842 \checkfile{fontenc.sty
}
843 \checkfile{graphpap.sty
}
844 \checkfile{ifthen.sty
}
845 \checkfile{inputenc.sty
}
846 \checkfile{latexsym.sty
}
847 \checkfile{makeidx.sty
}
848 \checkfile{newlfont.sty
}
849 \checkfile{oldlfont.sty
}
850 \checkfile{shortvrb.sty
}
851 \checkfile{showidx.sty
}
852 \checkfile{slides.sty
}
853 \checkfile{syntonly.sty
}
854 \checkfile{tracefnt.sty
}
859 \filereport{main package
}{ifthen.sty
}
862 % Font definition (.fd) files:
864 \checkfile{omlcmm.fd
}
865 \checkfile{omlcmr.fd
}
866 \checkfile{omllcmm.fd
}
867 \checkfile{omscmr.fd
}
868 \checkfile{omscmsy.fd
}
869 \checkfile{omslcmsy.fd
}
870 \checkfile{omxcmex.fd
}
871 \checkfile{omxlcmex.fd
}
872 \checkfile{ot1cmdh.fd
}
873 \checkfile{ot1cmfib.fd
}
874 \checkfile{ot1cmfr.fd
}
875 \checkfile{ot1cmr.fd
}
876 \checkfile{ot1cmss.fd
}
877 \checkfile{ot1cmtt.fd
}
878 \checkfile{ot1cmvtt.fd
}
879 \checkfile{ot1lcmss.fd
}
880 \checkfile{ot1lcmtt.fd
}
881 \checkfile{t1cmdh.fd
}
882 \checkfile{t1cmfib.fd
}
883 \checkfile{t1cmfr.fd
}
885 \checkfile{t1cmss.fd
}
886 \checkfile{t1cmtt.fd
}
887 \checkfile{t1cmvtt.fd
}
888 \checkfile{ts1cmr.fd
}
889 \checkfile{ts1cmss.fd
}
890 \checkfile{ts1cmtt.fd
}
891 \checkfile{ts1cmvtt.fd
}
895 \checkfile{ullasy.fd
}
901 \filereport{font definition
}{t1cmr.fd
}
904 % Font encoding files:
906 \checkfile{t1enc.def
}
907 \checkfile{ot1enc.def
}
908 \checkfile{omsenc.def
}
909 \checkfile{omlenc.def
}
914 \filereport{font encoding
}{t1enc.def
}
917 % Input encoding files:
919 \checkfile{ascii.def
}
920 \checkfile{latin1.def
}
921 \checkfile{latin2.def
}
922 \checkfile{latin3.def
}
923 \checkfile{latin5.def
}
924 \checkfile{cp850.def
}
925 \checkfile{cp852.def
}
926 \checkfile{cp865.def
}
927 \checkfile{cp437.def
}
928 \checkfile{cp437de.def
}
929 \checkfile{applemac.def
}
931 \checkfile{ansinew.def
}
935 \filereport{input encoding
}{latin1.def
}
938 % Compatibility files:
940 \checkfile{article.sty
}
942 \checkfile{letter.sty
}
944 \checkfile{report.sty
}
945 \checkfile{fleqn.sty
}
946 \checkfile{leqno.sty
}
947 \checkfile{openbib.sty
}
948 \checkfile{latex209.def
}
953 \filereport{compatibility mode
}{article.sty
}
958 \checkfile{bezier.sty
}
959 \checkfile{docstrip.tex
}
960 \checkfile{slides.def
}
961 \checkfile{sfonts.def
}
962 \checkfile{t1enc.sty
}
966 \filereport{remaining
}{sfonts.def
}