New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
comment on http://matplotlib.org/users/pgf.html#pgf-tutorial - minor issue with xits font #1500
Comments
I think the problem with XITS Math is that the debian package doesn't place the font in a folder where it can be found by the OS. One of the ideas behind Xe/Lua-Latex is to use the opentype fonts known to the OS as any other application does. I assume when opening a font-selection dialog of your choice (say inkscape), you won't find XITS or XITS Math there. You can get a list of non-bitmap fonts available to XeTeX via fontconfig It appears to be a matter of using the fonts from the latex-distribution versus using the fonts from the system. I find this very confusing since I had the feeling that the majority of the unicode-math posts and introductions I found used |
Ah, since you brought up lualatex.. Do you see any difference in the behaviour of xelatex and lualatex concerning the use of "XITS Math"? Does lualatex recognize the font by its name in contrast to xelatex? |
Hi Peter, On Thu, 15 Nov 2012, Peter Würtz wrote:
Yes, lualatex works with your example with no changes. As I mentioned, you
to get the backend to use lualatex. The problem is with xelatex. I hope
|
Hi Peter, On Thu, 15 Nov 2012, Peter Würtz wrote:
Thanks for replying. I know almost nothing about fonts myself (I'm just a If I understand your posting correctly, then you are saying that TeX Live fc-list does not give me XITS here either. BTW, the Debian fontconfig package here /usr/bin/fc-cat This answer by Khaled Hosny XITS font not found on OS
suggests that LuaTeX has capabilities in this area that XeTeX lacks. I suggest you leave your example as it is, and just mention, like in a
with
or alternatively, use lualatex instead. Perhaps also point to this issue. If you want further clarification on this issue, you could do worse than Finally, thanks very much for your work on the PGF backend. I am a long Anyway, when I noticed matplotlib had got a TikZ backend in 1.2 I decided
|
For me adding the fonts to /etc/fonts/local.conf solved the problems. I added the following to that file:
and ran sudo fc-cache -f -v This solved the issue for me on Ubuntu 12.10 using a local texlive2012. If you adapt this to the dir of your texlive fonts I guess that it should resolve the issue for you too. |
On Thu, 15 Nov 2012, Jens H Nielsen wrote:
Hi Jens. Thanks for your reply, but I don't want a local workaround for this issue. \setmathfont{xits-math.otf} in this case if it is necessary. |
I see your point but perhaps both types of workarounds should be added to the documentation. A third workaround Note that indexing the fonts have the additional advantage that they are available to other programs too. I.e. I can use the Texlive fonts directly in Inkscape. |
Hi Jen, On Thu, 15 Nov 2012, Jens H Nielsen wrote:
Sure. I think it is a good idea to document different kinds of
I think TeX Live does not make the fonts available to the system. It seems
That is true. The reason is that Debian packaging is entirely volunteer,
Good point. |
Although I personally prefer the idea of addressing fonts by their name instead of filenames and the option of using them in inkscape as well, the official unicode-math documentation also uses "xits-math.otf" instead of "XITS Math". This is probably due to the fact that xelatex is missing the feature of finding fonts in the tex tree by name. With lualatex supporting this feature, this convention might change in the (far?) future, but for now I think it's best to follow Faheem's proposal. Thanks for pointing this out and saving users a lot of headaches ;). |
Hi Peter, On Fri, 16 Nov 2012, Peter Würtz wrote:
You're welcome. Thanks for the changes. They look good.
|
Ah, thanks for reminding! Closing the issue. |
hi guys, what do I have to add to the code you pasted here (and which is also available on the official matplotlib docs to actually save or show my plot? |
Just |
thank you :) though I did find that out in the mean time. If you would forgive the OT - I am still having trouble with tight_layout and pgf. You suggested a fix here - but that didn't work (as I detailed in my comment). Could you help me out? (running matplotlib-1.3.0). |
I have a comment on http://matplotlib.org/users/pgf.html#pgf-tutorial,
which has a minor issue with fonts. Specifically, the example below does
not work with my machine - Debian squeeze, Tex Live 2012 backported from
unstable, matplotlib 1.2 backported from unstable.
Rc parameters that control the behavior of the pgf backend:
[...]
pgf.texsystem Either “xelatex”, “lualatex” or “pdflatex”
It is worth mentioning the default is (it seems) "xelatex".
does not work with xelatex, at least for me, and possibly not for anyone
using Tex Live. See for example
http://tex.stackexchange.com/questions/50381/xelatex-and-unicode-math-problems
and
http://tex.stackexchange.com/questions/82113/subscript-is-set-too-low-in-math-mode-with-xits-math
It seems xelatex expects something like
I'm not sure why. In any case, I had to make a change to make this example
work. First, I have the original example, and then my changed version.
HERE IS THE ORIGINAL EXAMPLE. SUGGESTED CHANGES FOLLOW.
Option 1:
Add the line
to the
pgf_with_custom_preamble dict
. I.e. switch to lualatex. OrOption 2:
Replace
with
The text was updated successfully, but these errors were encountered: