groff
[Top][All Lists]
Advanced

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

Regarding groff, soelim, and macros


From: Riza Dindir
Subject: Regarding groff, soelim, and macros
Date: Tue, 14 Nov 2023 06:59:54 +0300

Hello,

I am having trouble again with macros, soelim.

I am writing a document that will have pic's and equation's in it. I wanted
to separate these into files. One file for each chapter.

But I am having trouble doing this.

Here is an example. The main file has

.\"de source
.\"so \\$1
.\".
foo
.so ch1.tr
foo

And the included chapter has this (ch1.tr)

.PS
circle
arrow
box
.PE

Now if I run this main file using (cat main.tr | groff -p -s > main.ps) I
get the document with the picture. But if I instead uncomment the source
macro and call this macro (.source ch1.tr) instead of (.so ch1.tr), it
fails with (soelim:stdin:2: can't open '\$1': No such file or directory).

Can we create documents that have chapters, sections, that are in separate
files? How can we do this?

Clearly I am missing something. I could as well write another preprocessor
that will process these .source commands, and generate a concatenated file
and run that through the groff processor, but I would like to understand
why this above does not work.

Regards
Riza Dindir


reply via email to

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