4

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

在我的 HTML 中,这是出度链接

<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>...

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

4

2 回答 2

2

The Pandoc User's Guide section on Internal Links says

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

This suggests that internal links aren't currently supported for PDF output, even though the PDF output is generated via LaTeX.

于 2013-08-25T10:03:08.897 回答
1

Internal links should work straightforwardly in PDF. However, for printing purposes, the default is not to color them. Have you tried clicking on the text that should be a link?

于 2013-08-25T17:48:48.390 回答