groff
[Top][All Lists]
Advanced

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

Re: [Groff] Included files are not preprocessed


From: Werner LEMBERG
Subject: Re: [Groff] Included files are not preprocessed
Date: Thu, 06 Dec 2012 14:20:13 +0100 (CET)

>> Does groff's -V option help?  It shows the constructed pipeline.
>>
>>     $ groff -V -Kcp1251 -t -Tutf8
>>     preconv -ecp1251 | tbl | troff -Tutf8 | grotty
>>     $ groff -V -s -Kcp1251 -t -Tutf8
>>     preconv -ecp1251 | soelim | tbl | troff -Tutf8 | grotty
>>
>> The preconv has happened before soelim if -s is used whereas when
>> you run it manually, it's after.
>
> Thank you, Ralph.  I forgot about the -V option.  Now the question
> is whether this sequence is correct or should be changed so that
> soelim will be called before all other preprocessors.  After all,
> soelim's very purpose is to preprocess included files...

This has been discussed a few months ago on the list, IIRC, and then I
stated that I no longer remembered why soelim comes after preconv.
Unfortunately, this comment is still true: I can't remember the
exact cause.

It's easy to change that behaviour, and you might experiment with the
patch below.  I don't object if you want to apply it (together with
improved groff documentation and a proper ChangeLog entry :-).

  $ groff -V -s -Kcp1251 -t -Tutf8
  soelim | preconv -ecp1251 | tbl | troff -Tutf8 | grotty


    Werner


======================================================================


--- groff.cpp.orig      2011-01-22 16:00:20.000000000 +0100
+++ groff.cpp   2012-12-06 14:00:58.000000000 +0100
@@ -53,9 +53,9 @@

 // grap and chem must come before pic;
 // tbl must come before eqn
-const int PRECONV_INDEX = 0;
-const int SOELIM_INDEX = PRECONV_INDEX + 1;
-const int REFER_INDEX = SOELIM_INDEX + 1;
+const int SOELIM_INDEX = 0;
+const int PRECONV_INDEX = SOELIM_INDEX + 1;
+const int REFER_INDEX = PRECONV_INDEX + 1;
 const int GRAP_INDEX = REFER_INDEX + 1;
 const int CHEM_INDEX = GRAP_INDEX + 1;
 const int PIC_INDEX = CHEM_INDEX + 1;



reply via email to

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