Hi Gregor,

Gregor Best wrote on Mon, Jul 08, 2013 at 03:02:53PM +0200:

> In the wake of modifying the port, I'd like to ask if you would approve
> a patch moving the change made in `patches/patch-tmac_troffrc' over to
> `an.tmac'.

Moving any code into an.tmac is definitely not OK.
That file is just a stub redirecting to andoc.tmac,
and both macro files must not behave differently.

Moving any code into andoc.tmac is not OK either.
That file is just a dispatcher to doc.tmac and an-old.tmac.
It is not intended for code doing anything on its own.

I tend to dislike the idea of moving that specific code
into doc.tmac and/or an-old.tmac or into any other file in the
directory /usr/local/share/groff/1.22.2/tmac/ except troffrc.
Code in that directory is not intended to be changed by
end-users, except that user settings do belong into troffrc,
and the settings you are talking about *will* need to be
changed by end-users now and then.

> Specifically, I'm talking about the bit that disables adjustments. Since
> `ad' is re-defined as empty, it is not possible to turn text adjustment
> back on, at least not with `m.tmac', which IMHO only makes sense in
> `an.tmac`.
> 
> What is the reason for emptying `ad' anyway?

See /usr/local/share/doc/pkg-readmes/groff-1.22.2p1:

  Even though roff is a general-purpose typesetting system, the OpenBSD
  groff port is focussed on formatting ports(7) manuals that mandoc(1)
  is unable to handle.  To make groff output as similar as possible to
  mandoc output, the following two groff features have been disabled by
  default: adjustment of text to the right margin and hyphenation.

  If you want to use groff for serious typesetting work and need these
  features, please set up your own troff(1) configuration file:

    mkdir ~/.tmac
    cp /usr/local/share/groff/1.21/tmac/troffrc ~/.tmac/
    export GROFF_TMAC_PATH=~/.tmac

  In your new troffrc file, uncomment these two lines to enable
  hyphenation:

    .do hpf hyphen.us
    .do hpfa hyphenex.us

  Delete these three lines to enable the roff `ad' request, such that
  documents can adjust text to the right margin:

    .ad l
    .de ad
    ..

> Wouldn't it make more sense to fix manpages that explicitly use `ad'
> with parameters other than `l'?

No way.  We are only talking about ports manuals here.  How are you
going to fix them?  Talk to all upstream software maintainers?
Maintain lots of patches for a detail of so little importance?
Both options are not realistic.

Better suggestions are welcome, but so far, i still think asking
end-users to set up their own troffrc file in their home directory
for doing serious typesetting work is the best solution proposed
so far.  In particular, using troffrc has been agreed with the
upstream groff maintainer, Werner Lemberg, who doesn't like either
when downstream fiddles with random files while building packages.

Yours,
  Ingo

Reply via email to