Bug 752621 - markdown2pdf fails with .sty file problems
Summary: markdown2pdf fails with .sty file problems
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: pandoc
Version: 16
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: Jens Petersen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-11-10 00:56 UTC by Luis Villa
Modified: 2012-11-20 03:11 UTC (History)
3 users (show)

Fixed In Version: pandoc-1.8.2.1-3.fc16
Clone Of:
Environment:
Last Closed: 2011-12-22 22:34:14 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Luis Villa 2011-11-10 00:56:53 UTC
Description of problem:

markdown2pdf fails to create pdfs, apparently failing to find some .sty files (though I am not an expert). Error message below:

Version-Release number of selected component (if applicable):

F16, 1.8.2.1

How reproducible:

100%

Steps to Reproduce:
1. markdown2pdf foo.txt
2. boom
  
Actual results:

Error message below:

Expected results:

Create a pdf :)

Additional info:

========
[louie@towel RC2 Source Files]$ markdown2pdf Working\ Documents/MPL-RC2.txt
markdown2pdf: ! LaTeX Error: File `ifluatex.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.4 \ifxetex
            ^^M 
Here is how much of TeX's memory you used:
 1069 strings out of 256216
 11518 string characters out of 1917072
 58404 words of memory out of 1500000
 4417 multiletter control sequences out of 10000+200000
 3640 words of font info for 14 fonts, out of 1200000 for 2000
 645 hyphenation exceptions out of 8191
 27i,0n,24p,240b,36s stack positions out of 5000i,500n,6000p,200000b,15000s

!  ==> Fatal error occurred, no output PDF file produced!

===============

The error above occurred after a similar error from ifxetex.sty, which I remedied by installing texlive-texmf-xetex.noarch. 

This may actually be a texlive bug, but filing it here because I'm not expert enough with either pandoc or tex to diagnose further. :(

Comment 1 Jens Petersen 2011-11-13 07:32:47 UTC
I see.  Is it possible you could attach a testcase? 
Then I can try to take a look.

Comment 2 Jens Petersen 2011-11-13 07:43:26 UTC
Nevermind I reproduced - hmm only seems to happen on F16 indeed.

Comment 3 Jens Petersen 2011-11-13 14:08:00 UTC
This happens with pandoc >= 1.8.2.

See https://github.com/jgm/pandoc-templates/commit/201b99a23906e8da10cc637778cd8029f038398b

As far as I can tell luatex is not yet packaged for Fedora.

Comment 4 Luis Villa 2011-11-14 02:14:53 UTC
Yes. Commenting out luatex references in that file makes markdown2pdf work, as best as I can tell:

%\usepackage{ifxetex,ifluatex}
\usepackage{ifxetex}
\ifxetex
  \usepackage{fontspec,xltxtra,xunicode}
  \defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase}
\else
%  \ifluatex
%    \usepackage{fontspec}
%    \defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase}
%  \else
    \usepackage[utf8]{inputenc}
%  \fi
\fi

Comment 5 Fedora Update System 2011-11-17 10:15:38 UTC
pandoc-1.8.2.1-3.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/pandoc-1.8.2.1-3.fc16

Comment 6 Jens Petersen 2011-11-17 10:17:29 UTC
Luis, I applied your change and also subpackaged markdown2pdf.
If you could test the package when it hits the updates-testing repo
that would be appreciated.  Thanks for the report.

Comment 7 Fedora Update System 2011-11-19 06:01:14 UTC
Package pandoc-1.8.2.1-3.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing pandoc-1.8.2.1-3.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2011-16104/pandoc-1.8.2.1-3.fc16
then log in and leave karma (feedback).

Comment 8 Luis Villa 2011-11-20 19:05:56 UTC
I can't help but think that perhaps the correct answer is to ask the latex team to package luatex instead of hacking things out :) But yes, I can confirm that the packaged version of the fix works.

Comment 9 Jens Petersen 2011-11-21 00:57:30 UTC
Sure.  I am not sure if luatex is available for TeXLive 2007 but
we can find out I guess...
Work is underway to update Fedora finally to TeXLive 2011
but it is a big job with the enormous license audit and number of new
source packages that need to be added (personally I am not
really sure if thousands of new tex packages make sense...).

http://fedoraproject.org/wiki/Features/TeXLive

Thanks for the testing.

Comment 10 Jens Petersen 2011-11-21 01:11:36 UTC
Perhaps a better hack would be to test in markdown2pdf if lualatex
is installed and if not use the patched template.

That would allow people using the texlive-2011 test packages to
use luatex with pandoc.

http://jnovy.fedorapeople.org/texlive/

Comment 11 Jens Petersen 2011-12-21 05:38:30 UTC
I noticed that pandoc-markdown2pdf is "missing" a requires for pdflatex.
Actually it does not seem to be using XeTeX now and
in fact "markdown2pdf --xetex ..." gives me the error:

markdown2pdf: /home/petersen/tmp/pandoc/test.pdf: copyFile: does not exist (No such file or directory)

I want to revisit the patch again and see if I can get it to use xelatex instead of pdflatex by default.

Comment 12 Jens Petersen 2011-12-22 09:33:24 UTC
Okay I am adding a requires for latex (pdflatex) and a patch
to markdown2pdf to workaround the above error with texlive2007
in pandoc-1.8.2.1-5.fc16.

Comment 13 Fedora Update System 2011-12-22 22:34:14 UTC
pandoc-1.8.2.1-3.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 14 Shivaram Lingamneni 2012-11-19 21:40:37 UTC
I'm on Fedora 17 and affected by (a variant of) this issue. I already had texlive when I installed pandoc, but markdown-to-PDF conversion didn't work until I additionally installed texlive-texmf-xetex.

Comment 15 Jens Petersen 2012-11-20 02:32:35 UTC
(In reply to comment #14)
> I'm on Fedora 17 and affected by (a variant of) this issue. I already had
> texlive when I installed pandoc, but markdown-to-PDF conversion didn't work
> until I additionally installed texlive-texmf-xetex.

Well, that is why I added the pandoc-pdf meta-subpackage,
which pulls in texlive-xetex -> texlive-texmf-xetex.
Admittedly not very discoverable.

I suppose pandoc could pull in texlive but I was trying
to avoid forcing that big dependency on everyone.

Comment 16 Shivaram Lingamneni 2012-11-20 03:11:13 UTC
That's fair. Maybe this is evidence that texlive should pull in texlive-xetex? Although that's probably a whole different can of worms.


Note You need to log in before you can comment on or make changes to this bug.