jgm / pandoc

Universal markup converter
https://pandoc.org
Other
34.61k stars 3.38k forks source link

pandoc-1.12 has a "LaTeX Error: File `ulem.sty' not found" when converting "~~strike~~" #2440

Closed olibre closed 9 years ago

olibre commented 9 years ago
$ echo '~~strike~~' | pandoc -o test.pdf
pandoc: Error producing PDF from TeX source.
! LaTeX Error: File `ulem.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.42 \pdfstringdefDisableCommands
$ pandoc --version
pandoc 1.12.3.1
Compiled with texmath 0.6.6, highlighting-kate 0.5.6.
Syntax highlighting is supported for the following languages:
    actionscript, ada, apache, asn1, asp, awk, bash, bibtex, boo, c, changelog,
    clojure, cmake, coffee, coldfusion, commonlisp, cpp, cs, css, curry, d,
    diff, djangotemplate, doxygen, doxygenlua, dtd, eiffel, email, erlang,
    fortran, fsharp, gnuassembler, go, haskell, haxe, html, ini, java, javadoc,
    javascript, json, jsp, julia, latex, lex, literatecurry, literatehaskell,
    lua, makefile, mandoc, markdown, matlab, maxima, metafont, mips, modelines,
    modula2, modula3, monobasic, nasm, noweb, objectivec, objectivecpp, ocaml,
    octave, pascal, perl, php, pike, postscript, prolog, python, r,
    relaxngcompact, restructuredtext, rhtml, roff, ruby, rust, scala, scheme,
    sci, sed, sgml, sql, sqlmysql, sqlpostgresql, tcl, texinfo, verilog, vhdl,
    xml, xorg, xslt, xul, yacc, yaml
Default user data directory: /home/olibre/.pandoc
Copyright (C) 2006-2013 John MacFarlane
Web:  http://johnmacfarlane.net/pandoc
This is free software; see the source for copying conditions.  There is no
warranty, not even for merchantability or fitness for a particular purpose.
jgm commented 9 years ago

We don't fix bugs in old versions. Distro should upgrade. Your workaround is simply to use a custom template with \usepackage{ulem}.

DarrenCook commented 8 years ago

I believe this is not a bug, and distro upgrades won't fix it.

On Redhat this should fix it: yum install 'tex(ulem.sty)'

On Ubuntu: apt-get install texlive-generic-recommended

In both cases there are also "everything in latex" packages, that would also do it (texlive-full on ubuntu), and prevent any future problems of this sort, but might add 1GB to your disk, apparently.

Finally, the thinking out of the box "fix": remove underlining from your source document.

SnapperGee commented 1 month ago

I was getting the same error on my Linux machine when trying to convert a markdown file to a pdf. I had pandoc installed in addition to texlive-latex-recommended and I was still getting the error. I then installed the texlive-latex-extra package via apt and after that it started working.