Fix: Break line properly into latex when next line starts with `_`
Description
After this MR the slurm profile name was changed from 'slurm_prof_t230419_133346.736582_0'
to 'slurm_prof_230419_133346.736582_0'
this lead to a pdflatex error while creating the reports for DSSC dark and correct.
After the MR suggestions, the tex_escape and split_len have been swapped around while converting the parameter values.
How Has This Been Tested?
This was tested with DSSC dark and correct reference runs.
Relevant Documents (optional)
Types of changes
- Bug fix (non-breaking change which fixes an issue)
Checklist:
- My code follows the code style of this project.
- I have updated the documentation accordingly.
Reviewers
Merge request reports
Activity
changed milestone to %3.11.0
added Waiting for review label
assigned to @ahmedk
Thanks for figuring that out. It looks like there's also a function
tex_escape()
which also includes replacing'_'
with'\_'
, but it's called before thesplit_len()
function, so it gets split between the\
and_
.I wonder if a neater fix is to swap the order round, so we do
split_len()
first and thentex_escape()
? There are other escapes which are even longer, e.g.'\textasciitilde{}'
, and I imagine splitting in the middle of those would also be a problem.Please feel free to make an issue for this idea, but this seems somewhat required if we want to deploy today without reverting !871 (merged), so I'd take this solution for now.
LGTM.
added 3 commits
-
2a9d9549...563b80eb - 2 commits from branch
master
- 7c581a3a - break line properly into latex when next line starts with
-
2a9d9549...563b80eb - 2 commits from branch
added 9 commits
-
86954632...b3e11b25 - 6 commits from branch
master
- 393dfd06 - break line properly into latex when next line starts with
- 70da8615 - switch tex_excape with split_len for converting value to latex
- 58abee45 - update the docstring with corrected example
Toggle commit list-
86954632...b3e11b25 - 6 commits from branch
enabled an automatic merge when the pipeline for 3637c471 succeeds
mentioned in commit b0d753ed