@@ -1097,18 +1097,20 @@ def convert_psfrags(tmpfile, psfrags, font_preamble, custom_preamble,
10971097 with mpl .rc_context ({
10981098 "text.latex.preamble" :
10991099 mpl .rcParams ["text.latex.preamble" ] +
1100- r"\usepackage{psfrag,color}"
1101- r"\usepackage[dvips]{graphicx}"
1102- r"\PassOptionsToPackage{dvips}{geometry}" }):
1100+ r"\usepackage{psfrag,color}" "\n "
1101+ r"\usepackage[dvips]{graphicx}" "\n "
1102+ r"\geometry{papersize={%(width)sin,%(height)sin},"
1103+ r"body={%(width)sin,%(height)sin},margin=0in}"
1104+ % {"width" : paper_width , "height" : paper_height }
1105+ }):
11031106 dvifile = TexManager ().make_dvi (
1104- r"\newgeometry{papersize={%(width)sin,%(height)sin}, "
1105- r"body={%(width)sin,%(height)sin}, margin={0in,0in} }" "\n "
1106- r"\begin{figure} "
1107- r"\centering\leavevmode %(psfrags)s"
1108- r"\includegraphics*[angle=%(angle)s]{%(epsfile)s}"
1107+ " \n "
1108+ r"\begin{figure }" "\n "
1109+ r" \centering\leavevmode" " \n "
1110+ r" %(psfrags)s" " \n "
1111+ r" \includegraphics*[angle=%(angle)s]{%(epsfile)s}" " \n "
11091112 r"\end{figure}"
11101113 % {
1111- "width" : paper_width , "height" : paper_height ,
11121114 "psfrags" : "\n " .join (psfrags ),
11131115 "angle" : 90 if orientation == 'landscape' else 0 ,
11141116 "epsfile" : pathlib .Path (tmpfile ).resolve ().as_posix (),
0 commit comments