Closed MatthiasJakobs closed 6 months ago
Thanks for this PR!
The problem occurs whenever you add formulas to treatment names right, e.g. treatment $x_k$
, right?
I'm wondering if a better solution was to change the regex such that it only escapes underscores outside of formulas, without any need for the user to choose whether underscores are escaped. What do you think?
Yes, I've encountered the problem when I wanted to have treatment names such as Method$_{p=0.5}$, Method$_{p=0.6}$
etc. I think your proposed solution should get rid of that problem (and for most cases in which you would want to escape underscores, for that matter).
Thanks for your feedback! This feature is now merged into the main branch with PR #7
I had the usecase where some latex formulas were not rendered correctly due to escaping the underscore character. As a workaround, I propose to make the escaping optional, with it being turned on by default.