Skip to content

Latex cache error when building docs #7423

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

Closed
choldgraf opened this issue Nov 8, 2016 · 13 comments
Closed

Latex cache error when building docs #7423

choldgraf opened this issue Nov 8, 2016 · 13 comments

Comments

@choldgraf
Copy link
Contributor

choldgraf commented Nov 8, 2016

To help us understand and resolve your issue please check that you have provided
the information below.

On the master branch, MacOSX. I'm trying to build the matplotlib docs. I'm running into a strange latex error when building docs:

RuntimeError: dvipng was not able to process the following file:
/Users/choldgraf/.matplotlib/tex.cache/c1d089b6baf6a9ebfc28a7497a9f3957.dvi

I've tried deleting this folder, and the error still comes up. I installed latex via the mini mactex package. Any ideas what's going on?

Extra tex packages I had to install (via texlive):

  • dvipng
  • ucs
@tacaswell
Copy link
Member

Can you look what is in the file?

@choldgraf
Copy link
Contributor Author

it's a binary file when opening in a text editor. Using dvipdf to convert to PDF works but seems to output just a blank pdf.

Here's the tex that generates that dvi file:

\documentclass{article}
\usepackage{type1cm}



\usepackage{textcomp}


\usepackage[papersize={72in,72in},body={70in,70in},margin={1in,1in}]{geometry}
\pagestyle{empty}
\begin{document}
\fontsize{10.000000}{12.500000}{\rmfamily $0.0$}
\end{document}

@QuLogic
Copy link
Member

QuLogic commented Nov 8, 2016

Sounds like the problem in #6393; @WeatherGod can you elaborate on what's wrong / missing in the LaTeX install?

@choldgraf Can you run any of latex, pdflatex, pdftex, lualatex, luatex, etc., on that file without error, and is it viewable?

@QuLogic
Copy link
Member

QuLogic commented Nov 8, 2016

@choldgraf Actually, that file uses a huge paper size; I ran it and the text is really tiny if zoomed out to fit the whole page. Maybe something is really there in the top-left?

@choldgraf
Copy link
Contributor Author

ah yeah, good catch. I see a 0.0 in the upper left if I zoom in a bunch. I generated the pdf by using dvipdfm c1d089b6baf6a9ebfc28a7497a9f3957.dvi

@QuLogic
Copy link
Member

QuLogic commented Nov 8, 2016

But does dvipng work on the file, too?

@WeatherGod
Copy link
Member

@QuLogic, the error message in the other issue is one that @mdboom and I added to _png.cpp to account for anomalous PNG reads. Essentially, a read went awry, but no exception message was left in the cpython interface, which is kind of like an unhandled exception in libpng or something.

@choldgraf
Copy link
Contributor Author

I'm not sure what dvipng is. At least, I don't have it on my path.

@tacaswell
Copy link
Member

That would explain why it failed :-p

We are being too aggressive translating errors coming from system process calls.

dvipng typically comes from your latex installation and we use it to convert math -> tex -> dvi -> png which we can then embed in a raster graphics if you want to use latex for text rendering.

@choldgraf
Copy link
Contributor Author

so....what should I do? re-install latex or something?

@QuLogic
Copy link
Member

QuLogic commented Nov 10, 2016

You should be able to install packages with the mactex utilities. Not sure if it's in the mini install or what the right package is (try dvipng, probably), but hopefully a full reinstall should not be necessary.

@choldgraf
Copy link
Contributor Author

Ah ok - I installed dvipng and it now errors on another missing package. I'll install these as needed with the texlive program. Will keep a list above for future ref.

@choldgraf
Copy link
Contributor Author

Uninstalling my tex distribution and re-installing the full mactex distribution made this work for me, so I'm closing. Kinda sucks that you have to install a 5GB latex distribution in order to build the docs, but I guess that's the only (easy) option to build the latex examples.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants