介绍
我想乳胶,以便通过pandoc产生通过pdflatex和HTML网页的PDF创建源代码。 我用下面的源
\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}
This is an example to demonstrate how \textbackslash label\{\} and \textbackslash ref\{\} are not working with pandoc. Here should be a reference to the first example: \ref{itm:thefirst}
\end{document}
这可以用pdflatex编译没有任何错误或警告。
问题
我创建通过使用下面的代码pandoc HTML页面:
pandoc -f latex sample.tex -t html5 -o sample.html -S --toc -s
但它周围产生的标签和参考令人满意的结果:
<body>
<ol>
<li><p>[itm:thefirst] First example point</p></li>
</ol>
<p>This is an example to demonstrate how \label{} and \ref{} are not working with pandoc. Here should be a reference to the first example: [itm:thefirst]</p>
</body>
题
我应该怎么修改乳胶源代码,为了得到这样的:
<body>
<ol>
<li><p id="itm:thefirst">First example point</p></li>
</ol>
<p>This is an example to demonstrate how \label{} and \ref{} are not working with pandoc. Here should be a reference to the first example: <a href="#itm:thefirst">(1)</a></p>
</body>