Make .plot files mathtext-compatible
This merge request aims to change the labels in all .plot files under analyses/ to make them compatible with mathtext, which is a subset of LaTeX that matplotlib can parse. This is for the upcoming switch of the plotting backend from pstricks to matplotlib. No major (hopefully any) changes to the output in the plots, even when using the current plotting backend, should be seen.
Fixed issues
- Changed
\textto\mathrm. - Added curly braces to spots where it is missing from
\frac,\sqrt,\text. - Changed
\geto\geq,\leto\leq. - Fixed edge cases where converting
\textto\mathrmdoes not work. - Remove
^from\perp^in analyses/pluginCMS/CMS_2014_I1305624.plot. - Replace
\unitand\siwith alternatives, e.g.,\unit{10}{\GeV}is converted to10~\GeV. - Spaces inside former
\textcommands have been replaced by a~, since\mathrmignores spaces while\textdoes not. - Enclose LaTeX commands such as
\%with $ (i.e. math mode). Otherwise, mathtext will interpret\as plain text. - Replace deprecated
\rmcommand with\mathrm - Remove superfluous
}in some labels that caused LaTeX syntax errors
Remaining issues
-
\microin LaTeX will give the same output as$\mathrm{\mu}$in mathtext. However,$\mathrm{\mu}$in LaTeX will give a non-sensical output. This can therefore not be changed until the backend has been switched completely to mathtext. -
\largehas no equivalent command in mathtext. Instead, one must pass afontsizeparameter to matplotlib. The details for how such a parameter should be passed to matplotlib has not been decided yet. As such, this cannot be changed for now.
Commands that will not be converted
\GeV, \TeV, \pt and \pT, and potentially some other commonly used simple commands (\PQt?) will not be converted to something else in this merge request. The idea is instead to preprocess each label before it is passed to matplotlib and replace these commands with something that can be parsed by mathtext.
Edited by Simon Thor