On 17/12/23 06:57, Peter Schaffter wrote:
On Sat, Dec 16, 2023, Mike wrote:
Is there a website where the various document layouts and visual
capabilities of groff are displayed?
If such a website were to exist, it should be divided into
categories by the primary macro set used, with an additional
category "pure groff" for user-written DIY solutions. The mom
macros, for example, handle everything in your list with ease
(except text around images/quotes), but it would be misleading to
post a mom example as *the* way to accomplish something with groff.
Take margin notes. If using mom, they are added with the MN macro.
If using ms, they require Werner Lemberg's standalone margin notes
macros. Showing "that groff can do this" isn't really useful;
groff can handle just about any typographic challenge. Showing
examples of *the ways it can be done* strikes me as better.
I cannot agree more. One of the problems I see with "newcomers" asking
innocent questions is that they have usually tried to do what they want
by using an existing macro set (usually ms or mm, rarely mom). I believe
that they do so in the belief that they *have to use a macro set* and
mom has slipped under their radar because it is so new (how many
decades, Peter?).
Further, the OPs are often unaware that they can use (with caution) more
than one macro set.
Now for my radical suggestion, over my first cup of coffee on what looks
to be a scorcher of a Sunday here on the East Coast of AU. Tell the
newbies to create environments, diversions, defined strings, and number
registers, and tell them to use CamelCase when doing so. By using
CamelCase (which is generally regarded by real programmers as not fit
for human consumption) they will not stuff up anything important written
by the gurus. Encourage the OPs to post their efforts on the list (which
they will probably do anyway as they seek advice) -- as a final step the
suggestion may be made that they rename MyBrilliantDiversion to ... .
Everyone benefits. I know, because the advice and help that I have
received from the list has helped me achieve results that I could never
have pulled off by myself. But I still use CamelCase!!!
Robert
You miss 100% of the shots you never take.
-- Wayne Gretzky, advice from his father