How can I include a pic figure as external file in groff?
2
votes
1
answer
981
views
While using
groff
and pic
it is possible to do:
$ cat test.ms
.TL
Test
.NH 1
Test Header
.PS
circle
arrow
box
.PE
$ cat test.ms | groff -ms -p > test.ps
Which generates a valid test.ps
file containing the processed figure in pic
.
In larger documents, for mainteinability, it might be desirable to keep the picture pic
description in a separate file and invoke such file from the main .ms
file.
While trying to get this working I have found that .so
can source an external file, but I am finding issues to set up this configuration of embeding external .pic
files into the main .ms
file as shown here:
$ cat test2.pic
.PS
circle
arrow
box
.PE
$ cat test2.ms
.TL
Test
.NH 1
Test Header
.so test2.pic
$ cat test2.ms | groff -ms -p > test2.ps
test2.pic:1: macro error: bad arguments to PS (not preprocessed with pic?)
$
Which would be the way to achieve this inclusion of .pic
code in the main macro .ms
files as external files?
Asked by M.E.
(631 rep)
May 7, 2021, 10:49 PM
Last activity: May 8, 2021, 01:06 AM
Last activity: May 8, 2021, 01:06 AM