summaryrefslogtreecommitdiff
path: root/manual/styles/caml-sl.sty
diff options
context:
space:
mode:
Diffstat (limited to 'manual/styles/caml-sl.sty')
-rw-r--r--manual/styles/caml-sl.sty43
1 files changed, 43 insertions, 0 deletions
diff --git a/manual/styles/caml-sl.sty b/manual/styles/caml-sl.sty
new file mode 100644
index 0000000000..c4061e4a4d
--- /dev/null
+++ b/manual/styles/caml-sl.sty
@@ -0,0 +1,43 @@
+% CAML style option, for use with the caml-latex filter.
+
+\typeout{Document Style option `caml-sl' <7 Apr 92>.}
+
+{\catcode`\^^M=\active %
+ \gdef\@camlinputline#1^^M{\normalsize\tt\# #1\par} %
+ \gdef\@camloutputline#1^^M{\small\ttfamily\slshape#1\par} } %
+\def\@camlblankline{\medskip}
+\chardef\@camlbackslash="5C
+\def\@bunderline{\setbox0\hbox\bgroup\let\par\@parinunderline}
+
+\def \@parinunderline {\futurelet \@next \@@parinunderline}
+\def \@@parinunderline {\ifx \@next \? \let \@do \@@par@inunderline \else \let \@do \@@@parinunderline \fi \@do}
+\def \@@par@inunderline #1{\@eunderline\@oldpar\?\@bunderline}
+\def \@@@parinunderline {\@eunderline\@oldpar\@bunderline}
+\def\@eunderline{\egroup\underline{\box0}}
+\def\@camlnoop{}
+
+\def\caml{
+ \bgroup
+ \flushleft
+ \parindent 0pt
+ \parskip 0pt
+ \let\do\@makeother\dospecials
+ \catcode13=\active % 13 = ^M = CR
+ \catcode92=0 % 92 = \
+ \catcode32=\active % 32 = SPC
+ \frenchspacing
+ \@vobeyspaces
+ \let\@oldpar\par
+ \let\?\@camlinputline
+ \let\:\@camloutputline
+ \let\;\@camlblankline
+ \let\<\@bunderline
+ \let\>\@eunderline
+ \let\\\@camlbackslash
+ \let\-\@camlnoop
+}
+
+\def\endcaml{
+ \endflushleft
+ \egroup\noindent
+}