summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/frankenstein/simple.sto
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/frankenstein/simple.sto
Initial commit
Diffstat (limited to 'macros/latex/contrib/frankenstein/simple.sto')
-rw-r--r--macros/latex/contrib/frankenstein/simple.sto58
1 files changed, 58 insertions, 0 deletions
diff --git a/macros/latex/contrib/frankenstein/simple.sto b/macros/latex/contrib/frankenstein/simple.sto
new file mode 100644
index 0000000000..80fbcabe9a
--- /dev/null
+++ b/macros/latex/contrib/frankenstein/simple.sto
@@ -0,0 +1,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}