Skip to content

Fix support for empty usetex strings. #16410

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
wants to merge 1 commit into from

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Feb 4, 2020

Currently, figtext(.5, .5, "%foo", usetex=True) results in an obscure
exception (FileNotFoundError: No such file or directory: blah.dvi).

Fix that by forcing tex to always generate a page, by inserting at least
an empty \hbox{}.

Closes #16409.

Edit: looks like this shifts some tex strings a tiny bit, but I already have another patch which shifts them more -- specifically, a followup to #16373 which actually gives correct baselines even without using tex.latex.preview. So I'll just wait for that.

PR Summary

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

@anntzer anntzer added this to the v3.3.0 milestone Feb 4, 2020
@anntzer anntzer changed the title Improve error arising from fully commented-out TeX strings. Fix support for empty usetex strings. Feb 5, 2020
Currently, `figtext(.5, .5, "%foo", usetex=True)` results in an obscure
exception (`FileNotFoundError: No such file or directory: blah.dvi`).

Fix that by forcing tex to always generate a page, by inserting at least
an empty \hbox{}.
@QuLogic
Copy link
Member

QuLogic commented Mar 10, 2020

Which PR is this waiting for?

@anntzer
Copy link
Contributor Author

anntzer commented Mar 10, 2020

#16476 (sorry forgot to update the original text), but I guess I should combine both into a single PR for the usual image updating reasons.

@anntzer
Copy link
Contributor Author

anntzer commented Mar 10, 2020

included into #16476 (as first commit)

@anntzer anntzer closed this Mar 10, 2020
@anntzer anntzer deleted the emptytex branch March 10, 2020 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Confusing error on fully commented-out usetex strings
2 participants