[Top][All Lists]

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

Re: One groff file outputting multiple pdfs?

From: Dave Kemper
Subject: Re: One groff file outputting multiple pdfs?
Date: Thu, 19 Nov 2020 23:30:26 -0600

On 11/19/20, Richard Morse <> wrote:
> For reasons having to do
> with how it is being run, it’s not clear to me that I can automate running
> groff, so right now I am manually running the groff command for each
> generation.

Hi Richard,

It's not entirely clear what your workflow is, or why groff can't be
run from within a simple shell script or Makefile as James proposed.

But taking that restriction as a given, does your workflow require
that the input be a *groff* file?  Or only that it be a single file?
If you are running it manually, it seems it could just as easily be a
shell script, right?

If your actual requirements are (a) there be only one input file, and
(b) it produce multiple output files, this is straightforward to do in
a file that's *mostly* groff, but with a handful of shell lines
between each set of input:

groff -ms > << EOF
Contents of file 1
groff -ms > << EOF
Contents of file 2

Generating such a file seems conceptually no more complex than your
example of emitting hypothetical groff requests to change the output
file.  Then the manual step need only be done on one file, but you'd
just execute the file directly rather than calling groff on the
command line.

reply via email to

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