summaryrefslogtreecommitdiff
path: root/support/schemetex/st.tex
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 /support/schemetex/st.tex
Initial commit
Diffstat (limited to 'support/schemetex/st.tex')
-rw-r--r--support/schemetex/st.tex83
1 files changed, 83 insertions, 0 deletions
diff --git a/support/schemetex/st.tex b/support/schemetex/st.tex
new file mode 100644
index 0000000000..4dce738843
--- /dev/null
+++ b/support/schemetex/st.tex
@@ -0,0 +1,83 @@
+\documentstyle[proc]{article}
+% @(#)st.tex 1.3 88/06/30
+\title{Scheme\TeX{}}
+\author{John D. Ramsdell}
+\date{
+88/06/30
+}
+
+\begin{document}
+
+\maketitle
+
+Scheme\TeX{} provides simple support for literate programming in any
+dialect of Lisp. Originally created for use with Scheme, it defines a
+new source file format which may be used to produce \LaTeX{} input or
+Lisp code.
+
+Scheme\TeX{} source lines are divided into text and code. Lines of code
+start with a line beginning with ``('', and continue until the line
+containing the matching ``)''. The remaining lines are text lines,
+and they are treated as comments.
+
+When producing a \LaTeX{} document, both the text lines and the code
+lines are copied into the document source file, but the code lines are
+surrounded by a pair of formatting commands (\verb-\begin{astyped}-
+and \verb-\end{astyped}-). This \LaTeX{} environment formats the code
+as written, in typewriter font. A Lisp comment within a code line is
+formatted in an \verb-\mbox- in Roman font. A Scheme\TeX{} style
+command should include the \verb-astyped- style option, so that the
+\verb-astyped- environment is available. An example:
+\begin{center}
+\verb-\documentstyle[astyped]{article}-
+\end{center}
+
+Scheme\TeX{} was designed under the constraint that code lines must be
+unmodified Lisp code, and text lines must be unmodified \LaTeX{} code.
+Text editors with support for Lisp and \LaTeX{}, such as Emacs, may be
+used for Scheme\TeX{} code much as they are used for Lisp code and
+\LaTeX{} code.
+
+Some users prefer not modifying the \verb-LOAD- function in their Lisp
+system. To support those users, the rule that text lines must be
+unmodified \LaTeX{} code has been relaxed. Text lines that begin with
+``;'' are copied without the initial ``;''.
+
+\newpage{}
+\section*{Usage under Unix}
+
+The extension for Scheme\TeX{} files is ``\verb;.st;''. For T, the
+file \verb;st.t; contains two programs used to obtain code from an
+``\verb;.st;'' file. The T expression
+\begin{center}
+\verb;(LOAD-ST; {\it filespec environment\/}{\tt )}
+\end{center}
+loads a Scheme\TeX{} file by creating a T source file if no T source
+file exists which is younger than the Scheme\TeX{} file. The T source
+file is then loaded using the usual \verb;LOAD; procedure.
+\verb;COMPILE-ST; is like \verb;LOAD-ST; except it compiles the file
+instead of loading it.
+
+A \LaTeX{} file is produced from a file with the ``\verb;.st;''
+extension using the Unix shell command
+\begin{center}
+{\tt st} {\it file-name}
+\end{center}
+It will produce a file with the ``\verb;.tex;'' extension. The
+obvious make file is in Figure~\ref{makefile}.
+\begin{figure}
+\begin{verbatim}
+.SUFFIXES: .dvi .tex .st
+
+.st.dvi:
+ make $*.tex && make $*.dvi
+
+.st.tex:
+ st $*
+
+.tex.dvi:
+ latex $*
+\end{verbatim}
+\caption{A Scheme\TeX{} Makefile}\label{makefile}
+\end{figure}
+\end{document}