The PARAGRAPH
macro is defined by the Yodl program, but is had normally no
actions. The macro works as follows.
If you define the macro, then Yodl's parser will trigger it whenever a new
paragraph is started. The macro must be defined as one with zero arguments,
but leading to some (necessary) action. New paragraphs are -by definition-
indicated in the source file as two or more consecutive newline characters,
optionally separated by spaces. I.e., in the text
Here is a line of text. And here's another one.
one new paragraph occurs: the first line is terminated by a newline, then one
newline follows right behind. Given such input, the PARAGRAPH
macro is
triggered right before the parsing process of the line starting with And
.
Some macro packages do not need paragraph starts; e.g., LaTeX does its own
paragraph handling. Other macro packages do need it: typically, PARAGRAPH
is then defined in a macro file to trigger some special action. E.g., a HTML
converter might define a paragraph as:
DEFINEMACRO(PARAGRAPH)(0)(<p>)
Note that the definition of the action of the PARAGRAPH
macro is again
parsed and expanded by Yodl. Therefore, if you put two consecutive newlines in
the definition itself, the definition will again trigger the PARAGRAPH
macro, etcetera, ad infinitum. If you want the PARAGRAPH
redefinition to
insert a blank line, protect the line in a NOEXPAND
, as in:
DEFINEMACRO(PARAGRAPH)(0)(NOEXPAND( )<p>)
Please send Yodl questions and comments to yodl@icce.rug.nl.
Please send comments on these web pages to (address unknown)
Copyright (c) 1997, 1998, 1999 Karel Kubat and Jan Nieuwenhuizen.
Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.