使用Pandoc进行转换时如何维护HTML内部链接

我想用Pandoc从html转换为pdf.输出非常好,仍然使用命令pandoc index.html -o output.pdfI丢失所有内部链接(从目录到章节,从文本到脚注等).

在我的HTML中,这是一个outdegree链接

<p class="calibre18"><a href="#calibre_link-73"><span class="calibre8">CHAPTER ONE</span></a><br class="calibre19"></br><a href="#calibre_link-73">The Ever Expanding Domain of Computation</a></p>

然后降落在这里

<a href="#calibre_link-73">Chapter 1</a> makes the case that because of...

和这里

<p class="calibre18"><a href="#calibre_link-73"><span class="calibre8">CHAPTER ONE</span></a><br class="calibre19"></br><a href="#calibre_link-73">The Ever Expanding Domain of Computation</a></p>...

有没有办法在输出中保留所有链接?

最佳答案
Pandoc User’s Guide section on Internal Links

Internal links are currently supported for HTML formats (including HTML slide shows and EPUB), LaTeX, and ConTeXt.

这表明PDF输出目前不支持内部链接,即使PDF输出是通过LaTeX生成的.

点赞