% \iffalse meta-comment % % Copyright 1994 the LaTeX3 project and the individual authors. % All rights reserved. For further copyright information see the file % legal.txt, and any other copyright indicated in this file. % % This file is part of the LaTeX2e system. % ---------------------------------------- % % This system is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. % % % IMPORTANT NOTICE: % % For error reports in case of UNCHANGED versions see bugs.txt. % % Please do not request updates from us directly. Distribution is % done through Mail-Servers and TeX organizations. % % You are not allowed to change this file. % % You are allowed to distribute this file under the condition that % it is distributed together with all files mentioned in manifest.txt. % % If you receive only some of these files from someone, complain! % % You are NOT ALLOWED to distribute this file alone. You are NOT % ALLOWED to take money for the distribution or use of either this % file or a changed version, except for a nominal charge for copying % etc. % \fi %% \CheckSum{189} %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z %% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z %% Digits \0\1\2\3\4\5\6\7\8\9 %% Exclamation \! Double quote \" Hash (number) \# %% Dollar \$ Percent \% Ampersand \& %% Acute accent \' Left paren \( Right paren \) %% Asterisk \* Plus \+ Comma \, %% Minus \- Point \. Solidus \/ %% Colon \: Semicolon \; Less than \< %% Equals \= Greater than \> Question mark \? %% Commercial at \@ Left bracket \[ Backslash \\ %% Right bracket \] Circumflex \^ Underscore \_ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} %% % % % \changes{v2.1a}{94/03/10}{Update for \LaTeXe} % % \DoNotIndex{\@cclvi,\@cclv,\@gobble,\@gobbletwo,\@ifnextchar} % \DoNotIndex{\@M,\@tempboxa,\advance,\alloc,\begingroup,\bgroup} % \DoNotIndex{\box,\count@,\def,\do,\docdate,\egroup,\endgroup} % \DoNotIndex{\fi,\filedate,\fileversion,\font,\fontdimen,\global} % \DoNotIndex{\ifinner,\ifnum,\immediate,\let,\long,\loop,\m@ne} % \DoNotIndex{\noexpand,\relax,\repeat,\scriptfont} % \DoNotIndex{\scriptscriptfont,\setbox,\sixt@@n,\space,\textfont} % \DoNotIndex{\toks,\toksdef,\write,\xdef,\z@}% % % %\title{The file \texttt{syntonly.dtx} for use with % \LaTeXe.\thanks{This file has version % number \fileversion, dated \filedate.}\\[2pt] % It contains the code for \texttt{syntonly.sty}} % \author{Frank Mittelbach \and Rainer Sch\"opf} % % % \maketitle % % This package implements the |\syntaxonly| declaration for \LaTeXe. % This command can be used in the preamble for running a document % through \LaTeX{} without actually getting any output. % % \StopEventually{} % %\iffalse % % \section{The documentation driver file} % % The next bit of code contains the documentation driver file for % \TeX{}, i.e., the file that will produce the documentation you are % currently reading. It will be extracted from this file by the \dst{} % program. % \begin{macrocode} %<*driver> \documentclass{ltxdoc} \GetFileInfo{syntonly.dtx} \providecommand\dst{\expandafter{\normalfont\scshape docstrip}} \begin{document} \DocInput{syntonly.dtx} \end{document} % % \end{macrocode} %\fi % % \section{Implementation} % % % We identify the package and its current version. % \begin{macrocode} %<*package> \ProvidesPackage{syntonly}[94/03/10 v2.1a Standard LaTeX2e package] \typeout{Package: `syntonly' \fileversion\space <\filedate> (FMi and RmS)} \typeout{English Documentation \space\space\space <\docdate> (FMi)} % \end{macrocode} % % % % \begin{macro}{\dummyft@} % First of all we need to define the `dummy' font. % \begin{macrocode} \font\dummyft@=dummy % \end{macrocode} % In order to make it usable also as a math extension font, we set a % suitable number of |\fontdimen| parameters ($22$). % \begin{macrocode} \fontdimen1 \dummyft@=\z@ \fontdimen2 \dummyft@=\z@ \fontdimen3 \dummyft@=\z@ \fontdimen4 \dummyft@=\z@ \fontdimen5 \dummyft@=\z@ \fontdimen6 \dummyft@=\z@ \fontdimen7 \dummyft@=\z@ \fontdimen8 \dummyft@=\z@ \fontdimen9 \dummyft@=\z@ \fontdimen10 \dummyft@=\z@ \fontdimen11 \dummyft@=\z@ \fontdimen12 \dummyft@=\z@ \fontdimen13 \dummyft@=\z@ \fontdimen14 \dummyft@=\z@ \fontdimen15 \dummyft@=\z@ \fontdimen16 \dummyft@=\z@ \fontdimen17 \dummyft@=\z@ \fontdimen18 \dummyft@=\z@ \fontdimen19 \dummyft@=\z@ \fontdimen20 \dummyft@=\z@ \fontdimen21 \dummyft@=\z@ \fontdimen22 \dummyft@=\z@ % \end{macrocode} % \end{macro} % % \begin{macro}{\ifsyntax@} % Now we can define the `syntax only' feature. We define a switch % |\if@syntax| so that any macro can always find out if it % is really supposed to typeset text. Its default is to run in % normal mode. % \begin{macrocode} \newif\ifsyntax@ \syntax@false % \end{macrocode} % \end{macro} % % \begin{macro}{\syntaxonly} % The |\syntaxonly| macro sets up everything for syntax % checking. % \begin{macrocode} \def\syntaxonly{ % \end{macrocode} % First of all it sets the |syntax@| switch to \texttt{true}. % \begin{macrocode} \syntax@true % \end{macrocode} % Then it globally sets all fonts to the dummy font. These are: % the current font outside math mode, % \begin{macrocode} \global\dummyft@ % \end{macrocode} % and the $3\times16$ math fonts for the $16$ math \emph{groups}. % We use a loop to set these. % \begin{macrocode} \count@\sixt@@n \loop \ifnum\count@ >\z@ \advance\count@\m@ne \global\textfont\count@\dummyft@ \global\scriptfont\count@\dummyft@ \global\scriptscriptfont\count@\dummyft@ \repeat % \end{macrocode} % Since all font changes occur either via |\selectfont| (in % text or |\mathversion| (for math mode) it is sufficient % to change these to no-ops. In addition we must prevent % the loading of math fonts, this is done by making % |\getanddefine@fonts| a no-op. % \begin{macrocode} \global\let\selectfont\relax \global\let\mathversion\@gobble \global\let\getanddefine@fonts\@gobbletwo % \end{macrocode} % We prevent \TeX{} from complaining about the dummy font % having no characters. % \begin{macrocode} \tracinglostchars\z@ % \end{macrocode} % Then we disable the output routine, and set |\frenchspacing| % (which is slightly faster than |\nonfrenchspacing|). % Finally we set |\hbadness| to $10000$ to avoid overfull box % messages. % \begin{macrocode} \nopages@ \frenchspacing \hbadness\@M} % \end{macrocode} % \end{macro} % % % \begin{macro}{\newtoks@} % In the following we need a non-outer version of the % |\newtoks| macro. % \begin{macrocode} \def\newtoks@{\alloc@5\toks\toksdef\@cclvi} % \end{macrocode} % \end{macro} % % % \begin{macro}{\nopages@} % \changes{v1.0b}{90/01/14}{Rewrite of the `nopages@ macro to % correctly handle footnote insertions, floats and marginpars.} % The |\nopages@| macro disables the \LaTeX{} output routine. % To this end we define a very simple output routine that empties % the output \emph{and} footnote boxes (remember that the latter % are insertions. % \begin{macrocode} \def\nopages@{% \output {\setbox\z@\box\@cclv \setbox\z@\box\footins \deadcycles\z@}% % \end{macrocode} % Then we protect it against definition by a style file. % \begin{macrocode} \newtoks@\output % \end{macrocode} % But this is not enough: normally the \LaTeX{} output routine % is responsible for dealing with floating objects. % We therefore also redefine the internal macros for handling % floats and marginpars. % \begin{macrocode} \def\@xfloat##1[##2]{% % \end{macrocode} % There are a few things that have to be retained: % the definition of |\@captype| since it is used by the % |\caption| command, % \changes{v1.0c}{90/01/16}{Definition of `@captype added.} % \begin{macrocode} \def\@captype{##1}% % \end{macrocode} % the error message issued when not in outer paragraph mode, % \begin{macrocode} \ifinner\@parmoderr\fi % \end{macrocode} % and the |\@parboxrestore| command for the body of the % float. This is necessary since it restores the original % definitions of important commands like |\par| or |\\|. % \begin{macrocode} \setbox\@tempboxa\vbox\bgroup\@parboxrestore}% % \end{macrocode} % |\end@float| must now only close the brace: % \begin{macrocode} \let\end@float\egroup % \end{macrocode} % The redefinition of the |\marginpar| command is a bit more % complicated since we have to check for the optional argument. % First we redefine the command itself: % \begin{macrocode} \def\marginpar{\ifinner\@parmoderr\fi % \end{macrocode} % We open a group so that everything gathered in a temporary box % can easily be thrown away by closing it again (see below). % \begin{macrocode} \begingroup \@ifnextchar [\@xmpar\@ympar} % \end{macrocode} % |\@xmpar| and |\@ympar| are now defined similar to % |\@xfloat| above. % If an optional argument is present |\@xmpar| typesets % it in a temporary box that is thrown away later. % Then it calls up |\@ympar| to process |\marginpar|'s % argument. % \changes{v1.0d}{90/01/21}{Added forgotten `vbox.} % \begin{macrocode} \long\def\@xmpar[##1]{% \setbox\@tempboxa\vbox{\@parboxrestore ##1}\@ympar}% % \end{macrocode} % |\@ympar| gathers its argument in the same temporary box % and throws away its contents by closing the group opened up in % |\marginpar| above. % \changes{v1.0d}{90/01/21}{Added forgotten `vbox.} % \begin{macrocode} \long\def\@ympar##1{% \setbox\@tempboxa\vbox{\@parboxrestore ##1}\endgroup}% % \end{macrocode} % And that's all we had to do. % \begin{macrocode} } % \end{macrocode} % \end{macro} % % \begin{macro}{\@preamblecmds} % We disable the use of the |\syntaxonly| command after % |\begin{document}| % \begin{macrocode} \@onlypreamble\syntaxonly % % \end{macrocode} % \end{macro} % % \Finale \endinput