0

我想在 asciidoc PDF 中为印刷书籍创建一个链接。正确的方法是这样的:

[[LinkUniqueCode]]
Here is the stuff I'm linking to...
Lots of document here...

Now look <<LinkUniqueCode,at the link>>.

通常我希望这在 PDF 中呈现为这样的内容:

Now look at the link (Page 13).

但相反,我得到了一个在打印的 PDF 中无用的链接......

我为此搜索了很多,但我发现的关键字太笼统了,我只找到了这个

我试过添加:xrefstyle: full,但这也没有真正帮助。

我已经通过 fopub 后端和 PDF 后端看到了这一点。我猜PDF生成应该有一个“打印模式”,但我真的看不出我在这里做错了什么。

4

2 回答 2

2

好吧,那是我傻了。我忘了包括:

:doctype: book

这一切都很好。

编辑

完整参考这里是我的整个标题:

:xrefstyle: full
:listing-caption: Listing
:sectnums:
:pdf-page-size: [8.125in, 10.25in]
:doctype: book
:media: prepress
:icons: font
:source-highlighter: rouge
:toc: macro
:toclevels: 4
:toc-title: Contents
:toc-placement: manual
:tip-caption: :bulb:
:autofit-option:
:hide-uri-scheme:
:uuid: 92CA37B2-EB2B-4B8F-AC7C-XXXXXXXXX
:front-cover-image: image:images/ebook.png[Front Cover,1000,1600]
:lang: en-US
:revdate: 2018-07-22
:doctitle: My Title
:author: Shai Almog
:producer: Codename One Academy
:description: My Description
:keywords: My Keywords,Other Words
:copyright: Shai Almog, all rights reserved
:publication-type: book

那么这个文件的主体是:

include::file-names-for-each-chapter.asciidoc[]

[index]
== Index

这似乎工作正常

于 2017-11-28T20:30:29.843 回答
0

看看:https ://stackoverflow.com/questions/47312831/asciidoctor-page-number-usable

我举了你的例子,它没有做好。

您使用了哪些其他设置,例如外部参照样式?

编辑:看这里:

asciidoctor-pdf -v
Asciidoctor PDF 1.5.0.alpha.16 using Asciidoctor **1.5.4** [http://asciidoctor.org]
Runtime Environment (ruby 2.3.3p222 (2016-11-21) [x86_64-linux-gnu]) (lc:UTF-8 fs:UTF-8 in:- ex:UTF-8)

我认为这解释了:

2017 年 8 月 9 日星期三晚上 11:23,Jeremie Bresson [通过 Asciidoctor :: Discussion] <[hidden email]> 写道:

“外部参照样式”功能非常棒(Asciidoctor 1.5.6.1的新功能,请参阅http://asciidoctor.org/docs/user-manual/#customizing-the-cross-reference-text

于 2017-11-29T12:43:36.487 回答