Re: Linux man-pages PDF book

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

 



On Sun, Apr 14, 2024 at 02:32:25PM +0200, Alejandro Colomar wrote:
> Hi Branden,
> 
> On Sun, Apr 14, 2024 at 06:57:43AM -0500, G. Branden Robinson wrote:
> > At 2024-04-14T13:37:15+0200, Alejandro Colomar wrote:
> > > There's also the page issue.  Now it seems to reset the page number for
> > > every TH.
> > 
> > This might be a simple issue.  Make sure that you're passing groff (or
> > troff) an option to set the `C` register to a true value.
> > 
> > groff_man(7):
> >      -rC1     Number output pages consecutively, in strictly increasing
> >               sequence, rather than resetting the page number to 1 (or
> >               the value of register P) with each new man document.
> 
> Hmmmm.  Maybe I should follow v7's tradition and restart the page number
> at each TH.  Let's call it an accidental improvement, and not a
> regression.  :)
> 
> Although it would be interesting to learn when/why this changed.

It seems to have been here:

$ git show 6d87a75a6df0 -- scripts/LinuxManBook/build.sh;
commit 6d87a75a6df0696e780255d865bf65da09f36f01
Author: Alejandro Colomar <alx@xxxxxxxxxx>
Date:   Fri Dec 1 00:55:11 2023 +0100

    scripts/LinuxManBook/: Simplify pipeline
    
    Call the groff(1) pipeline only once.  This optimizes around 2 seconds,
    while also simplifying the code.
    
    This change was originally written by Deri, with some parts written by
    Brian.  I took the script that Deri sent, and split it so that the
    groff(1) pipeline is called from the shell script, and the Perl script
    is limited to editing the man(7) pages.  This helps me understand the
    process, since my understanding of Perl is very limited.  It also makes
    this change smaller, so that it's less of a big-bang.
    
    Link: <https://lore.kernel.org/linux-man/ZWkO4qPC4BxkwBNm@debian/T/#m3d453440b02dd189bc12d2e629c4026206025b40>
    Co-developed-by: Deri James <deri@xxxxxxxxxxxxxxxxxxxxxx>
    Co-developed-by: Brian Inglis <Brian.Inglis@xxxxxxx>
    Signed-off-by: Alejandro Colomar <alx@xxxxxxxxxx>

diff --git a/scripts/LinuxManBook/build.sh b/scripts/LinuxManBook/build.sh
index a6e578f64..8e373c073 100755
--- a/scripts/LinuxManBook/build.sh
+++ b/scripts/LinuxManBook/build.sh
@@ -3,25 +3,13 @@
 # SPDX-License-Identifier: GPL-3.0-or-later
 
 (
-       "$(dirname "$0")"/prepare.pl "$1" \
-       | preconv \
-       | pic \
-       | tbl \
-       | eqn -Tpdf \
-       | troff -Tpdf -dPDF.EXPORT=1 -dLABEL.REFS=1 -dpaper=a4 \
-               -M"$(dirname "$0")" -mandoc -manmark -rC1 -rCHECKSTYLE=3 \
-               2>&1 >/dev/null \
-       | LC_ALL=C grep '^\. *ds ';
-
+       cat "$(dirname "$0")"/LMBfront.roff;
+       cat "$(dirname "$0")"/an.tmac;
        "$(dirname "$0")"/prepare.pl "$1";
 ) \
 | preconv \
 | pic \
 | tbl \
 | eqn -Tpdf \
-| (
-       troff -Tpdf -ms <"$(dirname "$0")"/LMBfront.ms;
-       troff -Tpdf -M"$(dirname "$0")" -mandoc -manmark \
-               -F"$(dirname "$0")" -dpaper=a4;
-) \
+| troff -Tpdf -F"$(dirname "$0")" -dpaper=a4 \
 | gropdf -F"$(dirname "$0")" -pa4;

-- 
<https://www.alejandro-colomar.es/>

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux