Skip to content
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

Unsatisfactory display of latex formula in pdf exports #21

Closed
luis-r-izquierdo opened this issue Nov 18, 2019 · 8 comments
Closed

Unsatisfactory display of latex formula in pdf exports #21

luis-r-izquierdo opened this issue Nov 18, 2019 · 8 comments
Labels
bug Something isn't working export formats related to export formats produced by Pressbooks third party related to third party tools, services, integrations or plugins

Comments

@luis-r-izquierdo
Copy link

In some cases (see MWE below), it seems that the presence of a link before a latex formula can mess up how the formula is displayed in the pdf export.

To be specific, the following code is fine:

imitate-if-better
[latex]a_k(0) = \mathbb{P}(X_k = 0 \,|\, X_0=0.5) > 0[/latex] for any [latex]k \ge 50[/latex].

i.e., it displays in the pdf as:
https://pressbooks.community/uploads/default/original/1X/8ce97a331b031c305219a402cd0dcb4c77fcc64b.png

But if I turn the initial word into a link:

<a href="https://wisc.pb.unizin.org/agent-based-evolutionary-game-dynamics/chapter/1-0/#imitate-if-better-protocol">imitate-if-better</a>
[latex]a_k(0) = \mathbb{P}(X_k = 0 \,|\, X_0=0.5) &gt; 0[/latex] for any [latex]k \ge 50[/latex].

then the formula does not display correctly in the pdf:
https://pressbooks.community/uploads/default/original/1X/f987667c38a94417a0daeb9ee618e903638532b1.png

Cheers
Luis

@SteelWagstaff SteelWagstaff added bug Something isn't working export formats related to export formats produced by Pressbooks third party related to third party tools, services, integrations or plugins labels Nov 28, 2019
@SteelWagstaff
Copy link
Member

@mcgratay Note for testing -- this error is occurring when using the WP Quick LaTeX plugin, not our native LaTeX rendering solution.

@mcgratay
Copy link

@SteelWagstaff I was able to reproduce variations of this bug on MathJax as well; notes to come

@mcgratay
Copy link

Notes

  • Does not seem to be affected by syntax, meaning that the same error will occur whether you're using inline $$ xyntax, latex shortcodes, or bracket + slashes.
  • Not affected by theme/ theme changes
  • Only appears in print PDF. Does not seem to affect digital PDF, webbook, or any ebook formats.
  • Not changed by removing extra markup in the original chapter
  • "Rendered by QuickLaTeX" statement changes to "latex mathjax" with same weird display issue when QuickLaTeX plugin is deactivated
  • Does not in this situation appear to be the cause of linked text as described in the situation above
  • Not able to find consistent results at this time; other chapters in the book can display greater than symbols fine

Test book: https://equationalignment.textopress.com/

@luis-r-izquierdo
Copy link
Author

At least in this book:
https://wisc.pb.unizin.org/agent-based-evolutionary-game-dynamics/
the issue does affect the digital pdf.
Thanks for your work Guys

@SteelWagstaff
Copy link
Member

@luis-r-izquierdo we recently deployed a fix for special characters in LaTeX entities for PDF exports. Can you test this to see whether that fix resolved your issue, or if this still needs further attention? Hope all is well with you and family in Spain!

@luis-r-izquierdo
Copy link
Author

Hi @SteelWagstaff ! The fix has indeed resolved the issue, thank you so much! I hope you and your family are doing very well too. And remember that, even though Real Valladolid is playing in "Segunda", you may still enjoy visiting us to watch a game :D
All the very best for now, my Dear Friend,
Luis

@luis-r-izquierdo
Copy link
Author

Hi, I'm sorry to bring this up again, but apparently the issue is now present in EPUB exports. You can check by looking for " QuickLaTeX.com" in the EPUB export of https://wisc.pb.unizin.org/agent-based-evolutionary-game-dynamics/
The problem is not present in the pdf exports

@luis-r-izquierdo
Copy link
Author

I filed a new issue for the EPUB export, with a MWE, at #101

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working export formats related to export formats produced by Pressbooks third party related to third party tools, services, integrations or plugins
Projects
None yet
Development

No branches or pull requests

3 participants