groff
[Top][All Lists]
Advanced

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

Re: pdfroff in groff 1.23.0.rc3 changes compared to 1.22.4


From: Lennart Jablonka
Subject: Re: pdfroff in groff 1.23.0.rc3 changes compared to 1.22.4
Date: Thu, 6 Apr 2023 10:39:13 +0000

Quoth Michał Kruszewski:
I would like to have simple structure: custom cover page -> ToC -> custom page -> text.

The easiest way to do all these things is to split the document in multiple ones. Have one troff document for the cover page. There is little reason for it to use ms. Have one document for the custom page and one for the text. Have the text document use ms and generate the ToC, perhaps by .tm. After processing the text document, you have a ToC document.

Then comes the noteworthy bit: Concatenate the troff output of all those separate documents and feed it all to the postprocessor at once, as in

        troff -ms mainmatter.ms >mainmatter.trout 2>toc
{ troff frontmatter && troff toc && cat mainmatter.trout; } | gropdf >all.pdf

That’s what I would do.

It is not a great thing to mix error output of troff with the ToC; you might want to use fancy groff features to do the first step differently.



reply via email to

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