5

I want to convert a (quite complex) LaTeX file to epub using pandoc with:

pandoc -S file.tex -o file.epub

I have not used markdown in the creation of the tex file, however. When I, now, check the generated epub file I see that all hyperlinks (made by hyperref) are broken and thinks like this appear instead:

Fig. [fig:initial_model], s. Table [tab:dis-advantages] or chapter [ch:findings].

A check of the epub file displays the following error message:

Non-registered URI scheme type found in href.

What can I do about it?

Til Hund
  • 1,181
  • Hi Michal.h21, can you elaborate a bit further, for example, how one can use this within the command line without changing the code? – Til Hund Sep 01 '15 at 19:08
  • 1
    if you have TL 2015 installed, you can try to run tex4ebook filename. it will create epub2 file by default. You shouldn't need to change your TeX file, unless you use some package which isn't supported by tex4ht (which tex4ebook uses for LaTeX to html conversion) – michal.h21 Sep 01 '15 at 19:12
  • Uh, it might still take some time to arrive on archlinux, I guess, see here. – Til Hund Sep 01 '15 at 21:10
  • you can also try to install it yourself – michal.h21 Sep 01 '15 at 21:16
  • I just tried it and got an Undefined control sequence error for \tightlist during make. Here seems to be a solution but I do not know if and how this would function with installing tex4ebook manually. – Til Hund Sep 01 '15 at 21:30
  • \tighlist seems to be included by pandoc. solution from the linked question should work, I think – michal.h21 Sep 02 '15 at 06:36
  • 1
    Unfortunately, pandoc currently doesn't seem to support internal links to tables and figures (#813, though that seems strongly tied to pandoc's Markdown). Concerning chapters, you probably need to use \hyperdef{}{chap-one}{\chapter{One}}\label{chap-one} and \hyperref[chap-one]{One} as pandoc does when converting from Markdown, as described here. Maybe you can find some relevant hypersetup switches in the default LaTeX template (pandoc -D latex as well. – Tobias Kienzler Dec 11 '15 at 11:48

0 Answers0