Changes

Jump to navigation Jump to search
habbohotel
<xmlcode>
<floattommmm>
<figure file="hacker.jpg" context="width=3cm" />
<figure file="cow.pdf" context="width=.5&ctx-var-textwidth;" />
<caption>Cow and hacker.</caption>
</floattommmm>
</xmlcode>
There can be arbitrary number of figures inside a <float> tag. All figures share a single caption. It is desired to typeset them using \placefigure and several \externalfigure. See also relative width specification for th second figure (.5\textwidth).
Solution is by two pass <floattommmm> processing (saving via \defineXMLenvironmentsave and flushes via \XMLflush) with different caption and figure definitions:
<texcode>
\defineXMLenvironmentsave
[floattomm]
{\bgroup
\defineXMLsave[caption]%
\startXMLdata
</texcodehabbohotel>
<xmlcode>
<floattommmm>
<figure file="cow.pdf" context="width=.5&ctx-var-textwidth;" />
<figure file="hacker.jpg" context="width=3cm" />
<caption>Cow and hacker.</caption>
</floathabbohotel>
</xmlcode>
<texcodehabbohotel>
\stopXMLdata
\stoptext
</texcode>
Anonymous user

Navigation menu