groff
[Top][All Lists]
Advanced

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

[Groff] pdfmom grep (was parallel text processing)


From: Peter Schaffter
Subject: [Groff] pdfmom grep (was parallel text processing)
Date: Fri, 8 Sep 2017 12:29:42 -0400
User-agent: Mutt/1.5.24 (2015-08-30)

On Fri, Sep 08, 2017, Ralph Corderoy wrote:
> Hi Peter,
> 
> > You'll notice that the top of the pdf file has a line of text spit out
> > by grep(1) that obviously shouldn't be there.
> 
> I couldn't come up with the groff 1.22.3-7 command line required to
> build the PDF correctly, nor get grep's unwanted output.  Deri suggested
> pdfmom's grep might be the culprit, but its stderr should end up on
> pdfmom's stderr?

Problem solved.

The superfluous line at the top of the file ["Binary file (standard
input) matches"] isn't stderr, it's stdout, so it becomes part of
the pipeline.  The grep in pdfmom is returning a binary file hit when
it encounters the diacritic in 

  .ds pdf:look(pdf:bm1) L'étranger

Since the binary file hit doesn't begin with .ds, it prints literally
at the top of the file.

The solution is to pass the -a flag to grep.

Deri: do you want me to fix this in pdfmom and push the change, or
would you prefer to do it yourself?

Question: why does grep treat the presence of the diacritic as cause
for saying "Binary file (standard input) matches"?

-- 
Peter Schaffter
http://www.schaffter.ca



reply via email to

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