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.

So in order to get the font metrics right you should tell the backend which
fonts you are going to use later. You need to disable the default font
configuration that uses the system fonts specified in the matplotlib rc
paramteres and fully configure the latex environment using your own
preamble. This can be done using the rc parameters:

matplotlib.rcParams.update({
  "pgf.rcfonts": False,
  "pgf.preamble": [r"\usepackage{siunitx}",
r"\usepackage{somefontpackage}"],
})

I never thought about it, but if there interest in using this with pdflatex
I could add this as an option. It might just be a little bit confusing since
the font setup will be different when switching from xelatex to pdflatex due
to its limitations.
-- 
View this message in context: 
http://old.nabble.com/Asking-for-code-review%3A-Xelatex---PGF-backend-tp34263853p34270497.html
Sent from the matplotlib - devel mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to