groff
[Top][All Lists]
Advanced

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

Re: [Groff] pdfroff doubles the output


From: Keith Marshall
Subject: Re: [Groff] pdfroff doubles the output
Date: Thu, 26 Jun 2008 00:30:15 +0100
User-agent: KMail/1.9.9

On Wednesday 25 June 2008 23:53:07 Louis Guillaume wrote:
> I have just started to use the pdfmark macros along with -ms and
> pdfroff. It appears that the output is doubled. The resulting pdf
> has the contents twice.
>
> The document is rendered correctly with plain-old groff, but of
> course none of the pdfmark stuff works without that pdfroff.
>
> Is this a known bug?

No, but it is a known feature :-)

> Or am I doing something wrong. This is the invocation:
>
> $ pdfroff -tp -ms -m pdfmark --report-progress lipsum.ms > a.pdf

pdfroff incorporates a rather gruesome hack to collate tables of 
contents, such as those emitted by the ms .TC macro, from the end to 
the beginning of the document; effectively, it emits the document 
twice, capturing the body text in the first pass, and the TOC in the 
second, then pushes the two through ghostscript in collated order.

IIRC, the spdf macro package redefines the .TC macro, adding some 
voodoo to suppress TOC output in the first pass, and body text in the 
second, but if you don't use this macro, you get the full body text 
in both passes, hence the doubled output you are seeing.  To avoid 
this, you should add the `--no-toc-relocation' option...

  $ pdfroff -tp -ms -mpdfmark --no-toc --report lipsum.ms > a.pdf

HTH,
Keith.





reply via email to

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