0

I am trying to use pandoc to convert a large thesis from latex to html. I want my latex internal references (\ref) to sections (\label), equations, tables,figures etc. to appear as links in the resulting html. As the source is quite large (~350 pages) I would appreciate if anybody knew of an automatic way to do it.

1 Answers1

0

I am trying to use pandoc to convert a large thesis from latex to html.

Pandoc has a good support to convert from LaTeX to HTML but you need to avoid many packages. You probably want to try LaTeXML if you use many packages.

I want my latex internal references (\ref) to sections (\label), equations, tables,figures etc. to appear as links in the resulting html.

When converting from LaTeX to HTML, Pandoc doesn't add number to sections

$ pandoc -f latex <<EOF
\section{foo}\label{s:foo}
EOF
<h1 id="s:foo">foo</h1>

because this is normally done with CSS and in consequence cross-reference is converted only to links

$ pandoc -f latex <<EOF  
bla \ref{s:foo} bla
EOF
<p>bla [s:foo] bla</p>

For more information you should take a look at

As the source is quite large (~350 pages) I would appreciate if anybody knew of an automatic way to do it.

My suggestion is to use LaTeXML.

Raniere Silva
  • 2,527
  • 1
  • 18
  • 34