According to the format of the output file, the macro package defines a given symbol: The defined symbol can be tested in a document to determine the conversion type. Furthermore, the package defines the following macros to send litteral text (commands in the output format) to the output file:

The above commands can be used to quickly implement a macro. E.g., the macro package implements the it macro (which starts an item in a list) as:

DEFINEMACRO(it)(0)(\ 
        latexcommand(\item )\ 
        htmlcommand(<li> )\ 
        ....)

Depending on the output format, it() will lead to one of the above expansions.

The above described formatcommand() macros are implemented to send not further expanded strings (i.e., commands) to the output. The macro package also implements whenformat() macros to send any text, which is then subject to further expansion. These when...() macros are:

Note again that the difference between the whenformat() macros and the formatcommand() macros is, that the former will expand their argument while the latter will not. As an example, consider the following code fragment:

You are now reading
        whenlatex(a LaTeX-generated 
                  footnote(LaTeX is a great 
		           document language!)
                  document)
        whenhtml(a HTML document via your
                 favorite browser)

The whenformat() macros are used here to make sure that the arguments to the macros are further expanded; this makes sure that the footnote macro in the whenlatex block gets treated as a footnote.


Go back to index of Yodl.

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.


This page was built from Yodl-1.31.18 by

<(address unknown)>, Thu Jan 19 00:17:16 2006 MSK.