groff
[Top][All Lists]
Advanced

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

Re: [groff] Of grog, preprocessors, and missing programs


From: walter harms
Subject: Re: [groff] Of grog, preprocessors, and missing programs
Date: Thu, 08 Aug 2019 17:40:16 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.1.16) Gecko/20101125 SUSE/3.0.11 Thunderbird/3.0.11


Am 08.08.2019 17:16, schrieb John Gardner:
> I've noticed that grog(1) will suggest options for preprocessors
> irrespective of whether they're even available on the user's system. Some
> aren't part of Groff, like grap(1). Others are excluded from certain base
> installations — Ubuntu Server, for example, ships with pic(1) and tbl(1),
> but omits chem(1), refer(1) and grn(1). Finally, one of the preprocessors
> considered by grog while scanning *doesn't even exist*: gideal, hidden
> behind an undocumented `-J` switch in the main groff(1) executable:
> 
> $ groff -J
> groff: couldn't exec gideal: No such file or directory
> 

the option should be removed ASAP because it is useless an will confuse
users that trigger that accidently.


> $ printf 'Foo\n.IS\n.IE\nBar\n' | grog
> groff -T ps -J -p -
> 
> 
> It's debatable whether or not Grog should concern itself with site-specific
> matters like this. After all, an error at the command-line isn't a big
> deal. Most Troff-savvy users probably have a complete Groff installation on
> their site anyway. Troff-savviness can be reasonably assumed of anybody
> running the grog(1) command from their terminal.
> 
> The problem is when users aren't Troff-savvy, and document formatting is
> performed by a GUI without user intervention. That's exactly half of what
> Roff.js <https://github.com/Alhadis/Roff.js> exists to do — the code
> talking to Groff
> <https://github.com/Alhadis/Roff.js/blob/8678ef365626e049c58b4ad65d62383fe7db49b9/lib/adapters/troff/groff.mjs>
> from the browser is substantially more complex than it should be, due to
> the translation layers involved...
> 
> So. Thoughts?

thoughts:
" grog reads files and guesses which of the groff(1) options ..."

The point here is "guesses". If you add "Note: that does not say that you system
is capable to do so" then IMHO this problem is solved.

On the other side i would no be to complicated to teach grog an "-scan" to check
what of the exspected programms are available.

re,
 wh




reply via email to

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