@@ -52,21 +52,30 @@ matplotlibrc use::
5252
5353Here is the standard example, `tex_demo.py `:
5454
55- .. literalinclude :: ../mpl_examples/pylab_examples/tex_demo.py
55+ .. literalinclude :: ../mpl_examples/pylab_examples/tex_demo.py
5656
5757.. image :: ../_static/tex_demo.png
5858
5959Note that display math mode (``$$ e=mc^2 $$ ``) is not supported, but adding the
6060command ``\displaystyle ``, as in `tex_demo.py `, will produce the same
6161results.
6262
63+ .. _usetex-unicode :
64+
65+ usetex with unicode
66+ ===================
6367It is also possible to use unicode strings with the LaTeX text manager, here is
6468an example taken from `tex_unicode_demo.py `:
6569
66- .. literalinclude :: ../mpl_examples/pylab_examples/tex_unicode_demo.py
70+ .. literalinclude :: ../mpl_examples/pylab_examples/tex_unicode_demo.py
6771
6872.. image :: ../_static/tex_unicode_demo.png
6973
74+ .. _usetex-postscript :
75+
76+ Postscript options
77+ ==================
78+
7079In order to produce encapsulated postscript files that can be embedded in a new
7180LaTeX document, the default behavior of matplotlib is to distill the output,
7281which removes some postscript operators used by LaTeX that are illegal in an
@@ -77,50 +86,59 @@ activated by changing the ``ps.usedistiller`` rc setting to ``xpdf``. This
7786alternative produces postscript with text that can be edited in Adobe
7887Illustrator, and searched text in pdf documents.
7988
89+ .. _usetex-hangups :
90+
91+ Possible hangups
92+ ================
93+
94+ * On Windows, the PATH environment variable may need to be modified to
95+ find the latex, dvipng and ghostscript executables. This is done by
96+ going to the control panel, selecting the "system" icon, selecting
97+ the "advanced" tab, and clicking the "environment variables" button
98+ (and people think Linux is complicated. Sheesh.) Select the PATH
99+ variable, and add the appropriate directories.
80100
81- = Possible Hangups =
101+ * Using MiKTeX with Computer Modern fonts, if you get odd -Agg and PNG
102+ results, go to MiKTeX/Options and update your format files
82103
83- * On Windows, the PATH environment variable may need to be modified to find
84- the latex, dvipng and ghostscript executables. This is done by going to the
85- control panel, selecting the "system" icon, selecting the "advanced" tab,
86- and clicking the "environment variables" button (and people think Linux is
87- complicated. Sheesh.) Select the PATH variable, and add the appropriate
88- directories.
104+ * The fonts look terrible on screen. You are probably running Mac OS,
105+ and there is some funny business with dvipng on the mac. Set
106+ text.dvipnghack : True in your matplotlibrc file.
89107
90- * Using MiKTeX with Computer Modern fonts, if you get odd -Agg and PNG
91- results, go to MiKTeX/Options and update your format files
108+ * On Ubuntu and Gentoo, the base texlive install does not ship with
109+ the type1cm package. You may need to install some of the extra
110+ packages to get all the goodies that come bundled with other latex
111+ distributions.
92112
93- * The fonts look terrible on screen. You are probably running Mac OS, and
94- there is some funny business with dvipng on the mac. Set text.dvipnghack :
95- True in your matplotlibrc file.
113+ * Some progress has been made so Matplotlib uses the dvi files
114+ directly for text layout. This allows latex to be used for text
115+ layout with the pdf and svg backends, as well as the \* Agg and PS
116+ backends. In the future, a latex installation may be the only
117+ external dependency.
96118
97- * On Ubuntu and Gentoo, the base texlive install does not ship with the
98- type1cm package. You may need to install some of the extra packages to get
99- all the goodies that come bundled with other latex distributions.
119+ .. _usetex-troubleshooting :
100120
101- * Some progress has been made so Matplotlib uses the dvi files directly for
102- text layout. This allows latex to be used for text layout with the pdf and
103- svg backends, as well as the \* Agg and PS backends. In the future, a latex
104- installation may be the only external dependency.
121+ Trouble shooting
122+ ================
105123
106- = In the event that things dont work =
107- * Try deleting `tex.cache ` from your `~/.matplotlib ` directory
124+ * Try deleting `tex.cache ` from your `~/.matplotlib ` directory
108125
109- * Make sure LaTeX, dvipng and ghostscript are each working and on your PATH.
126+ * Make sure LaTeX, dvipng and ghostscript are each working and on your PATH.
110127
111- * Make sure what you are trying to do is possible in a LaTeX document, that
112- your LaTeX syntax is valid and that you are using raw strings if necessary
113- to avoid unintended escape sequences.
128+ * Make sure what you are trying to do is possible in a LaTeX document,
129+ that your LaTeX syntax is valid and that you are using raw strings
130+ if necessary to avoid unintended escape sequences.
114131
115- * Most problems reported on the mailing list have been cleared up by
116- upgrading Ghostscript _. If possible, please try upgrading to the latest
117- release before reporting problems to the list.
132+ * Most problems reported on the mailing list have been cleared up by
133+ upgrading Ghostscript _. If possible, please try upgrading to the
134+ latest release before reporting problems to the list.
118135
119- * The text.latex.preample rc setting is not officially supported. This option
120- provides lots of flexibility, and lots of ways to cause problems. Please
121- disable this option before reporting problems to the mailing list.
136+ * The text.latex.preample rc setting is not officially supported. This
137+ option provides lots of flexibility, and lots of ways to cause
138+ problems. Please disable this option before reporting problems to
139+ the mailing list.
122140
123- * If you still need help, please see :ref: `reporting-problems `
141+ * If you still need help, please see :ref: `reporting-problems `
124142
125143.. _LaTeX : http://www.tug.org
126144.. _dvipng : http://sourceforge.net/projects/dvipng
0 commit comments