From: Trémouilles D. <dav...@gm...> - 2012-08-08 20:54:30
|
Thank you very much Peter :-) I'm going to test... David Le 08/08/12 12:59, Peter Würtz a écrit : > > Peter Würtz wrote: >> >> David Trémouilles wrote: >>> Is there any reason that the generated figure could not be used with >>> pdflatex ? >>> >> The PGF pictures should work with pdflatex, xelatex and lualatex alike. >> Xelatex (or lualatex) must be installed though because I use it for >> obtaining the font metrics when the figure is created. In principle I >> could use pdflatex for this as well, I just saw no reason to use it >> anymore when I learned about the newer implementations. >> > Ok, the latest commit now allows you to rely on pdflatex only. Xelatex is > still the default, but you can change that using the rc parameters: > > matplotlib.rcParams.update({ > "font.family": "serif", > "pgf.texsystem": "pdflatex", > "pgf.preamble": [r"\usepackage{siunitx}", > r"\usepackage{somefontpackage}"], > }) > > System fonts specified in the rc parameters will be ignored since pdflatex > cannot use them. Font metrics will be obtained from a pdflatex process. If > you save the figure as pdf, pdflatex will be used to compile the figure. > > Hope this helps. |