All of lore.kernel.org
 help / color / mirror / Atom feed
From: Deri <deri@chuzzlewit.myzen.co.uk>
To: linux-man@vger.kernel.org, Brian.Inglis@shaw.ca
Cc: Alejandro Colomar <alx@kernel.org>
Subject: Re: No 6.05/.01 pdf book available
Date: Sat, 12 Aug 2023 21:02:15 +0100	[thread overview]
Message-ID: <3258129.44csPzL39Z@pip> (raw)
In-Reply-To: <7f020624-ebc9-5eb8-b87f-8f954a8084a0@Shaw.ca>

On Saturday, 12 August 2023 18:02:24 BST Brian Inglis wrote:
> On 2023-08-07 17:14, Deri wrote:
> > On Monday, 7 August 2023 09:45:22 BST Alejandro Colomar wrote:
> >> Nevertheless, now I remember Deri told me he hardcoded a lot of stuff
> >> for 1.22.4 which should be removed after the release of 1.23.0, so it
> >> seems that the time has come to chop a lot of stuff from there.
> >> 
> >> Deri, would you mind simplifying the scripts assuming a Build-dep of
> >> groff(>=1.23.0)?
> > 
> > Hi Alex, Brian,
> > 
> > I have done some work on building the pdf. One improvement is any warnings
> > output by groff, i.e. use of the deprecated .PDF macro, now identify the
> > particular man page and line number accurately.
> > 
> > I have attached two new replacement LinuxManBook directories. The first,
> > 1.23.0, will run on a stock groff 1.23.0 system. The second, 1.23.0+, runs
> > with the latest gropdf which has a number of advantages for this project -
> > you will find the resulting pdf to be more than 5mb smaller, and the page
> > numbers in the overview pane match up with the page number at the bottom
> > of each page.
> > 
> > The file NewGropdf.pdf contains description of some of the features in the
> > new gropdf.
> > 
> > Both of these should continue to work if the groff version changes, thanks
> > to Brian's helpful suggestion to include /usr/share/groff/current in the
> > font path, but I have achieved this by specifying it in an -F flag rather
> > than patching gropdf.
> 
> Nice work Deri!
> 
> The official 6.05.01 book hyphenates words across page breaks more than
> standard 1.23.0 and new 1.23.0+ gropdf books.

Hi Brian,

I'd like to investigate this to understand why this is happening, please can 
you give me example page numbers which illustrate this.

> File sizes are official 6.05.01 ~13.3MB, 200k more than standard 1.23.0
> ~13MB, which is >~5MB more than new 1.23.0+ gropdf <~8MB.
> 
> I now see page footers on all pages!
> 
> I noticed that new 1.23.0+ seems to set some lines, especially tables, a
> little tighter (perhaps because of space handling), but *only* the first
> page "intro(1)" has half the normal spacing from the page header to the
> first heading!

Yes, I can see the difference in intro(1) and I can see a bug in the version 
of an.tmac I provided which may affect hyphenation. Also a page number example 
of the tighter table would be helpful.

> [I also noticed that *poppler* `pdf2text -layout` (used to diff the content
> amd layout) prints the .SH NAME and options dashes as en-dash from the
> official 6.05.01 book, but prints minus from standard 1.23.0 and new
> 1.23.0+ gropdf.]

This is intentional (and probably desirable). The pdf has a mapping so that 
the groff character \- is displayed as HYPHEN (U+0201) but when text is copy/
pasted from the pdf it is converted to HYPHEN-MINUS (U+002D) which is the 
character you get when you hit hyphen on the keyboard. This means that if you 
are copy/pasteing from examples in the man page which includes hyphens then 
your shell will interpret it correctly.

> I notice a number of widows and orphans, but that may be the man macros or
> groff commands not checking for sufficient space left on the page before
> rendering text: allowing 4em before heading spacing, 3em before para
> spacing would probably help, at the cost of larger bottom margins; and
> groff footers need to allow extra space to prevent widows by allowing them
> to intrude.

This probably needs a bit of tender curation! Bear in mind that the 
BuildLinuxMan.pl script uses the flags "-dpaper=a4 -P-pa4" so if the man page 
author has designed for a different page size the widows/orphans may well be 
different.

Thanks for your help.

Cheers

Deri




  reply	other threads:[~2023-08-12 20:24 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-07  1:16 [PATCH] scripts/LinuxManBook/gropdf: use symlink instead of hard coded groff version Brian Inglis
2023-08-07 15:01 ` Brian Inglis
2023-08-07  2:46 ` No 6.05/.01 pdf book available Brian Inglis
2023-08-07  8:45   ` Alejandro Colomar
2023-08-07  9:16     ` Alejandro Colomar
2023-08-07 16:21       ` Brian Inglis
2023-08-12  0:02         ` Alejandro Colomar
2023-08-12  1:48           ` G. Branden Robinson
2023-08-12 21:32             ` Alejandro Colomar
     [not found]     ` <21975186.EfDdHjke4D@pip>
2023-08-11 23:51       ` Alejandro Colomar
2023-08-12  3:04         ` G. Branden Robinson
2023-08-12 21:33           ` Alejandro Colomar
2023-08-12 17:02       ` Brian Inglis
2023-08-12 20:02         ` Deri [this message]
2023-08-13 20:30           ` Brian Inglis
2023-08-13 20:47             ` Alejandro Colomar
2023-08-13 21:55               ` G. Branden Robinson
2023-08-13 22:45                 ` Alejandro Colomar
2023-08-13 22:18               ` Alejandro Colomar
2023-08-14  6:49                 ` Brian Inglis
2023-08-14 10:46                   ` Alejandro Colomar
2023-08-13 21:47             ` hyphens at ends of pages (was: No 6.05/.01 pdf book available) G. Branden Robinson
2023-08-14  5:28               ` Brian Inglis
2023-08-14 16:06             ` No 6.05/.01 pdf book available Deri
2023-08-14 17:37               ` Alejandro Colomar
2023-08-14 20:01                 ` Alejandro Colomar
2023-08-14 21:22                   ` Deri
2023-08-14 21:32                     ` Alejandro Colomar
2023-08-14 23:26                       ` Deri
2023-08-14 21:40                 ` Deri
2023-08-15  0:50                   ` groff features for hyperlinked man pages (was: No 6.05/.01 pdf book available) G. Branden Robinson
2023-08-15 10:34                     ` G. Branden Robinson
2023-08-18 13:50                     ` Alejandro Colomar
2023-08-19  4:37                       ` G. Branden Robinson
2023-10-01 12:02                         ` Alejandro Colomar
2023-08-18 10:29                   ` No 6.05/.01 pdf book available Alejandro Colomar
2023-08-15  0:34               ` Brian Inglis
2023-08-20 16:48                 ` Deri
2023-08-20 18:54                   ` Alejandro Colomar
2023-08-20 19:06                   ` Brian Inglis
     [not found]                     ` <3262525.44csPzL39Z@pip>
2023-08-21 22:02                       ` Alejandro Colomar
2023-08-21 23:10                         ` Deri
2023-08-21 23:45                         ` Brian Inglis
2023-08-28 12:17                           ` Alejandro Colomar
2023-08-28 18:24                             ` Brian Inglis
2023-08-28 21:11                               ` Alejandro Colomar
2023-08-07  8:29 ` [PATCH] scripts/LinuxManBook/gropdf: use symlink instead of hard coded groff version Alejandro Colomar
2023-08-11 23:57 ` Alejandro Colomar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3258129.44csPzL39Z@pip \
    --to=deri@chuzzlewit.myzen.co.uk \
    --cc=Brian.Inglis@shaw.ca \
    --cc=alx@kernel.org \
    --cc=linux-man@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.