JDMCreator / LaTeXTableEditor

readme
MIT License
139 stars 13 forks source link

Math in table entries for PreTeXt output #3

Closed rbeezer closed 6 years ago

rbeezer commented 6 years ago

If I put x^2 into a table entry, having set it as an "equation", the PreTeXt output is

<m>x<circumflex />2</m>

Mostly, the LaTeX used in an entry should just pass through without any adjustment. Two exceptions are that < and > should be converted to \lt and \gt (respectively), since these two macros are always used correctly by PreTeXt, while the bare angle brackets will confuse the XML processor.

JDMCreator commented 6 years ago

Confirmed. However, I think it is better to convert < and > to \lt{} and \gt{} to avoid issues with spaces.

davidfarmer commented 6 years ago

Not sure what issues with spaces you refer to. Isn't is just as good (therefore better) to convert ">" to "\gt " and "<" to "\lt "?

JDMCreator commented 6 years ago

I forgot that whitespaces are ignored in math mode and you have to use \[SPACE] to insert a normal space. Therefore, \lt[SPACE] and \gt[SPACE] are better. Thank you for your correction.

JDMCreator commented 6 years ago

I just read in your documentation that & should also be converted to \amp in mathmode. I'll fix that also.