LatexExpr and apostrophe
How to type set apostrophe in this context
show(LatexExpr(r'\text{L' élément}'))
obviously connot work. (I hope not to have already ask the question but I do not know how to find the answer)
Use double quotes?
If you don't want to use double quotes, then you can "escape" the single quote with a backslash. This means not using the "r" prefix for the string, so that a backslash can still serve as an escape:
LatexExpr('\\text{L\'élément}')
.Another option is to use triple quotes:
LatexExpr(r'''\text{L'élément}''')
orLatexExpr(r"""\text{L'élément}""")
. These are useful if you want to use both'
and"
in the string.