Hi,
I use the text.latex.preamble rc setting to customize my plots.
Everything works fine. However, a comma in this rc setting is
interpreted as a new-line, thus, I wonder how can I create a LaTeX
preamble that contains a comma? The statement
matplotlib.rcParams['text.latex.preamble']=r"\usepackage[garamond,sfscaled=false]{mathdesign}"
will produce a preamble with the two lines
\usepackage[garamond
sfscaled=false]{mathdesign}
Which is not what I desire.
Regards,
Heiko
···
--
-- Talente finden Lösungen, Genies entdecken Probleme.
-- (Hans Krallsheimer)
-- Cluster Computing @ http://www.clustercomputing.de
-- Heiko Bauke @ http://www.mpi-hd.mpg.de/personalhomes/bauke
Hi Heiko,
in the matplotlibrc I read:
#text.latex.preamble :
# IMPROPER USE OF THIS FEATURE WILL LEAD TO LATEX FAILURES
# AND IS THEREFORE UNSUPPORTED. PLEASE DO NOT ASK FOR HELP
# IF THIS FEATURE DOES NOT DO WHAT YOU EXPECT IT TO.
# preamble is a comma separated list of LaTeX statements
# that are included in the LaTeX document preamble.
Therefore it is assumed (in the rcsetup.py) that the given string needs to be
devided into sub-strings, which are separated by commas. For your particular
case - in my opinion - the solution is to provide a list of string(s) instead
of a string
matplotlib.rcParams['text.latex.preamble']=[r"\usepackage[garamond,sfscaled=false]
{mathdesign}"]
Kind regards,
Matthias
···
On Tuesday 02 March 2010 22:24:30 Heiko Bauke wrote:
Hi,
I use the text.latex.preamble rc setting to customize my plots.
Everything works fine. However, a comma in this rc setting is
interpreted as a new-line, thus, I wonder how can I create a LaTeX
preamble that contains a comma? The statement
matplotlib.rcParams['text.latex.preamble']=r"\usepackage[garamond,sfscaled=
false]{mathdesign}"
will produce a preamble with the two lines
\usepackage[garamond
sfscaled=false]{mathdesign}
Which is not what I desire.