1

I have a problem converting a Wikipedia page to a PDF using Pandoc. Pandoc attempts to convert web pages to PDF format via LaTeX and the problem I am having appears to be with LaTeX, which is why I ask the question here. Here is what I am attempting to do:

pandoc -s --latex-engine=xelatex -r html http://en.wikipedia.org/wiki/Wikipedia_talk:Manual_of_Style/Dates_and_numbers/Archive_142 -o archive_142.pdf

Some prerequisites I have set up on Ubuntu are as follows:

sudo apt-get -y install texlive-latex-recommended texlive-fonts-recommended texlive-xetex texlive-latex-extra

The terminal output when I attempt to do this is as follows:

pandoc: Could not find image `//upload.wikimedia.org/wikipedia/en/thumb/2/2a/Replacement_filing_cabinet.svg/40px-Replacement_filing_cabinet.svg.png', skipping...
pandoc: Could not find image `//upload.wikimedia.org/wikipedia/commons/thumb/4/41/Symbol_confirmed.svg/20px-Symbol_confirmed.svg.png', skipping...
pandoc: Could not find image `//upload.wikimedia.org/wikipedia/commons/thumb/4/41/Symbol_confirmed.svg/20px-Symbol_confirmed.svg.png', skipping...
pandoc: Could not find image `//en.wikipedia.org/wiki/Special:CentralAutoLogin/start?type=1x1', skipping...
pandoc: Could not find image `//bits.wikimedia.org/images/wikimedia-button.png', skipping...
pandoc: Could not find image `//bits.wikimedia.org/static-1.24wmf2/skins/common/images/poweredby_mediawiki_88x31.png', skipping...
pandoc: Error producing PDF from TeX source.
! Unable to load picture or PDF file '//upload.wikimedia.org/wikipedia/en/thumb
/2/2a/Replacement_filing_cabinet.svg/40px-Replacement_filing_cabinet.svg.png'.
<to be read again> 
                   }
l.92 ...g/40px-Replacement_filing_cabinet.svg.png}

The desired PDF file is not produced. Would you happen to have any idea on how to approach this problem?

8
  • 2
    Looking at your log the error doesn't seem latex related really. The latex error is just telling you the image is not there which is not surprising given the warnings from the pandoc conversion which say it could not locate them. May 7, 2014 at 13:20
  • I'm not sure. When I use pdflatex as the engine, I get the error Package inputenc Error: Unicode char \u8:‎ not set up for use with LaTeX..
    – d3pd
    May 7, 2014 at 13:48
  • It worked fine on Mac OS X 10.6.8 running pandoc 1.12.3 and MacTeX-pretest --- generated a 145 pg. pdf.
    – WillAdams
    May 7, 2014 at 14:41
  • mactex 2015 pretest?! do you have a time machine, or are you regarding mactex 2013 as a pretest for the 2015 release? (i only just "clicked" that the mactex on ctan is still 2013...) May 7, 2014 at 14:47
  • 2014 then --- I forget what the schedule is and working on some 2015 stuff here at work...
    – WillAdams
    May 7, 2014 at 16:01

1 Answer 1

0
$ pandoc -s -S -t latex --latex-engine=xelatex -r html http://en.wikipedia.org/wiki/Wikipedia_talk:Manual_of_Style/Dates_and_numbers/Archive_142  > archive142.tex

$ xelatex archive142.tex 

Press S when the first error message appears. This will generate a pdf without the images.

Not the answer you're looking for? Browse other questions tagged .