css - text-overflow:ellipsis with MathJax? -
is possible text-overflow:ellipsis
work mathjax?
here (non-working) example (on jsfiddle
)
the html:
<!doctype html> <script src="http://cdn.mathjax.org/mathjax/latest/mathjax.js?config=tex-ams-mml_htmlormml"></script> <div id="test"> \[ \text{2014-01-05} \quad \begin{cases} \text{lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum} \\ \text{lorem ipsum} \\ \text{lorem ipsum} \\ \end{cases} \] </div> <div id="test"> lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum </div>
and css:
#test{ display: inline-block; width: 20em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
as can see, text-overflow:ellipsis
works div
without mathjax content not div
mathjax content. there solution or workaround?
there no way of making work.
while the mathml spec provides 2 comparable values overflow
-- truncate
, elide
-- neither 1 implemented in mathjax yet.
on bright side, linebreaking supported display-style mathematics.
addendum: restrictions apply. not linebreaking methods supported; in particular, linebreaking within token elements , alignment options not supported.
Comments
Post a Comment