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