"File page.sty
% thebibliography environment from
% /usr/share/texmf/tex/latex/base/book.cls
% with \chapter removed
\renewenvironment{thebibliography}[1]
{\list{\@biblabel{\@arabic\c@enumiv}}%
{\settowidth\labelwidth{\@biblabel{#1}}%
\leftmargin\labelwidth
\advance\leftmargin\labelsep
\@openbib@code
\usecounter{enumiv}%
\let\p@enumiv\@empty
\renewcommand\theenumiv{\@arabic\c@enumiv}}%
\sloppy
\clubpenalty4000
\@clubpenalty \clubpenalty
\widowpenalty4000%
\sfcode`\.\@m}
{\def\@noitemerr
{\@latex@warning{Empty `thebibliography' environment}}%
\endlist}
End of file
File page.tex
\documentclass [fleqn]{article}
\setlength {\overfullrule }{1mm}
\input{lgwinclude}
\usepackage{latexsym}
%fancy headers, footer, etc.:
\usepackage{fancyhdr}
%changes math symbols:
\usepackage{euler}
%changes time rendering
\usepackage[danish]{babel}
%\usepackage[latin1]{inputenc}
%\setlength{\parindent}{0em}
%\setlength{\parskip}{1ex}
% The font of each Logiweb construct is under tight control except that
% strings are typeset in whatever font is in effect at the time of
% typesetting. This is done to enhance the readability of strings in the
% TeX source generated by Logiweb. The default font for typesetting
% strings is \rm:
\everymath{\rm}
\usepackage{makeidx}
\usepackage{page}
\makeindex
\newcommand{\intro}[1]{\emph{#1}}
\newcommand{\indexintro}[1]{\index{#1}\intro{#1}}
\newlength{\bracketwidth}
\settowidth{\bracketwidth}{$[{}$}
\newcommand{\back}{\protect\makebox[-1.0\bracketwidth]{}}
\usepackage[dvipdfm=true]{hyperref}
\hypersetup{pdfpagemode=none}
\hypersetup{pdfstartpage=1}
\hypersetup{pdfstartview=FitBH}
\hypersetup{pdfpagescrop={120 130 490 730}}
\hypersetup{pdftitle=A Logiweb base page}
\hypersetup{colorlinks=true}
\bibliographystyle{plain}
% \tex{something} writes something to page.otx for later inclusion
\newwrite\outex
\newtoks\toktex
\immediate\openout\outex=page.otx
\newcommand{\tex}[1]{\toktex={\item #1}\immediate\write\outex{\the\toktex}}
% \test{something} writes something to page.tst for later inclusion
\newwrite\outest
\immediate\openout\outest=page.tst
\newcommand{\test}[1]{\toktex={\item #1}\immediate\write\outest{\the\toktex}}
% Concerning \catcode`\@=11 : See the TeXbook, Appendix B (page 344).
% \afterheading suppresses indentation once, c.f. latex.ltx.
% \display{something} displays something as a displayed equation except
% that linebreaking is possible and displaymath is not turned on by default.
% The first paragraph after \display{something} is unindented.
% Glue below formulas may be wrong. The definition of \display misses
% something like \addvspace{\belowdisplayskip}.
\catcode`\@=11
\def\afterheading{\@afterheading}
\catcode`\@=12
\newcommand{\display}[1]{\begin{list}{}{\setlength{\leftmargin}{\mathindent}}
\item #1\end{list}
\afterheading}
\newcommand{\statement}[1]{\begin{list}{}{\setlength{\leftmargin}{0mm}}
\item #1\end{list}
\afterheading}
\begin {document}
\title{A Logiweb page defining an append function}
\author{Martin R{\o}pcke}
\maketitle
This document defines and tests a function for appending lists. First we
define then name of the page:
\begin{center}
"
begin math newline define pyk of append as text "append" end text end define end math
end "
\end{center}
Having done this we next define the \TeX{} rendering of the
append function, which is what decides how the text appears
when using the function later on:
\begin{center}
"
begin math define tex of append var x to var y end append as text "append(#1., #2.)" end text end define end math
end ".
\end{center}
Next we declare the value of the function:
\begin{center}
"
begin math define value of append var x to var y end append as var y pair var x end define end math
end ".
\footnote{"
begin math define pyk of append var x to var y end append as text "append * to * end append" end text end define end math
end "}
\end{center}
And finally, we must test it:
\begin{center}
"
begin math test append two to one end append tagged equal one pair two end test end math
end ".
\end{center}
This results in a message \texttt{Claim succeeded} from the pyk
compiler. Had we instead tested the expression [$append(1,2) \approx
1::3$], the pyk compiler would have given us the message \texttt{Claim
failed}. The little dot, ``$\cdot$'', after the brackets tells us that
the expression has been evaluated.
In future Logiweb pages one can now use the append function by refering
to this page called append with the kana reference:
\begin{figure}[h!t]
\centering
\begin{tabular}{rl}
append: & nani \\
& taka sini sinu tiki kase nasu nena kusi nesu nune \\
& siti sisu neki kika nutu saki seni sesu tina naka \\
&suku kasi kesa katu kana sete sise nasa natu \\
\end{tabular}
\end{figure}
\end{document}
End of file
latex page"
The pyk compiler, version 0.grue.20050502 by Klaus Grue,