Speech-Rule-Engine / speech-rule-engine

Generating speech descriptions for XML structures
https://zorkow.github.io/speech-rule-engine/
Apache License 2.0
73 stars 39 forks source link

data-semantic-speech for image alt unexpectedly cut off after semicolon #730

Open pkra opened 10 months ago

pkra commented 10 months ago

E.g., \\img[][115pt][114pt][hello; world]{Images/tikz.svg} (using https://github.com/pkra/mathjax-img/)

Before enrichment, I get src="Images/tikz.svg" alt="hello; world".

After enrichment, src="Images/tikz.svg" alt="hello; world" [...] data-semantic-attributes="ext-speech:hello; world" data-semantic-postfix="image" data-semantic-speech="hello"

pkra commented 10 months ago

The original full example was something like

\begin{equation} 
x = 
\vcenter{\img[][115pt][114pt][{\begin{tikzpicture} \draw(-2,0) -- (2,0); \filldraw[gray] (0,0) circle (2pt); \draw(-2,-2) .. controls (0,0) .. (2,-2); \draw(-2,2) .. controls (-1,0) and (1,0) .. (2,2); \end{tikzpicture}}]{Images/tikz.svg}}
 \cssId{tikzPic}{\tag{19}} 
\end{equation}