Closed henry2004y closed 2 years ago
I am curious why the PDF generation with pandoc produces errors whereas the html version works fine? Do they include different scopes of packages underneath?
Yes, there is completely different software underneath. The TeX version is rendered by a TeX math renderer like is normally the case when using LaTeX. However, for webpages the TeX renderer is way too slow and it is difficult to get the alignment of images right when one would use that. To solve this, KaTeX and MathJax exist. The Books.jl
package uses MathJax.
The problem here is that the cancel
package is missing from the set of used TeX packages. You can add it by adding the following to your metadata.yml
from Books.jl
v2.0.3 onwards:
extra-pdf-header: |
\usepackage{cancel}
This extra-pdf-header
can be used to add any extra header to the PDF generation. In this case, only \usepackage{cancel}
is needed. I tried to build the equation that you mentioned and it works for me.
Is there a way to check if all my added packages are added? I added
header-includes: |
\usepackage{cancel, amssymb, amsmath, siunitx, physics2, fixdif, derivative, systeme, multicol, tikz, pgfplots}
But upon using them the images from tikz are not rendered nor when I use other packages?
Is there a way to check if all my added packages are added? I added
header-includes: | \usepackage{cancel, amssymb, amsmath, siunitx, physics2, fixdif, derivative, systeme, multicol, tikz, pgfplots}
But upon using them the images from tikz are not rendered nor when I use other packages?
Yes you can check that by going to the directory of the generated files (where the generated PDF is too) and look at the .tex
file. Books.jl will always put that file there.
Hi,
I am having some issues with the PDF generation functionality. The html version works fine for most of the math (not all, because some commands from certain LaTeX packages are not loaded), but a PDF output cannot be generated from the same markdown files.
The problematic LaTeX expression is this:
and specifically,
\cancel
:Here is a screenshot of the above expression in the html version (for simplicity, I only include the LaTeX of the first equation):
I am curious why the PDF generation with pandoc produces errors whereas the html version works fine? Do they include different scopes of packages underneath?