Dear Branden, Dave, Lennart and Peter (in alphabetical order),
thank you for your various replies and suggestions.
With regard to hidden caveats in my naive one-for-all attempt, I ignored
the potential consequences of the -s option. Thank you for pointing out
that.
So, next to introducing an -A option, a few other feasible ways were
shown, in no particular order of precedence:
* create an alias to groff which includes the required options
* create a makefile
* write a bash wrapper that checks the source file
* instruct vim to run everything
To me personally, the vim approach is most appealing, make is just a
tiny bit of higher caliber than really necessary, a bash wrapper
analysing the file is very elegant, and the alias is indeed a flexible
approach, too.
So, for some of my bigger projects which genuinely rely on a lot of
dependencies I'll use make, for all other projects I'll probably
consider a bash wrapper, followed by aliasing and vim.
Thank you for sharing your thoughts! Which show: There is definitely
more than one way to do it (in style and properly).
Sounds like a good start into the weekend.
Best wishes,
Oliver.
On 23/03/2024 15:23, Oliver Corff wrote:
Hi Lennart,
I constantly ignore this trap due to my less-than-frequent postings.
Thank you for pointing out this one.
Best,
Oliver.
On 22/03/2024 22:26, Lennart Jablonka wrote:
Quoth Oliver Corff via:
Reply-to: Oliver Corff <oliver.co...@email.de>
This might not be the greatest of ideas. An MUA might just decide to
reply to you only, instead of to you and the list.
Dear All,
recently I compiled, and re-compiled, and again recompiled a set of
various documents with different tables, equations etc.. For each of
the
documents, the precise requirements of preprocessors were different,
and
more often than not, I forgot to set the appropriate groff option when
running the compilation to the effect that I had to redo my edit -
check
cycle. Since there is no groffer script anymore, may I humbly propose a
new option to groff, namlely "-A" (mnemomic: [A]ll preprocessors) which
forces all available preprocessors to be used? The penalty of this
display of laziness is, in my eyes, minor: running a document against a
preprocessor which is not needed does not do any harm I am aware of (I
stand to be corrected in case there is such a situation), and since we
talk only of a handful of preprocessors, not dozens, the overhead in
CPU
time should also be acceptable; all the more since -A would be invoked
only in case of the presumed presence of any of tables, equations,
pictures, reference lists.
There is such a situation, where running all available preprocessors
can do harm: soelim expands .so requests, but does so
unconditionally, even if the .so is inside conditional text or a macro
definition or whatnot.
I recently ran into this before noticing that groff’s -I option
implies -s while trying OpenBSD’s remnant -mdoc (in
/usr/src/share/tmac/mdoc). Unlike Groff’s -mdoc, OpenBSD’s -mdoc does
not indent the .so line in the definition of .Hf (which wraps .so).
And so soelim complained about not being able to find a file “\\$1.”
--
Dr. Oliver Corff
Wittelsbacherstr. 5A
10707 Berlin
GERMANY
Tel.: +49-30-85727260
mailto:oliver.co...@email.de
--
Dr. Oliver Corff
Wittelsbacherstr. 5A
10707 Berlin
GERMANY
Tel.: +49-30-85727260
mailto:oliver.co...@email.de