[Top][All Lists]

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

Re: very simple off-topic question regarding command line viewing of pos

From: David Wright
Subject: Re: very simple off-topic question regarding command line viewing of postscript files on macOS
Date: Wed, 3 Aug 2022 09:22:47 -0500

On Wed 03 Aug 2022 at 09:22:53 (+0200), Jean Abou Samra wrote:
> > Le 3 août 2022 à 01:24, Kenneth Wolcott <> a écrit :
> >  I'm trying to simplify my workflow. I think I want to generate
> > postscript files instead of pdf files when using Lilypond.  I already
> > know how to do that.  But what I need to know is, on a Mac, how to
> > display the postscript file from the command line.  I used to do this
> > all the time a long time ago when I used UNIX and Linux, but homebrew
> > gs doesn't display the postscript.  I do not want to use preview.
> > 
> >  This used to be a TRIVIAL thing to do when I was younger, but now I
> > am old and my brain just isn't what it used to be.
> > 
> >  I've looked at several man pages and/or info and/or help (lastly
> > /opt/homebrew/Cellar/ghostscript/9.56.1_1/share/doc/ghostscript/9.56.1/Use.htm)
> > 
> > Current attempt:
> > 
> > /opt/homebrew/Cellar/ghostscript/9.56.1_1/bin/gs -sDEVICE=display
> > ../target/
> > GPL Ghostscript 9.56.1 (2022-04-04)
> > Copyright (C) 2022 Artifex Software, Inc.  All rights reserved.
> > This software is supplied under the GNU AGPLv3 and comes with NO WARRANTY:
> > see the file COPYING for details.
> > zsh: segmentation fault
> > /opt/homebrew/Cellar/ghostscript/9.56.1_1/bin/gs -sDEVICE=display
> > 
> > So, what flags should I be using just to display the postscript?
> Personally, I’d just have done
> ps2pdf
> open file.pdf

I'd be tempted to do the same. Having put up with gv's interface for
years, it was a relief when a pdflatex workflow supplanted dvips's.

But another suggestion would be to run LP with -ddelete-intermediate-files='#f'
in which case you get both a PS and PDF. View one, and rename and
process the other. The wrinkle is, of course, that Usage states:

  delete-intermediate-files bool
      If bool is #t, delete the unusable, intermediate .ps files
      created during compilation
      Default: #t.

However, I can't see any visual difference between LP's PDF and the
PDF converted by ps2pdf from the intermediate file. Should I?
What is meant to make the PS unusable?

> I believe this is actually what some of the modern document viewers do if you 
> ask them to open a PS file.
> Bottom line: this may be an XY question. Why do you want to generate 
> PostScript in the first place?

My first thought, too, especially as the OP writes "I /think/ I want
to generate postscript files …". But I hope my suggestions above are
suitably actionable, though not in the sense that word is usually used
over here. :)


reply via email to

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