shower_containment_depth_90/95 title crashes LaTeX rendering (unescaped %) #81
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
giant analyze renderfails onshower_containment_depth_90/shower_containment_depth_95because theirfigure title contains a literal
%character, which LaTeX treats as a comment marker:giant/analysis/catalog.py:637(_containment_finalize):quantile:.0%formats to e.g.90%, so the title text becomes literally...(90% of...).render.pypasses this straight to
ps.new_figure(..., title=...)(giant/analysis/render.py), which does not escapeit before handing it to matplotlib's
usetexpipeline, so LaTeX chokes:This aborts
render_all's loop entirely — sincereduced_dir.glob("*.json")is processed in sortedfilename order and these two ids sort in the middle of the alphabet, every plot whose id sorts after them
(e.g.
species_edep_share,type_embedding_l1_distance) silently never gets rendered in the same run.Found while doing the gitea #77 end-to-end verification (multi-rollout
analyzerender), but this ispre-existing on
master— the title text is unchanged by that work, and the existingtest_render.pysmoke tests never exercise it because they use synthetic titles instead of the real catalog ones.
Repro: run the full
giant analyzepipeline (prep→compute-onefor every catalog id →render)against any rollout/reference pair and watch
render_alldie partway through theshowerfamily.Likely fix: escape
%(and any other LaTeX-special character) inReduced.title/xlabelbefore handingit to
ps.new_figure, e.g. replacing a raw%with an escaped\%. Worth checking whetherplotstyle'snew_figure/_set_figure_titleshould be escaping title/subtitle text itself, since any future catalogtitle with a literal
%,&,#, etc. will hit the same failure mode (the LaTeX log shows "First Aid forunderscore.sty" was already needed, so
_is handled —%apparently isn't).