It can be convenient to have the possibility to distinguish the behaviour of the source file when processed by LATEX or by HTML. This can be done by defining specific environments, as:
and
.
or by commands, as:
and .
Warning: This latter commands are only intended for very short arguments (e.g. some words) inside the brace pairs.
Here is an example of the syntax for conditional environments:
This will be printed only by LaTeX
This will be printed only by LaTeX2HTML
Here is an example of the syntax for conditional in-line commands:
this will be printed only by LaTeX
this will be printed only by LaTeX2HTML
Warning (BUG): Even if these two types of conditional environment seem to be well-behaved for simple commands (like text input), they fail fro more complex command. For instance if you want to define a different text-size for screen and paper version, the following sequence does not work:
The "latexonly" part is not taken into account. In the same way, the following sequence does not work properly:
The "html" sequence is not taken into account. However, the following sequence has been found to work: