| Search internet |
You may change the rendering of the append function, if you like:
""P append
""R base
""D 17
" ++ "
""B
page ( ""N , ""C )
title "Append"
bib "@MISC{dummy}"
main text "
\begin{statements}
\item "[[ eager define x ++ y as
if x atom then y else x head :: x tail ++ y end define ]]"
\item "[[ etst << 1 ,, 2 >> ++ << 3 >> ; << 1 ,, 2 ,, 3 >> end test ]]"
\end{statements}
\nocite{dummy}\color{white}\bibliography{./page}
"
appendix "
\begin{statements}
\item "[[ tex show define x ++ y as x,"
\mathrel{\makebox[0mm][l]{+}\,+}",y end define ]]"
\end{statements}
"
end page
The tex show definition in line 5 and 4 from the bottom tells how to render the append construct: It is done by appending the rendering of x, a particular string, and the rendering of y. Rendering of x ++ y yields
.
Care must be taken to get newline characters right in the rendering. If TeX sees a blank line in math mode it thinks something has gone wrong. So you cannot include too many newlines. And if you include no newlines you may get too long lines.
By convention, start all strings in the rendering by a newline unless you have very good reasons for not doing so. Do not end strings in a rendering with a newline unless you have very good reasons for doing so.
The lgc compiler recognizes two ways of rendering constructs: show and use rendering. The use rendering is used almost everywhere, but show rendering is used e.g. in the left hand side of definitions. In most cases, the use and show rendering are identical. Here are the typical cases:
when shown. When no show rendering is given, the show rendering defaults to default rendering.
to save space.The base page defines the newline construct above thus:
\item "[[ tex use define newline x as " \newline "[ x ]"". end define ]]"
| Search logiweb.eu |