groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: page reference , page foward reference


From: Ralph Corderoy
Subject: Re: page reference , page foward reference
Date: Thu, 21 Nov 2019 12:13:11 +0000

Good day Marko,

> Unfortunately I struggle with cross reference in groff mm.
> I want to link from one point to another point include page number...

Here's an example.

    $ cat ref.tr
    .nr H1dot 0
    .
    .INITR index
    .
    .H 1 Introduction
    .SETR intro
    .
    Chapter
    .GETHN epi
    \& on page
    .GETPN epi
    \& is well worth a peruse.
    .
    .H 2 Sub-introduction
    .SETR subintro
    .
    .SK
    .
    .H 1 Epilogue
    .SETR epi
    .
    .GETHN intro s
    Read fine chapter \*s,
    .GETHN subintro s
    including sub-chapter \*s.
    $
    $ mmroff -Tpdf ref.tr >ref.pdf
    $
    $ cat index.qrf
    .\" references
    .ds qrf*ref-intro-hn 1
    .ds qrf*ref-intro-pn 1
    .ds qrf*ref-subintro-hn 1.1
    .ds qrf*ref-subintro-pn 1
    .ds qrf*ref-epi-hn 2
    .ds qrf*ref-epi-pn 2
    $
    $ mmroff -Tascii ref.tr | grep .
                                       - 1 -
           1  Introduction
           Chapter 2 on page 2 is well worth a peruse.
           1.1  Sub-introduction
                                       - 2 -
           2  Epilogue
           Read fine chapter 1, including sub-chapter 1.1.
    $

-- 
Cheers, Ralph.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]