Commit 7eb82a46 authored by apt's avatar apt
Browse files

[project @ 2001-08-31 15:48:55 by apt]

add documentation for ext-core -- MERGE TO STABLE (surely harmless?)
parent e9571b2b
# General makefile for Latex stuff
ps: core.ps
core.dvi: core.tex prims.tex
latex core.tex
latex core.tex
prims.tex: ../../compiler/prelude/primops.txt.pp
(cd ../../compiler/prelude; gcc -E -I../../includes -traditional -x c primops.txt.pp | /bin/sed -e '/^#/d' > primops.txt)
../../utils/genprimopcode/genprimopcode --make-latex-doc < ../../compiler/prelude/primops.txt > prims.tex
######## General rules
.SUFFIXES:
.PRECIOUS: %.tex %.ps %.bbl
%.ps: %.dvi
dvips -f < $< > $@
clean:
rm -f *.aux *.log
nuke: clean
rm -f *.dvi *.ps *.bbl *.blg
# End of file
%NAME: a4wide.sty
% "moretext" document style option.
% Jean-Francois Lamy, July 86
%
% Redefines the margins so that they are more in line with
% what we are used to see.
%
% [Minimally modified for LaTeX2e, Alexander Holt, August 1994]
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{a4wide}[1994/08/30]
\RequirePackage{a4}
\ifcase \@ptsize
% mods for 10 pt
\oddsidemargin 0.15 in % Left margin on odd-numbered pages.
\evensidemargin 0.35 in % Left margin on even-numbered pages.
\marginparwidth 1 in % Width of marginal notes.
\oddsidemargin 0.25 in % Note that \oddsidemargin = \evensidemargin
\evensidemargin 0.25 in
\marginparwidth 0.75 in
\textwidth 5.875 in % Width of text line.
\or % mods for 11 pt
\oddsidemargin 0.1 in % Left margin on odd-numbered pages.
\evensidemargin 0.15 in % Left margin on even-numbered pages.
\marginparwidth 1 in % Width of marginal notes.
\oddsidemargin 0.125 in % Note that \oddsidemargin = \evensidemargin
\evensidemargin 0.125 in
\marginparwidth 0.75 in
\textwidth 6.125 in % Width of text line.
\or % mods for 12 pt
\oddsidemargin -10 pt % Left margin on odd-numbered pages.
\evensidemargin 10 pt % Left margin on even-numbered pages.
\marginparwidth 1 in % Width of marginal notes.
\oddsidemargin 0 in % Note that \oddsidemargin = \evensidemargin
\evensidemargin 0 in
\marginparwidth 0.75 in
\textwidth 6.375 true in % Width of text line.
\fi
% I have enclosed code.sty, which achieves 99% of what you want without
% the need for a separate preprocessor. At the start of your document
% you write "\makeatactive". From then on, inline code is written as @\x
% -> x_1 & y@. The only difference with what you are used to, is that
% instead of
%
% @
% foo :: Int -> Int
% foo = \n -> n+1
% @
%
% you have to write
%
% \begin{code}
% foo :: Int -> Int
% foo = \n -> n+1
% \end{code}
%
% and that you cannot use @ in \section{} and \caption{}. For the paper that occured twice, in which case I had to replace @...@ b y \texttt{...}.
%
%
% code.sty --- nice verbatim mode for code
\def\icode{%
\relax\ifmmode\hbox\else\leavevmode\null\fi
\bgroup
%\begingroup
\@noligs
\verbatim@font
\verb@eol@error
\let\do\@makeother \dospecials
\@vobeyspaces
\frenchspacing
\@icode}
\def\@icode#1{%
\catcode`#1\active
\lccode`\~`#1%
\lowercase{\let~\icode@egroup}}
\def\icode@egroup{%
%\endgroup}
\egroup}
% The \makeatactive command:
% makes @ active, in such a way that @...@ behaves as \icode@...@:
{
\catcode`@=\active
\gdef\makeatactive{
\catcode`@=\active \def@{\icode@}
% Since @ becomes active, it has to be taken care of in verbatim-modes:
\let\olddospecials\dospecials \def\dospecials{\do\@\olddospecials}}
}
% \gdef\makeatother{\g@remfrom@specials{\@}\@makeother\@}
\gdef\makeatother{\@makeother\@}
\newcommand\codetabwidth{42pt}
{\catcode`\^^I=\active%
\gdef\@vobeytab{\catcode`\^^I\active\let^^I\@xobeytab}}
\def\@xobeytab{\leavevmode\penalty10000\hskip\codetabwidth}
\begingroup \catcode `|=0 \catcode `[= 1
\catcode`]=2 \catcode `\{=12 \catcode `\}=12
\catcode`\\=12 |gdef|@xcode#1\end{code}[#1|end[code]]
|endgroup
\def\@code{\trivlist \item\relax
\if@minipage\else\vskip\parskip\fi
\leftskip\@totalleftmargin\rightskip\z@skip
\parindent\z@\parfillskip\@flushglue\parskip\z@skip
\@@par
\@tempswafalse
\def\par{%
\if@tempswa
\leavevmode \null \@@par\penalty\interlinepenalty
\else
\@tempswatrue
\ifhmode\@@par\penalty\interlinepenalty\fi
\fi}%
\obeylines \verbatim@font \@noligs
\let\do\@makeother \dospecials
\everypar \expandafter{\the\everypar \unpenalty}%
}
\def\code{\@code \frenchspacing\@vobeytab\@vobeyspaces \@xcode}
\def\endcode{\if@newlist \leavevmode\fi\endtrivlist}
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment