#48971 closed defect (fixed)
pandoc fails to convert Markdown to PDF due to missing dependencies
Reported by: | markus.mahlberg@… | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.3.3 |
Keywords: | Cc: | mojca (Mojca Miklavec), evanmiller (Evan Miller) | |
Port: | pandoc |
Description
When converting markdown to PDF, pandoc threw an error:
machine:Documents markus$ pandoc -o backlog_srpt_24_09_15.pdf backlog_srpt_24_09_15.md ! LaTeX Error: File `lmodern.sty' not found. Type X to quit or <RETURN> to proceed, or enter new name. (Default extension: sty) Enter file name: ! Emergency stop. <read *> l.3 \usepackage pandoc: Error producing PDF from TeX source
So I had to install texlive-fonts-recommended
, after which the conversion worked flawless.
However, since pandoc uses pdflatex
an additional dependency to texlive-latex
is required, which I had installed but is not a dependency of texlive-fonts-recommended
.
Furthermore, the pandoc documentation for creating PDFs states that the following TeX packages are required:
If necessary, I can create a mapping to the ports providing the listed packages.
Additionally, pandoc provides several options for creating PDFs using different flavors of LaTeX binaries, namely pdflatex, luatex and xelatex. luatex and xelatex would need additional dependencies. I am not sure wether this warrants special port variants.
Change History (9)
comment:1 follow-up: 3 Changed 9 years ago by gnw3
comment:2 Changed 9 years ago by mf2k (Frank Schima)
Port: | pandoc added |
---|
In the future, please fill in the Port field.
comment:3 Changed 9 years ago by markus.mahlberg@…
Replying to gnwiii@…:
Not all pandoc users want PDF's, and those who do have lots of options. For most users who want PDF's it is simpler to just install all the texlive packages than to work out a minimal list that fits their requirements.
I dare to object. The PDF creation of pandoc is enabled and documented in the manpage, so the port should provide said capabilities as per POLS.
A mapping from a list of package to the specific ports could be useful beyond pandoc -- a typical "use case" is some port that fails to build docs because some macros package isn't installed. In this case the user may just want the fastest route to getting the docs for the original port. One of the downsides to macports is that many Portfiles (R, nco come to mind) omit PDF docs that would require TeX/LaTeX to format, so there is a wider need for guidance on how to manage texlive ports than just pandoc so Portfile authors can enable PDF doc building without going to a lot of extra work.
I was just referring to the package-to-port mapping for pandoc's dependencies. ;)
For the general problem I am not sure what you have in mind. A tutorial would be rather easy("Do a port provides
on the missing STY."). An automation for this (eg in for of a wrapper) would require rather costly recursive file parsing and constant port provides
queries.
comment:4 Changed 5 years ago by neverpanic (Clemens Lang)
Please try again with the latest pandoc (see #48324). I believe this may still be a problem, though. I'm not sure it's a good idea to fix this in the way you are proposing – people might use pandoc for all sorts of conversions and might be annoyed if it pulls in an entire latex installation even though they just want to convert docbook XML to asciidoc.
comment:5 Changed 5 years ago by mojca (Mojca Miklavec)
Cc: | mojca added |
---|
comment:6 Changed 5 years ago by mojca (Mojca Miklavec)
I don't see a way to really fix this, other than specifying the dependency on the full texlive
. Even if you somehow manage to figure out what to use in one scenario, it's easy to come up with a different scenario of user needing a completely different toolset like [texlive-]context
.
What we can do at best is add port notes suggesting users to install texlive
when they need conversion to pdf with math support.
comment:7 Changed 3 years ago by evanmiller (Evan Miller)
Cc: | evanmiller added |
---|
comment:8 Changed 17 months ago by evanmiller (Evan Miller)
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:9 Changed 8 months ago by thetrial (alabay)
I have an exact opposite question and situation: I recently installed pandoc – and it pulled along a whole texlive installation. Though I have an original, full-equipped texlive installation. How can I get rid of all unnecessary MacPorts’ texlive stuff? TLU shows me two TL installation … the original one via unix-script (not MacTex!) and the MacPorts version.
Not all pandoc users want PDF's, and those who do have lots of options. For most users who want PDF's it is simpler to just install all the texlive packages than to work out a minimal list that fits their requirements.
A mapping from a list of package to the specific ports could be useful beyond pandoc -- a typical "use case" is some port that fails to build docs because some macros package isn't installed. In this case the user may just want the fastest route to getting the docs for the original port. One of the downsides to macports is that many Portfiles (R, nco come to mind) omit PDF docs that would require TeX/LaTeX to format, so there is a wider need for guidance on how to manage texlive ports than just pandoc so Portfile authors can enable PDF doc building without going to a lot of extra work.