blob: 80fbcabe9a3e3978652b7af880685e2dc868fc98 (
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
|
% \AddToCheckSum{67}
%
% The \option{simple} option adds the optional argument to \cs\include, and
% does nothing else.
%
% \begin{macro}{\include}
% I'm not really sure why the \cs\relax is there; I'm imitating the kernel's
% command.
% \begin{macrocode}
\defcommand\include {%
\relax
\ifnum\@auxout=\@partaux
\@latex@error{\string\include\space cannot be nested}\@eha
\else
\expandafter\@include
\fi
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@include}
% \mbox{}
% \begin{macrocode}
\defcommand\@include [2][] {%
\clearpage
\if@filesw
\immediate\write\@mainaux{\string\@input{#2.aux}}%
\fi
\@tempswatrue
\if@partsw
\@tempswafalse
\edef\reserved@b{#2}%
\@for\reserved@a:=\@partlist\do
{\ifx\reserved@a\reserved@b\@tempswatrue\fi}%
\fi
\if@tempswa
\let\@auxout\@partaux
\if@filesw
\immediate\openout\@partaux #2.aux
\immediate\write\@partaux{\relax}%
\fi
% \end{macrocode}
% All we did was change |#1| to |#2| and add the next line.
% \begin{macrocode}
#1%
\@input@{#2.tex}%
\clearpage
\@writeckpt{#2}%
\if@filesw
\immediate\closeout\@partaux
\fi
\else
\@nameuse{cp@#2}%
\fi
\let\@auxout\@mainaux
}
% \end{macrocode}
% \end{macro}
|