help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Using Emacs as PS converter


From: Eli Zaretskii
Subject: Re: Using Emacs as PS converter
Date: Mon, 01 Dec 2014 22:09:39 +0200

> Date: Mon, 01 Dec 2014 20:58:54 +0100
> From: Angelo Graziosi <angelo.graziosi@alice.it>
> 
> Eli Zaretskii wrote:
> > I don't know, but this minor variation works for me:
> >
> >   emacs -batch foo.c -f ps-spool-buffer-with-faces --eval "(progn 
> > (switch-to-buffer \"*PostScript*\") (write-file \"foo.ps\"))"
> 
> Oh, yes it works! I notice only that foo.ps is black and white... :(
> 
> It has lost the syntax colors... sigh..

You need to define the ps-print faces, I think.  I have something like
this in my .emacs, which works well with black-and-white PS printers:

  (setq ps-bold-faces
        '(font-lock-comment-face
          font-lock-keyword-face
          font-lock-builtin-face
          font-lock-function-name-face
          diff-hunk-header-face
          diff-changed-face
          diff-removed-face
          diff-added-face))
  (setq ps-italic-faces
        '(font-lock-comment-face
          font-lock-variable-name-face
          font-lock-string-face
          diff-header-face))
  (setq ps-underlined-faces
        '(font-lock-type-face
          font-lock-reference-face
          font-lock-builtin-face
          diff-file-header-face
          diff-function-face))

See the section "How Ps-Print Deals With Faces" in the ps-print.el
commentary for more about setting up faces for ps-print.



reply via email to

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