How to place labels correctly and use cross-reference in latex to be able to convert to html(5) using pandoc? -
introduction
i'd create source code in latex in order produce pdf via pdflatex , html page(s) via pandoc. use following source
\documentclass[12pt,a4paper]{article} \usepackage[t1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[magyar]{babel} \usepackage{hyperref} \begin{document} \begin{enumerate} \item \label{itm:thefirst} first example point \end{enumerate} example demonstrate how \textbackslash label\{\} , \textbackslash ref\{\} not working pandoc. here should reference first example: \ref{itm:thefirst} \end{document}
this can compiled pdflatex without error or warning.
problem
i create html page via pandoc using following code:
pandoc -f latex sample.tex -t html5 -o sample.html -s --toc -s
but creates unsatisfactory results around label , reference:
<body> <ol> <li><p>[itm:thefirst] first example point</p></li> </ol> <p>this example demonstrate how \label{} , \ref{} not working pandoc. here should reference first example: [itm:thefirst]</p> </body>
question
what shall modify in latex source code in order this:
<body> <ol> <li><p id="itm:thefirst">first example point</p></li> </ol> <p>this example demonstrate how \label{} , \ref{} not working pandoc. here should reference first example: <a href="#itm:thefirst">(1)</a></p> </body>
what shall modify in latex source code [...]
pandoc not support parsing , processing of \label{...}
or \ref{...}
latex files, there no easy solution problem.
Comments
Post a Comment