[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: About groff and dformat
From: |
Thomas Dupond |
Subject: |
Re: About groff and dformat |
Date: |
Wed, 17 Aug 2022 17:50:53 +0200 |
Riza Dindir <riza.dindir@gmail.com> wrote:
> Hello Thomas,
Hi!
> Finally I was able to use the dformat without problems.
Congrats! :)
> The problem was the order in the pipe. In the original paper the
> author provided an example on the order of the preprocessors. I did
> not have the correct order. It should have been
>
> !sh dformat.sh format-test.ms | pic | tbl | eqn | groff -ms > main.ps
I have the same result as you have. I don't know why the order matters,
my knowledge of prepocessors is lacking.
However I recreated your document easily with:
$ dformat.awk format-test.ms | groff -ms -pe -Tps > main.ps
I did not use tbl (with the -t switch) and it worked perfectly. You
don't need tbl for this particular document.
I noted that when producing the pdf (either with groff -Tpdf or ps2pdf),
the dotted lines appear thinner than in the postscript file. To be
honest, I would not have noticed them if I only looked at the pdf file.
> That solved the problem, and I can create the dformat in the document.
>
> Thanks for the help.
>
> Regards,
> Riza
>
> On Wed, Aug 17, 2022 at 6:59 AM Riza Dindir <riza.dindir@gmail.com> wrote:
> >
> > Hello Thomas,
> >
> > To make sure, I have this in my dformat.sh
> >
> > awk -f dformat.awk $*
> >
> > I tried with the dformat.awk that I have found
> > (https://github.com/arnoldrobbins/dformat) and the dformat.awk that
> > you have pointed out (https://github.com/sathlan/dformat). But still I
> > am getting the same error message and the dformat picture is displayed
> > partially.
> >
> > What is the version of groff (mine is 1.22.4), and awk (mine is
> > 20210215) that you are using? Clearly I must be doing something wrong.
> >
> > Although I could just remove inline equations from the dformat spec in
> > the document, I would like to understand what is wrong.
> >
> > Regards,
> > Riza
> >
> > On Tue, Aug 16, 2022 at 9:59 PM Thomas Dupond <thomas@dupond.eu> wrote:
> > >
> > > Riza Dindir <riza.dindir@gmail.com> wrote:
> > >
> > > > Hello All,
> > >
> > > Hi!
> > >
> > > > I am trying to get dformat to work. What I did was this.
> > > >
> > > > I first tried to include an example dformat script into my document. I
> > > > got the first example from the troff.org site
> > > > (https://troff.org/prog.html). The first example for the dformat
> > > > processor. That example has been using inline equations/math
> > > > expressions.
> > > >
> > > > Then I went and got the dformat awk script. That script I got from
> > > > (https://github.com/arnoldrobbins/dformat) which might not be the
> > > > original script.
> > >
> > > I know the following github repo is a transcript of the dformat by
> > > Jon L. Bentley:
> > >
> > > https://github.com/sathlan/dformat
> > >
> > > I had no problem generating your document with it. :)
> > >
> > > > Anyways I have this simple document.
> > > >
> > > > .TL
> > > > Some format
> > > > .NH
> > > > deneme
> > > > .EQ
> > > > delim @@
> > > > .EN
> > > > .LP
> > > > .begin dformat
> > > > style bitwid 0.08
> > > > style charwid 0
> > > > style recspread 0.3
> > > > noname
> > > > --16 Frame
> > > > --16 Frame
> > > > A1: --16 Frame
> > > > --16 Frame
> > > > --8-dashed ...
> > > > noname
> > > > A2: 8--8 Flags
> > > > 8--8 Status
> > > > --8 @roman Chunk sub 1@
> > > > B1: --8 @roman Chunk sub 2@
> > > > --8-dashed ...
> > > > --8 @roman Chunk sub m@
> > > > 16--16 CRC
> > > > A3: 8--8 Flags
> > > > noname
> > > > B2: 8--8 @roman Data sub 1@
> > > > 8--8 @roman Data sub 2@
> > > > 8--8 @roman Data sub 3@
> > > > 8--8 @roman Data sub 4@
> > > > --8-dashed ...
> > > > 8--8 @roman Data sub n-1@
> > > > 8--8 @roman Data sub n@
> > > > 6--6 Length
> > > > B3: 10--10 Channel #
> > > > pic line dotted from A1.sw to A2.nw
> > > > pic line dotted from A1.se to A3.ne
> > > > pic line dotted from B1.sw to B2.nw
> > > > pic line dotted from B1.se to B3.ne
> > > > .end
> > > >
> > > > And am running the command line as
> > > >
> > > > !sh dformat.sh format-test.ms | eqn | pic | groff -ms > main.ps
> > > >
> > > > The command says this
> > > >
> > > > pic:<standard input>:98: syntax error before '\'
> > > > pic:<standard input>:98: giving up on this picture
> > > >
> > > > Does anybody use dformat? Which dformat script are you using?
> > > >
> > > > Regards,
> > > > Riza
> > > >
> > > >
> > >
> > > --
> > > Regards,
> > > Thomas
--
Regards,
Thomas