2021-11-30 17:46 UTC, Cyrille Piatecki:
>
> Thanks John. But LatexExpr(r"\text{there"'"s a way} x_i =")
> generates a mistake.
John's suggestion was that a string that contains
both single-quote and double-quote characters
can be enclosed by tripled delimiters, using
either '''...''' or """...""".
More examples:
LatexExpr(r"\text{there's a way } x_i =")
LatexExpr(r'''\text{there's a way } y' + y" = 0''')
LatexExpr(r"""\text{there's a way } y' + y" = 0""")
See more on strings, also known as "text sequences",
in the Python documentation for built-in types:
https://docs.python.org/3/library/stdtypes.html#textseq