0
votes

I try to use pandoc to convert my tex file in html or epub. It is not a complex Latex file with Math formule. It is something like a book.

But I have a problem. When I convert the file in pdf with pdflatex, the all file is ok. But when I use

pandoc book.tex -s --webtex -o book.html

or

pandoc -S book.tex -o book.epub

It is as if there was no compilation.. << are not replaced by «. Each command, like \emph{something}, are just ignored and the word is delete from the paragraph.

In fact, it is as if I had made a simple copy and paste, without commands.

1
you may try github.com/michal-h21/tex4ebook it converts LaTeX to epub (or kindle and epub3) directly, using tex4htmichal.h21

1 Answers

0
votes

In older versions of pandoc, I think you needed to tell it the input format, otherwise it would assume it was markdown.

pandoc -f latex book.tex -S -o book.epub