
On 7/14/2025 12:44 AM, Matthias Weber wrote:
Hello again,
When providing an alt-text for images like so (which works for PDFs):
\setupexternalfigures[location=default]
\setupbackend[export=yes,xhtml=yes]
\setupinteraction [state=start]
\starttext
\startchapter[title=Example] \startsection[title={Section}]
\placefigure {} {\externalfigure[hacker.jpg][ label={Look, a $e^{\pi i}+1=0$ hacker!}] }
\stopchapter
\stoptext
the figure becomes in the HTML export
<div class="float figure method-here" id="aut-3"> <div class="floatcontent"><div class="image label-Look, a $e^{\\\\pi i}+1=0$ hacker!" id="export-example-image-1" image="export-example-image-1"><!--empty--></div></div> <div class="floatcaption"><div class="floatlabel figure">Figure </div><div class="floatnumber figure">1.1</div></div> </div>
How do I turn this into an ALT text in the HTML? Or how do I have to provide the Alt text correctly? And what do I do about Alt texts that contain math? The \\\\pi looks a little strangeā¦
labels actually end up as class entry which is what labels were for: identifier so we have to reconsider using label and find another key instead, like 'comment' or 'description' or so, something that is not yet used as we might need it in more places .. maybe comment is best left for something not interpred so 'description' could work ... given wolfgangs blessing adding it to the export is a few lines (escaping is a different discussion) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------