rst2pdf uses matplotlib optionally to do that, replicate with weasyprint[1]? https://sourceforge.net/projects/matplotlib/ https://rst2pdf.org/static/manual.html#mathematics Or figure out styling in rst2pdf? [1] But it does seems matplotlib just calls latex https://matplotlib.org/stable/gallery/text_labels_and_annotations/tex_demo.html