<latex>
– LaTeX codecode
desperate
"true"
or "false"
(default) – element for last phase of
production?
Possible Contents: Arbitrary.
Description:
This is some sort of emergency command: It inserts code
if we're
producing LaTeX output, and interprets the element's contents else.
It's totally ignored if desperate
is "true"
.
As an example I mention here the definition of the tbook predefined
entity `&LaTeX;
':
<!ENTITY LaTeX "<latex code='\LaTeX{}'>LaTeX</latex>">
Then &LaTeX;
prints a neat LaTeX logo in all
outputs.1
The contents of this element is tbook code, no HTML code!
The idea behind desperate
is that the transformation
tbook => LaTeX can be forced to interpret even
<latex>
'es with desperate="true"
if a special XSLT
parameter called desperate-measures is set to true,
see XSLT parameters. Have a look at an example:
<latex code="\newpage" desperate="true"/>
This is usually done in the very last phase of production, maybe for having better page breaks like in this example. Normally it is totally ignored, but if you call the LaTeX transformation with
tbtolatex mybook desperate-measures=true
the (hopefully) optimising page breaks are applied.