12 November 2014

This solution if for asciidoc with dblatex.

Quick review

wget http://edusantana.github.io/asciidoc/page/pageconfig.adoc
wget http://edusantana.github.io/asciidoc/page/simple-reference-with-page.adoc
a2x -f pdf pageconfig.adoc
a2x -f pdf simple-reference-with-page.adoc

Let’s start with a simple solution

Setting the insert.xref.page.number param to yes. You can do this adding this comment to your asciidoc document:

// a2x:  --dblatex-opts "-P insert.xref.page.number=yes"

Here’s an example:

= Simple reference with page =
:doctype: book
//    a2x: --dblatex-opts "-P insert.xref.page.number=yes"

== Alfa

See <<UsingMouse>>.

== Using Mouse

Et nobis voluptas voluptatem sapiente facilis voluptas.


Solution with xref attributes

You can play with xrefstyle attribute of xref:

= Understands page reference with asciidoc and dblatex =
:doctype: book

== Alfa

See <<MouseButtons>>.

=== pageabbrev

<xref linkend="MouseButtons" xrefstyle="pageabbrev"/>

=== template:the chapter numbered

+++<xref linkend="MouseButtons" 
xrefstyle="template:the section numbered %n"/>+++
for more information.

=== select: labelnumber quotedtitle

+++<xref linkend="MouseButtons" 
      xrefstyle="select: labelnumber quotedtitle"/>+++

=== select: label pageabbrev quotedtitle

Look at 
+++<xref linkend="MouseButtons" 
      xrefstyle="select: label pageabbrev quotedtitle"/>+++
=== Learn Mouse Buttons

Voluptatem qui consequatur quis.



blog comments powered by Disqus