Mercurial > emacs
annotate lisp/ps-print.el @ 16873:205ec6c5d8f3
* (interrupt_signal): Make emergency exit work on MSDOS
frames. Block further SIGINTs while `interrupt_signal' runs.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Thu, 16 Jan 1997 13:12:51 +0000 |
parents | 4a5fa29f79d6 |
children | 18731f7e2c73 |
rev | line source |
---|---|
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1 ;;; ps-print.el --- Jim's Pretty-Good PostScript Generator for Emacs 19. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2 |
14734 | 3 ;; Copyright (C) 1993, 1994, 1995, 1996 Free Software Foundation, Inc. |
7257 | 4 |
16870
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
5 ;; Author: Jim Thompson (was <thompson@wg2.waii.com>) |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
6 ;; Maintainer: Jacques Duthen <duthen@cegelec-red.fr> |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
7 ;; Keywords: print, PostScript |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
8 ;; Time-stamp: <97/01/09 13:52:08 duthen> |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
9 ;; Version: 3.04 |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
10 |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
11 (defconst ps-print-version "3.04" |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
12 "ps-print.el, v 3.04 <97/01/09 duthen> |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
13 |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
14 Jack's last change version -- this file may have been edited as part of |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
15 Emacs without changes to the version number. When reporting bugs, |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
16 please also report the version of Emacs, if any, that ps-print was |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
17 distributed with. |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
18 |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
19 Please send all bug fixes and enhancements to |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
20 Jacques Duthen <duthen@cegelec-red.fr>. |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
21 ") |
7257 | 22 |
10493 | 23 ;; This file is part of GNU Emacs. |
7257 | 24 |
25 ;; GNU Emacs is free software; you can redistribute it and/or modify | |
26 ;; it under the terms of the GNU General Public License as published by | |
27 ;; the Free Software Foundation; either version 2, or (at your option) | |
28 ;; any later version. | |
29 | |
30 ;; GNU Emacs is distributed in the hope that it will be useful, | |
31 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
32 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
33 ;; GNU General Public License for more details. | |
34 | |
35 ;; You should have received a copy of the GNU General Public License | |
14169 | 36 ;; along with GNU Emacs; see the file COPYING. If not, write to the |
37 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
38 ;; Boston, MA 02111-1307, USA. | |
7257 | 39 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
40 ;;; Commentary: |
7257 | 41 |
42 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
43 ;; | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
44 ;; About ps-print |
7257 | 45 ;; -------------- |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
46 ;; |
7257 | 47 ;; This package provides printing of Emacs buffers on PostScript |
48 ;; printers; the buffer's bold and italic text attributes are | |
49 ;; preserved in the printer output. Ps-print is intended for use with | |
10683 | 50 ;; Emacs 19 or Lucid Emacs, together with a fontifying package such as |
51 ;; font-lock or hilit. | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
52 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
53 ;; |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
54 ;; Using ps-print |
7257 | 55 ;; -------------- |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
56 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
57 ;; The Commands |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
58 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
59 ;; Ps-print provides eight commands for generating PostScript images |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
60 ;; of Emacs buffers: |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
61 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
62 ;; ps-print-buffer |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
63 ;; ps-print-buffer-with-faces |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
64 ;; ps-print-region |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
65 ;; ps-print-region-with-faces |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
66 ;; ps-spool-buffer |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
67 ;; ps-spool-buffer-with-faces |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
68 ;; ps-spool-region |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
69 ;; ps-spool-region-with-faces |
7257 | 70 ;; |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
71 ;; These commands all perform essentially the same function: they |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
72 ;; generate PostScript images suitable for printing on a PostScript |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
73 ;; printer or displaying with GhostScript. These commands are |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
74 ;; collectively referred to as "ps-print- commands". |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
75 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
76 ;; The word "print" or "spool" in the command name determines when the |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
77 ;; PostScript image is sent to the printer: |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
78 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
79 ;; print - The PostScript image is immediately sent to the |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
80 ;; printer; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
81 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
82 ;; spool - The PostScript image is saved temporarily in an |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
83 ;; Emacs buffer. Many images may be spooled locally |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
84 ;; before printing them. To send the spooled images |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
85 ;; to the printer, use the command `ps-despool'. |
7257 | 86 ;; |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
87 ;; The spooling mechanism was designed for printing lots of small |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
88 ;; files (mail messages or netnews articles) to save paper that would |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
89 ;; otherwise be wasted on banner pages, and to make it easier to find |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
90 ;; your output at the printer (it's easier to pick up one 50-page |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
91 ;; printout than to find 50 single-page printouts). |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
92 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
93 ;; Ps-print has a hook in the `kill-emacs-hooks' so that you won't |
14040 | 94 ;; accidentally quit from Emacs while you have unprinted PostScript |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
95 ;; waiting in the spool buffer. If you do attempt to exit with |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
96 ;; spooled PostScript, you'll be asked if you want to print it, and if |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
97 ;; you decline, you'll be asked to confirm the exit; this is modeled |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
98 ;; on the confirmation that Emacs uses for modified buffers. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
99 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
100 ;; The word "buffer" or "region" in the command name determines how |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
101 ;; much of the buffer is printed: |
7257 | 102 ;; |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
103 ;; buffer - Print the entire buffer. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
104 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
105 ;; region - Print just the current region. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
106 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
107 ;; The -with-faces suffix on the command name means that the command |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
108 ;; will include font, color, and underline information in the |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
109 ;; PostScript image, so the printed image can look as pretty as the |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
110 ;; buffer. The ps-print- commands without the -with-faces suffix |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
111 ;; don't include font, color, or underline information; images printed |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
112 ;; with these commands aren't as pretty, but are faster to generate. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
113 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
114 ;; Two ps-print- command examples: |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
115 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
116 ;; ps-print-buffer - print the entire buffer, |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
117 ;; without font, color, or |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
118 ;; underline information, and |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
119 ;; send it immediately to the |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
120 ;; printer. |
7257 | 121 ;; |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
122 ;; ps-spool-region-with-faces - print just the current region; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
123 ;; include font, color, and |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
124 ;; underline information, and |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
125 ;; spool the image in Emacs to |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
126 ;; send to the printer later. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
127 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
128 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
129 ;; Invoking Ps-Print |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
130 ;; ----------------- |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
131 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
132 ;; To print your buffer, type |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
133 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
134 ;; M-x ps-print-buffer |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
135 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
136 ;; or substitute one of the other seven ps-print- commands. The |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
137 ;; command will generate the PostScript image and print or spool it as |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
138 ;; specified. By giving the command a prefix argument |
7257 | 139 ;; |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
140 ;; C-u M-x ps-print-buffer |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
141 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
142 ;; it will save the PostScript image to a file instead of sending it |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
143 ;; to the printer; you will be prompted for the name of the file to |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
144 ;; save the image to. The prefix argument is ignored by the commands |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
145 ;; that spool their images, but you may save the spooled images to a |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
146 ;; file by giving a prefix argument to `ps-despool': |
7257 | 147 ;; |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
148 ;; C-u M-x ps-despool |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
149 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
150 ;; When invoked this way, `ps-despool' will prompt you for the name of |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
151 ;; the file to save to. |
7257 | 152 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
153 ;; Any of the `ps-print-' commands can be bound to keys; I recommend |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
154 ;; binding `ps-spool-buffer-with-faces', `ps-spool-region-with-faces', |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
155 ;; and `ps-despool'. Here are the bindings I use on my Sun 4 keyboard: |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
156 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
157 ;; (global-set-key 'f22 'ps-spool-buffer-with-faces) ;f22 is prsc |
7257 | 158 ;; (global-set-key '(shift f22) 'ps-spool-region-with-faces) |
159 ;; (global-set-key '(control f22) 'ps-despool) | |
160 ;; | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
161 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
162 ;; The Printer Interface |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
163 ;; --------------------- |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
164 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
165 ;; The variables `ps-lpr-command' and `ps-lpr-switches' determine what |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
166 ;; command is used to send the PostScript images to the printer, and |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
167 ;; what arguments to give the command. These are analogous to |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
168 ;; `lpr-command' and `lpr-switches'. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
169 ;; Make sure that they contain appropriate values for your system; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
170 ;; see the usage notes below and the documentation of these variables. |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
171 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
172 ;; NOTE: `ps-lpr-command' and `ps-lpr-switches' take their initial values |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
173 ;; from the variables `lpr-command' and `lpr-switches'. If you have |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
174 ;; `lpr-command' set to invoke a pretty-printer such as `enscript', |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
175 ;; then ps-print won't work properly. `ps-lpr-command' must name |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
176 ;; a program that does not format the files it prints. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
177 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
178 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
179 ;; The Page Layout |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
180 ;; --------------- |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
181 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
182 ;; All dimensions are floats in PostScript points. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
183 ;; 1 inch == 2.54 cm == 72 points |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
184 ;; 1 cm == (/ 1 2.54) inch == (/ 72 2.54) points |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
185 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
186 ;; The variable `ps-paper-type' determines the size of paper ps-print |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
187 ;; formats for; it should contain one of the symbols: |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
188 ;; `a4' `a3' `letter' `legal' `letter-small' `tabloid' |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
189 ;; `ledger' `statement' `executive' `a4small' `b4' `b5' |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
190 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
191 ;; The variable `ps-landscape-mode' determines the orientation |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
192 ;; of the printing on the page: |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
193 ;; nil means `portrait' mode, non-nil means `landscape' mode. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
194 ;; There is no oblique mode yet, though this is easy to do in ps. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
195 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
196 ;; In landscape mode, the text is NOT scaled: you may print 70 lines |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
197 ;; in portrait mode and only 50 lignes in landscape mode. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
198 ;; The margins represent margins in the printed paper: |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
199 ;; the top margin is the margin between the top of the page |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
200 ;; and the printed header, whatever the orientation is. |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
201 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
202 ;; The variable `ps-number-of-columns' determines the number of columns |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
203 ;; both in landscape and portrait mode. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
204 ;; You can use: |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
205 ;; - (the standard) one column portrait mode |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
206 ;; - (my favorite) two columns landscape mode (which spares trees) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
207 ;; but also |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
208 ;; - one column landscape mode for files with very long lines. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
209 ;; - multi-column portrait or landscape mode |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
210 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
211 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
212 ;; Horizontal layout |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
213 ;; ----------------- |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
214 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
215 ;; The horizontal layout is determined by the variables |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
216 ;; `ps-left-margin' `ps-inter-column' `ps-right-margin' |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
217 ;; as follows: |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
218 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
219 ;; ------------------------------------------ |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
220 ;; | | | | | | | | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
221 ;; | lm | text | ic | text | ic | text | rm | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
222 ;; | | | | | | | | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
223 ;; ------------------------------------------ |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
224 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
225 ;; If `ps-number-of-columns' is 1, `ps-inter-column' is not relevant. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
226 ;; Usually, lm = rm > 0 and ic = lm |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
227 ;; If (ic < 0), the text of adjacent columns can overlap. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
228 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
229 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
230 ;; Vertical layout |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
231 ;; --------------- |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
232 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
233 ;; The vertical layout is determined by the variables |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
234 ;; `ps-bottom-margin' `ps-top-margin' `ps-header-offset' |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
235 ;; as follows: |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
236 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
237 ;; |--------| |--------| |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
238 ;; | tm | | tm | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
239 ;; |--------| |--------| |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
240 ;; | header | | | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
241 ;; |--------| | | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
242 ;; | ho | | | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
243 ;; |--------| or | text | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
244 ;; | | | | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
245 ;; | text | | | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
246 ;; | | | | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
247 ;; |--------| |--------| |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
248 ;; | bm | | bm | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
249 ;; |--------| |--------| |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
250 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
251 ;; If `ps-print-header' is nil, `ps-header-offset' is not relevant. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
252 ;; The margins represent margins in the printed paper: |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
253 ;; the top margin is the margin between the top of the page |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
254 ;; and the printed header, whatever the orientation is. |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
255 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
256 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
257 ;; Headers |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
258 ;; ------- |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
259 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
260 ;; Ps-print can print headers at the top of each column; the default |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
261 ;; headers contain the following four items: on the left, the name of |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
262 ;; the buffer and, if the buffer is visiting a file, the file's |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
263 ;; directory; on the right, the page number and date of printing. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
264 ;; The default headers look something like this: |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
265 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
266 ;; ps-print.el 1/21 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
267 ;; /home/jct/emacs-lisp/ps/new 94/12/31 |
7257 | 268 ;; |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
269 ;; When printing on duplex printers, left and right are reversed so |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
270 ;; that the page numbers are toward the outside (cf. `ps-spool-duplex'). |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
271 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
272 ;; Headers are configurable: |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
273 ;; To turn them off completely, set `ps-print-header' to nil. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
274 ;; To turn off the header's gaudy framing box, |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
275 ;; set `ps-print-header-frame' to nil. |
7257 | 276 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
277 ;; The font family and size of text in the header are determined |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
278 ;; by the variables `ps-header-font-family', `ps-header-font-size' and |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
279 ;; `ps-header-title-font-size' (see below). |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
280 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
281 ;; The variable `ps-header-line-pad' determines the portion of a header |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
282 ;; title line height to insert between the header frame and the text |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
283 ;; it contains, both in the vertical and horizontal directions: |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
284 ;; .5 means half a line. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
285 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
286 ;; Page numbers are printed in `n/m' format, indicating page n of m pages; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
287 ;; to omit the total page count and just print the page number, |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
288 ;; set `ps-show-n-of-n' to nil. |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
289 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
290 ;; The amount of information in the header can be changed by changing |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
291 ;; the number of lines. To show less, set `ps-header-lines' to 1, and |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
292 ;; the header will show only the buffer name and page number. To show |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
293 ;; more, set `ps-header-lines' to 3, and the header will show the time of |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
294 ;; printing below the date. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
295 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
296 ;; To change the content of the headers, change the variables |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
297 ;; `ps-left-header' and `ps-right-header'. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
298 ;; These variables are lists, specifying top-to-bottom the text |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
299 ;; to display on the left or right side of the header. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
300 ;; Each element of the list should be a string or a symbol. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
301 ;; Strings are inserted directly into the PostScript arrays, |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
302 ;; and should contain the PostScript string delimiters '(' and ')'. |
7257 | 303 ;; |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
304 ;; Symbols in the header format lists can either represent functions |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
305 ;; or variables. Functions are called, and should return a string to |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
306 ;; show in the header. Variables should contain strings to display in |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
307 ;; the header. In either case, function or variable, the PostScript |
14040 | 308 ;; string delimiters are added by ps-print, and should not be part of |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
309 ;; the returned value. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
310 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
311 ;; Here's an example: say we want the left header to display the text |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
312 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
313 ;; Moe |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
314 ;; Larry |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
315 ;; Curly |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
316 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
317 ;; where we have a function to return "Moe" |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
318 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
319 ;; (defun moe-func () |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
320 ;; "Moe") |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
321 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
322 ;; a variable specifying "Larry" |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
323 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
324 ;; (setq larry-var "Larry") |
7257 | 325 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
326 ;; and a literal for "Curly". Here's how `ps-left-header' should be |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
327 ;; set: |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
328 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
329 ;; (setq ps-left-header (list 'moe-func 'larry-var "(Curly)")) |
7257 | 330 ;; |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
331 ;; Note that Curly has the PostScript string delimiters inside his |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
332 ;; quotes -- those aren't misplaced lisp delimiters! |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
333 ;; Without them, PostScript would attempt to call the undefined |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
334 ;; function Curly, which would result in a PostScript error. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
335 ;; Since most printers don't report PostScript errors except by |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
336 ;; aborting the print job, this kind of error can be hard to track down. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
337 ;; Consider yourself warned! |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
338 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
339 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
340 ;; Duplex Printers |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
341 ;; --------------- |
7257 | 342 ;; |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
343 ;; If you have a duplex-capable printer (one that prints both sides of |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
344 ;; the paper), set `ps-spool-duplex' to t. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
345 ;; Ps-print will insert blank pages to make sure each buffer starts |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
346 ;; on the correct side of the paper. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
347 ;; Don't forget to set `ps-lpr-switches' to select duplex printing |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
348 ;; for your printer. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
349 ;; |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
350 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
351 ;; Font managing |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
352 ;; ------------- |
7257 | 353 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
354 ;; Ps-print now knows rather precisely some fonts: |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
355 ;; the variable `ps-font-info-database' contains information |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
356 ;; for a list of font families (currently mainly `Courier' `Helvetica' |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
357 ;; `Times' `Palatino' `Helvetica-Narrow' `NewCenturySchlbk'). |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
358 ;; Each font family contains the font names for standard, bold, italic |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
359 ;; and bold-italic characters, a reference size (usually 10) and the |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
360 ;; corresponding line height, width of a space and average character width. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
361 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
362 ;; The variable `ps-font-family' determines which font family |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
363 ;; is to be used for ordinary text. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
364 ;; If its value does not correspond to a known font family, |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
365 ;; an error message is printed into the `*Messages*' buffer, |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
366 ;; which lists the currently available font families. |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
367 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
368 ;; The variable `ps-font-size' determines the size (in points) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
369 ;; of the font for ordinary text, when generating Postscript. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
370 ;; Its value is a float. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
371 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
372 ;; Similarly, the variable `ps-header-font-family' determines |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
373 ;; which font family is to be used for text in the header. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
374 ;; The variable `ps-header-font-size' determines the font size, |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
375 ;; in points, for text in the header. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
376 ;; The variable `ps-header-title-font-size' determines the font size, |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
377 ;; in points, for the top line of text in the header. |
7257 | 378 ;; |
10738
e7d5b119b583
(ps-print-version): Add caveat about version number.
Richard M. Stallman <rms@gnu.org>
parents:
10683
diff
changeset
|
379 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
380 ;; Adding a new font family |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
381 ;; ------------------------ |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
382 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
383 ;; To use a new font family, you MUST first teach ps-print |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
384 ;; this font, ie add its information to `ps-font-info-database', |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
385 ;; otherwise ps-print cannot correctly place line and page breaks. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
386 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
387 ;; For example, assuming `Helvetica' is unkown, |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
388 ;; you first need to do the following ONLY ONCE: |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
389 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
390 ;; - create a new buffer |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
391 ;; - generate the PostScript image to a file (C-u M-x ps-print-buffer) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
392 ;; - open this file and find the line: |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
393 ;; `% 3 cm 20 cm moveto 10 /Courier ReportFontInfo showpage' |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
394 ;; - delete the leading `%' (which is the Postscript comment character) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
395 ;; - replace in this line `Courier' by the new font (say `Helvetica') |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
396 ;; to get the line: |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
397 ;; `3 cm 20 cm moveto 10 /Helvetica ReportFontInfo showpage' |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
398 ;; - send this file to the printer (or to ghostscript). |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
399 ;; You should read the following on the output page: |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
400 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
401 ;; For Helvetica 10 point, the line height is 11.56, the space width is 2.78 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
402 ;; and a crude estimate of average character width is 5.09243 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
403 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
404 ;; - Add these values to the `ps-font-info-database': |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
405 ;; (setq ps-font-info-database |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
406 ;; (append |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
407 ;; '((Helvetica ; the family name |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
408 ;; "Helvetica" "Helvetica-Bold" "Helvetica-Oblique" "Helvetica-BoldOblique" |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
409 ;; 10.0 11.56 2.78 5.09243)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
410 ;; ps-font-info-database)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
411 ;; - Now you can use this font family with any size: |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
412 ;; (setq ps-font-family 'Helvetica) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
413 ;; - if you want to use this family in another emacs session, you must |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
414 ;; put into your `~/.emacs': |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
415 ;; (require 'ps-print) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
416 ;; (setq ps-font-info-database (append ...))) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
417 ;; if you don't want to load ps-print, you have to copy the whole value: |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
418 ;; (setq ps-font-info-database '(<your stuff> <the standard stuff>)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
419 ;; or, if you can wait until the `ps-print-hook' is implemented, do: |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
420 ;; (add-hook 'ps-print-hook '(setq ps-font-info-database (append ...))) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
421 ;; This does not work yet, since there is no `ps-print-hook' yet. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
422 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
423 ;; You can create new `mixed' font families like: |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
424 ;; (my-mixed-family |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
425 ;; "Courier-Bold" "Helvetica" |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
426 ;; "Zapf-Chancery-MediumItalic" "NewCenturySchlbk-BoldItalic" |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
427 ;; 10.0 10.55 6.0 6.0) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
428 ;; Now you can use your new font family with any size: |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
429 ;; (setq ps-font-family 'my-mixed-family) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
430 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
431 ;; You can get information on all the fonts resident in YOUR printer |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
432 ;; by uncommenting the line: |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
433 ;; % 3 cm 20 cm moveto ReportAllFontInfo showpage |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
434 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
435 ;; The postscript file should be sent to YOUR postscript printer. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
436 ;; If you send it to ghostscript or to another postscript printer, |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
437 ;; you may get slightly different results. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
438 ;; Anyway, as ghostscript fonts are autoload, you won't get |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
439 ;; much font info. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
440 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
441 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
442 ;; How Ps-Print Deals With Faces |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
443 ;; ----------------------------- |
10738
e7d5b119b583
(ps-print-version): Add caveat about version number.
Richard M. Stallman <rms@gnu.org>
parents:
10683
diff
changeset
|
444 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
445 ;; The ps-print-*-with-faces commands attempt to determine which faces |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
446 ;; should be printed in bold or italic, but their guesses aren't |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
447 ;; always right. For example, you might want to map colors into faces |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
448 ;; so that blue faces print in bold, and red faces in italic. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
449 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
450 ;; It is possible to force ps-print to consider specific faces bold or |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
451 ;; italic, no matter what font they are displayed in, by setting the |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
452 ;; variables `ps-bold-faces' and `ps-italic-faces'. These variables |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
453 ;; contain lists of faces that ps-print should consider bold or |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
454 ;; italic; to set them, put code like the following into your .emacs |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
455 ;; file: |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
456 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
457 ;; (setq ps-bold-faces '(my-blue-face)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
458 ;; (setq ps-italic-faces '(my-red-face)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
459 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
460 ;; Faces like bold-italic that are both bold and italic should go in |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
461 ;; *both* lists. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
462 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
463 ;; Ps-print keeps internal lists of which fonts are bold and which are |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
464 ;; italic; these lists are built the first time you invoke ps-print. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
465 ;; For the sake of efficiency, the lists are built only once; the same |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
466 ;; lists are referred in later invocations of ps-print. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
467 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
468 ;; Because these lists are built only once, it's possible for them to |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
469 ;; get out of sync, if a face changes, or if new faces are added. To |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
470 ;; get the lists back in sync, you can set the variable |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
471 ;; `ps-build-face-reference' to t, and the lists will be rebuilt the |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
472 ;; next time ps-print is invoked. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
473 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
474 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
475 ;; How Ps-Print Deals With Color |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
476 ;; ----------------------------- |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
477 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
478 ;; Ps-print detects faces with foreground and background colors |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
479 ;; defined and embeds color information in the PostScript image. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
480 ;; The default foreground and background colors are defined by the |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
481 ;; variables `ps-default-fg' and `ps-default-bg'. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
482 ;; On black-and-white printers, colors are displayed in grayscale. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
483 ;; To turn off color output, set `ps-print-color-p' to nil. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
484 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
485 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
486 ;; Utilities |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
487 ;; --------- |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
488 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
489 ;; Some tools are provided to help you customize your font setup. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
490 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
491 ;; `ps-setup' returns (some part of) the current setup. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
492 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
493 ;; To avoid wrapping too many lines, you may want to adjust the |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
494 ;; left and right margins and the font size. On UN*X systems, do: |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
495 ;; pr -t file | awk '{printf "%3d %s\n", length($0), $0}' | sort -r | head |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
496 ;; to determine the longest lines of your file. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
497 ;; Then, the command `ps-line-lengths' will give you the correspondance |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
498 ;; between a line length (number of characters) and the maximum font |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
499 ;; size which doesn't wrap such a line with the current ps-print setup. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
500 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
501 ;; The commands `ps-nb-pages-buffer' and `ps-nb-pages-region' display |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
502 ;; the correspondance between a number of pages and the maximum font |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
503 ;; size which allow the number of lines of the current buffer or of |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
504 ;; its current region to fit in this number of pages. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
505 ;; Note: line folding is not taken into account in this process |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
506 ;; and could change the results. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
507 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
508 ;; |
10738
e7d5b119b583
(ps-print-version): Add caveat about version number.
Richard M. Stallman <rms@gnu.org>
parents:
10683
diff
changeset
|
509 ;; New since version 1.5 |
e7d5b119b583
(ps-print-version): Add caveat about version number.
Richard M. Stallman <rms@gnu.org>
parents:
10683
diff
changeset
|
510 ;; --------------------- |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
511 ;; |
10738
e7d5b119b583
(ps-print-version): Add caveat about version number.
Richard M. Stallman <rms@gnu.org>
parents:
10683
diff
changeset
|
512 ;; Color output capability. |
e7d5b119b583
(ps-print-version): Add caveat about version number.
Richard M. Stallman <rms@gnu.org>
parents:
10683
diff
changeset
|
513 ;; Automatic detection of font attributes (bold, italic). |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
514 ;; Configurable headers with page numbers. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
515 ;; Slightly faster. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
516 ;; Support for different paper sizes. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
517 ;; Better conformance to PostScript Document Structure Conventions. |
10738
e7d5b119b583
(ps-print-version): Add caveat about version number.
Richard M. Stallman <rms@gnu.org>
parents:
10683
diff
changeset
|
518 ;; |
e7d5b119b583
(ps-print-version): Add caveat about version number.
Richard M. Stallman <rms@gnu.org>
parents:
10683
diff
changeset
|
519 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
520 ;; New since version 2.8 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
521 ;; --------------------- |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
522 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
523 ;; [jack] 960517 Jacques Duthen <duthen@cegelec-red.fr> |
10738
e7d5b119b583
(ps-print-version): Add caveat about version number.
Richard M. Stallman <rms@gnu.org>
parents:
10683
diff
changeset
|
524 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
525 ;; Font familiy and float size for text and header. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
526 ;; Landscape mode. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
527 ;; Multiple columns. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
528 ;; Tools for page setup. |
10738
e7d5b119b583
(ps-print-version): Add caveat about version number.
Richard M. Stallman <rms@gnu.org>
parents:
10683
diff
changeset
|
529 ;; |
7257 | 530 ;; |
531 ;; Known bugs and limitations of ps-print: | |
532 ;; -------------------------------------- | |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
533 ;; |
11799
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
534 ;; Although color printing will work in XEmacs 19.12, it doesn't work |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
535 ;; well; in particular, bold or italic fonts don't print in the right |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
536 ;; background color. |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
537 ;; |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
538 ;; Invisible properties aren't correctly ignored in XEmacs 19.12. |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
539 ;; |
10738
e7d5b119b583
(ps-print-version): Add caveat about version number.
Richard M. Stallman <rms@gnu.org>
parents:
10683
diff
changeset
|
540 ;; Automatic font-attribute detection doesn't work well, especially |
10683 | 541 ;; with hilit19 and older versions of get-create-face. Users having |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
542 ;; problems with auto-font detection should use the lists |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
543 ;; `ps-italic-faces' and `ps-bold-faces' and/or turn off automatic |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
544 ;; detection by setting `ps-auto-font-detect' to nil. |
10683 | 545 ;; |
11799
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
546 ;; Automatic font-attribute detection doesn't work with XEmacs 19.12 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
547 ;; in tty mode; use the lists `ps-italic-faces' and `ps-bold-faces' |
11799
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
548 ;; instead. |
7257 | 549 ;; |
10683 | 550 ;; Still too slow; could use some hand-optimization. |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
551 ;; |
7257 | 552 ;; ASCII Control characters other than tab, linefeed and pagefeed are |
553 ;; not handled. | |
554 ;; | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
555 ;; Default background color isn't working. |
7257 | 556 ;; |
557 ;; Faces are always treated as opaque. | |
558 ;; | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
559 ;; Epoch and Emacs 18 not supported. At all. |
7257 | 560 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
561 ;; Fixed-pitch fonts work better for line folding, but are not required. |
7257 | 562 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
563 ;; `ps-nb-pages-buffer' and `ps-nb-pages-region' don't take care |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
564 ;; of folding lines. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
565 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
566 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
567 ;; Things to change: |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
568 ;; ---------------- |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
569 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
570 ;; Add `ps-print-hook' (I don't know how to do that (yet!)). |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
571 ;; Add 4-up capability (really needed?). |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
572 ;; Add line numbers (should not be too hard). |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
573 ;; Add `ps-non-bold-faces' and `ps-non-italic-faces' (should be easy). |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
574 ;; Put one header per page over the columns (easy but needed?). |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
575 ;; Improve the memory management for big files (hard?). |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
576 ;; `ps-nb-pages-buffer' and `ps-nb-pages-region' should take care |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
577 ;; of folding lines. |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
578 ;; |
7257 | 579 ;; |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
580 ;; Acknowledgements |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
581 ;; ---------------- |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
582 ;; Thanks to Jim Thompson <?@?> for the 2.8 version I started from. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
583 ;; [jack] |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
584 ;; |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
585 ;; Thanks to Kevin Rodgers <kevinr@ihs.com> for adding support for |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
586 ;; color and the invisible property. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
587 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
588 ;; Thanks to Avishai Yacobi, avishaiy@mcil.comm.mot.com, for writing |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
589 ;; the initial port to Emacs 19. His code is no longer part of |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
590 ;; ps-print, but his work is still appreciated. |
7257 | 591 ;; |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
592 ;; Thanks to Remi Houdaille and Michel Train, michel@metasoft.fdn.org, |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
593 ;; for adding underline support. Their code also is no longer part of |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
594 ;; ps-print, but their efforts are not forgotten. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
595 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
596 ;; Thanks also to all of you who mailed code to add features to |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
597 ;; ps-print; although I didn't use your code, I still appreciate your |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
598 ;; sharing it with me. |
7257 | 599 ;; |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
600 ;; Thanks to all who mailed comments, encouragement, and criticism. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
601 ;; Thanks also to all who responded to my survey; I had too many |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
602 ;; responses to reply to them all, but I greatly appreciate your |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
603 ;; interest. |
7257 | 604 ;; |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
605 ;; Jim |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
606 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
7257 | 607 |
608 ;;; Code: | |
609 | |
16870
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
610 (eval-when-compile |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
611 (require 'cl)) |
10738
e7d5b119b583
(ps-print-version): Add caveat about version number.
Richard M. Stallman <rms@gnu.org>
parents:
10683
diff
changeset
|
612 |
16870
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
613 (unless (featurep 'lisp-float-type) |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
614 (error "`ps-print' requires floating point support")) |
7257 | 615 |
616 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
617 ;; User Variables: |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
618 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
619 ;;; Interface to the command system |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
620 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
621 (defvar ps-lpr-command lpr-command |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
622 "*The shell command for printing a PostScript file.") |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
623 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
624 (defvar ps-lpr-switches lpr-switches |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
625 "*A list of extra switches to pass to `ps-lpr-command'.") |
7257 | 626 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
627 ;;; Page layout |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
628 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
629 ;; All page dimensions are in PostScript points. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
630 ;; 1 inch == 2.54 cm == 72 points |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
631 ;; 1 cm == (/ 1 2.54) inch == (/ 72 2.54) points |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
632 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
633 ;; Letter 8.5 inch x 11.0 inch |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
634 ;; Legal 8.5 inch x 14.0 inch |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
635 ;; A4 8.26 inch x 11.69 inch = 21.0 cm x 29.7 cm |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
636 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
637 ;; LetterSmall 7.68 inch x 10.16 inch |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
638 ;; Tabloid 11.0 inch x 17.0 inch |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
639 ;; Ledger 17.0 inch x 11.0 inch |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
640 ;; Statement 5.5 inch x 8.5 inch |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
641 ;; Executive 7.5 inch x 10.0 inch |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
642 ;; A3 11.69 inch x 16.5 inch = 29.7 cm x 42.0 cm |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
643 ;; A4Small 7.47 inch x 10.85 inch |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
644 ;; B4 10.125 inch x 14.33 inch |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
645 ;; B5 7.16 inch x 10.125 inch |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
646 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
647 (defvar ps-page-dimensions-database |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
648 (list (list 'a4 (/ (* 72 21.0) 2.54) (/ (* 72 29.7) 2.54)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
649 (list 'a3 (/ (* 72 29.7) 2.54) (/ (* 72 42.0) 2.54)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
650 (list 'letter (* 72 8.5) (* 72 11.0)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
651 (list 'legal (* 72 8.5) (* 72 14.0)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
652 (list 'letter-small (* 72 7.68) (* 72 10.16)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
653 (list 'tabloid (* 72 11.0) (* 72 17.0)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
654 (list 'ledger (* 72 17.0) (* 72 11.0)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
655 (list 'statement (* 72 5.5) (* 72 8.5)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
656 (list 'executive (* 72 7.5) (* 72 10.0)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
657 (list 'a4small (* 72 7.47) (* 72 10.85)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
658 (list 'b4 (* 72 10.125) (* 72 14.33)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
659 (list 'b5 (* 72 7.16) (* 72 10.125))) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
660 "*List associating a symbolic paper type to its width and height. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
661 see `ps-paper-type'.") |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
662 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
663 (defvar ps-paper-type 'letter |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
664 "*Specifies the size of paper to format for. |
16870
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
665 Should be one of the paper types defined in `ps-page-dimensions-database', for |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
666 example `letter', `legal' or `a4'.") |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
667 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
668 (defvar ps-landscape-mode 'nil |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
669 "*Non-nil means print in landscape mode.") |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
670 |
16870
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
671 (defvar ps-number-of-columns (if ps-landscape-mode 2 1) |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
672 "*Specifies the number of columns") |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
673 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
674 ;;; Horizontal layout |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
675 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
676 ;; ------------------------------------------ |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
677 ;; | | | | | | | | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
678 ;; | lm | text | ic | text | ic | text | rm | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
679 ;; | | | | | | | | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
680 ;; ------------------------------------------ |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
681 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
682 (defvar ps-left-margin (/ (* 72 2.0) 2.54) ; 2 cm |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
683 "*Left margin in points (1/72 inch).") |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
684 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
685 (defvar ps-right-margin (/ (* 72 2.0) 2.54) ; 2 cm |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
686 "*Right margin in points (1/72 inch).") |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
687 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
688 (defvar ps-inter-column (/ (* 72 2.0) 2.54) ; 2 cm |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
689 "*Horizontal space between columns in points (1/72 inch).") |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
690 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
691 ;;; Vertical layout |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
692 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
693 ;; |--------| |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
694 ;; | tm | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
695 ;; |--------| |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
696 ;; | header | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
697 ;; |--------| |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
698 ;; | ho | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
699 ;; |--------| |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
700 ;; | text | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
701 ;; |--------| |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
702 ;; | bm | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
703 ;; |--------| |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
704 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
705 (defvar ps-bottom-margin (/ (* 72 1.5) 2.54) ; 1.5 cm |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
706 "*Bottom margin in points (1/72 inch).") |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
707 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
708 (defvar ps-top-margin (/ (* 72 1.5) 2.54) ; 1.5 cm |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
709 "*Top margin in points (1/72 inch).") |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
710 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
711 (defvar ps-header-offset (/ (* 72 1.0) 2.54) ; 1.0 cm |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
712 "*Vertical space in points (1/72 inch) between the main text and the header.") |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
713 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
714 (defvar ps-header-line-pad 0.15 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
715 "*Portion of a header title line height to insert between the header frame |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
716 and the text it contains, both in the vertical and horizontal directions.") |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
717 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
718 ;;; Header setup |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
719 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
720 (defvar ps-print-header t |
10493 | 721 "*Non-nil means print a header at the top of each page. |
722 By default, the header displays the buffer name, page number, and, if | |
723 the buffer is visiting a file, the file's directory. Headers are | |
724 customizable by changing variables `ps-header-left' and | |
725 `ps-header-right'.") | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
726 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
727 (defvar ps-print-header-frame t |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
728 "*Non-nil means draw a gaudy frame around the header.") |
7257 | 729 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
730 (defvar ps-header-lines 2 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
731 "*Number of lines to display in page header, when generating Postscript.") |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
732 (make-variable-buffer-local 'ps-header-lines) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
733 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
734 (defvar ps-show-n-of-n t |
10683 | 735 "*Non-nil means show page numbers as N/M, meaning page N of M. |
736 Note: page numbers are displayed as part of headers, see variable | |
737 `ps-print-headers'.") | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
738 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
739 (defvar ps-spool-duplex nil ; Not many people have duplex |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
740 ; printers, so default to nil. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
741 "*Non-nil indicates spooling is for a two-sided printer. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
742 For a duplex printer, the `ps-spool-*' commands will insert blank pages |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
743 as needed between print jobs so that the next buffer printed will |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
744 start on the right page. Also, if headers are turned on, the headers |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
745 will be reversed on duplex printers so that the page numbers fall to |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
746 the left on even-numbered pages.") |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
747 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
748 ;;; Fonts |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
749 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
750 (defvar ps-font-info-database |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
751 '((Courier ; the family key |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
752 "Courier" "Courier-Bold" "Courier-Oblique" "Courier-BoldOblique" |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
753 10.0 10.55 6.0 6.0) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
754 (Helvetica ; the family key |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
755 "Helvetica" "Helvetica-Bold" "Helvetica-Oblique" "Helvetica-BoldOblique" |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
756 10.0 11.56 2.78 5.09243) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
757 (Times |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
758 "Times-Roman" "Times-Bold" "Times-Italic" "Times-BoldItalic" |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
759 10.0 11.0 2.5 4.71432) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
760 (Palatino |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
761 "Palatino-Roman" "Palatino-Bold" "Palatino-Italic" "Palatino-BoldItalic" |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
762 10.0 12.1 2.5 5.08676) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
763 (Helvetica-Narrow |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
764 "Helvetica-Narrow" "Helvetica-Narrow-Bold" |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
765 "Helvetica-Narrow-Oblique" "Helvetica-Narrow-BoldOblique" |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
766 10.0 11.56 2.2796 4.17579) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
767 (NewCenturySchlbk |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
768 "NewCenturySchlbk-Roman" "NewCenturySchlbk-Bold" |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
769 "NewCenturySchlbk-Italic" "NewCenturySchlbk-BoldItalic" |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
770 10.0 12.15 2.78 5.31162) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
771 ;; got no bold for the next ones |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
772 (AvantGarde-Book |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
773 "AvantGarde-Book" "AvantGarde-Book" |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
774 "AvantGarde-BookOblique" "AvantGarde-BookOblique" |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
775 10.0 11.77 2.77 5.45189) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
776 (AvantGarde-Demi |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
777 "AvantGarde-Demi" "AvantGarde-Demi" |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
778 "AvantGarde-DemiOblique" "AvantGarde-DemiOblique" |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
779 10.0 12.72 2.8 5.51351) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
780 (Bookman-Demi |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
781 "Bookman-Demi" "Bookman-Demi" |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
782 "Bookman-DemiItalic" "Bookman-DemiItalic" |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
783 10.0 11.77 3.4 6.05946) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
784 (Bookman-Light |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
785 "Bookman-Light" "Bookman-Light" |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
786 "Bookman-LightItalic" "Bookman-LightItalic" |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
787 10.0 11.79 3.2 5.67027) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
788 ;; got no bold and no italic for the next ones |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
789 (Symbol |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
790 "Symbol" "Symbol" "Symbol" "Symbol" |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
791 10.0 13.03 2.5 3.24324) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
792 (Zapf-Dingbats |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
793 "Zapf-Dingbats" "Zapf-Dingbats" "Zapf-Dingbats" "Zapf-Dingbats" |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
794 10.0 9.63 2.78 2.78) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
795 (Zapf-Chancery-MediumItalic |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
796 "Zapf-Chancery-MediumItalic" "Zapf-Chancery-MediumItalic" |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
797 "Zapf-Chancery-MediumItalic" "Zapf-Chancery-MediumItalic" |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
798 10.0 11.45 2.2 4.10811) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
799 ) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
800 "*Font info database: font family (the key), name, bold, italic, bold-italic, |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
801 reference size, line height, space width, average character width. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
802 To get the info for another specific font (say Helvetica), do the following: |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
803 - create a new buffer |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
804 - generate the PostScript image to a file (C-u M-x ps-print-buffer) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
805 - open this file and delete the leading `%' (which is the Postscript |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
806 comment character) from the line |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
807 `% 3 cm 20 cm moveto 10 /Courier ReportFontInfo showpage' |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
808 to get the line |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
809 `3 cm 20 cm moveto 10 /Helvetica ReportFontInfo showpage' |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
810 - add the values to `ps-font-info-database'. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
811 You can get all the fonts of YOUR printer using `ReportAllFontInfo'.") |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
812 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
813 (defvar ps-font-family 'Courier |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
814 "Font family name for ordinary text, when generating Postscript.") |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
815 |
16870
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
816 (defvar ps-font-size (if ps-landscape-mode 7 8.5) |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
817 "Font size, in points, for ordinary text, when generating Postscript.") |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
818 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
819 (defvar ps-header-font-family 'Helvetica |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
820 "Font family name for text in the header, when generating Postscript.") |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
821 |
16870
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
822 (defvar ps-header-font-size (if ps-landscape-mode 10 12) |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
823 "Font size, in points, for text in the header, when generating Postscript.") |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
824 |
16870
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
825 (defvar ps-header-title-font-size (if ps-landscape-mode 12 14) |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
826 "Font size, in points, for the top line of text in the header, |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
827 when generating Postscript.") |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
828 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
829 ;;; Colors |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
830 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
831 (defvar ps-print-color-p (or (fboundp 'x-color-values) ; Emacs |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
832 (fboundp 'pixel-components)) ; XEmacs |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
833 ; Printing color requires x-color-values. |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
834 "*If non-nil, print the buffer's text in color.") |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
835 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
836 (defvar ps-default-fg '(0.0 0.0 0.0) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
837 "*RGB values of the default foreground color. Defaults to black.") |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
838 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
839 (defvar ps-default-bg '(1.0 1.0 1.0) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
840 "*RGB values of the default background color. Defaults to white.") |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
841 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
842 (defvar ps-auto-font-detect t |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
843 "*Non-nil means automatically detect bold/italic face attributes. |
10493 | 844 nil means rely solely on the lists `ps-bold-faces', `ps-italic-faces', |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
845 and `ps-underlined-faces'.") |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
846 |
16870
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
847 (defvar ps-bold-faces |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
848 (unless ps-print-color-p |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
849 '(font-lock-function-name-face |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
850 font-lock-builtin-face |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
851 font-lock-variable-name-face |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
852 font-lock-keyword-face |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
853 font-lock-warning-face)) |
10493 | 854 "*A list of the \(non-bold\) faces that should be printed in bold font. |
855 This applies to generating Postscript.") | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
856 |
16870
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
857 (defvar ps-italic-faces |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
858 (unless ps-print-color-p |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
859 '(font-lock-variable-name-face |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
860 font-lock-string-face |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
861 font-lock-comment-face |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
862 font-lock-warning-face)) |
10493 | 863 "*A list of the \(non-italic\) faces that should be printed in italic font. |
864 This applies to generating Postscript.") | |
7257 | 865 |
16870
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
866 (defvar ps-underlined-faces |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
867 (unless ps-print-color-p |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
868 '(font-lock-function-name-face |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
869 font-lock-type-face |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
870 font-lock-reference-face |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
871 font-lock-warning-face)) |
10493 | 872 "*A list of the \(non-underlined\) faces that should be printed underlined. |
873 This applies to generating Postscript.") | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
874 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
875 (defvar ps-left-header |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
876 (list 'ps-get-buffer-name 'ps-header-dirpart) |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
877 "*The items to display (each on a line) on the left part of the page header. |
10493 | 878 This applies to generating Postscript. |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
879 |
10493 | 880 The value should be a list of strings and symbols, each representing an |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
881 entry in the PostScript array HeaderLinesLeft. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
882 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
883 Strings are inserted unchanged into the array; those representing |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
884 PostScript string literals should be delimited with PostScript string |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
885 delimiters '(' and ')'. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
886 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
887 For symbols with bound functions, the function is called and should |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
888 return a string to be inserted into the array. For symbols with bound |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
889 values, the value should be a string to be inserted into the array. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
890 In either case, function or variable, the string value has PostScript |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
891 string delimiters added to it.") |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
892 (make-variable-buffer-local 'ps-left-header) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
893 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
894 (defvar ps-right-header |
16870
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
895 (list "/pagenumberstring load" 'time-stamp-mon-dd-yyyy 'time-stamp-hh:mm:ss) |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
896 "*The items to display (each on a line) on the right part of the page header. |
10493 | 897 This applies to generating Postscript. |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
898 |
10493 | 899 See the variable `ps-left-header' for a description of the format of |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
900 this variable.") |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
901 (make-variable-buffer-local 'ps-right-header) |
7257 | 902 |
903 (defvar ps-razzle-dazzle t | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
904 "*Non-nil means report progress while formatting buffer.") |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
905 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
906 (defvar ps-adobe-tag "%!PS-Adobe-1.0\n" |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
907 "*Contains the header line identifying the output as PostScript. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
908 By default, `ps-adobe-tag' contains the standard identifier. Some |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
909 printers require slightly different versions of this line.") |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
910 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
911 (defvar ps-build-face-reference t |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
912 "*Non-nil means build the reference face lists. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
913 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
914 Ps-print sets this value to nil after it builds its internal reference |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
915 lists of bold and italic faces. By settings its value back to t, you |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
916 can force ps-print to rebuild the lists the next time you invoke one |
10493 | 917 of the ...-with-faces commands. |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
918 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
919 You should set this value back to t after you change the attributes of |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
920 any face, or create new faces. Most users shouldn't have to worry |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
921 about its setting, though.") |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
922 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
923 (defvar ps-always-build-face-reference nil |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
924 "*Non-nil means always rebuild the reference face lists. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
925 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
926 If this variable is non-nil, ps-print will rebuild its internal |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
927 reference lists of bold and italic faces *every* time one of the |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
928 -with-faces commands is called. Most users shouldn't need to set this |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
929 variable.") |
7257 | 930 |
931 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
932 ;; User commands |
7257 | 933 |
10683 | 934 ;;;###autoload |
7257 | 935 (defun ps-print-buffer (&optional filename) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
936 "Generate and print a PostScript image of the buffer. |
7257 | 937 |
10493 | 938 When called with a numeric prefix argument (C-u), prompts the user for |
7257 | 939 the name of a file to save the PostScript image in, instead of sending |
940 it to the printer. | |
941 | |
942 More specifically, the FILENAME argument is treated as follows: if it | |
943 is nil, send the image to the printer. If FILENAME is a string, save | |
944 the PostScript image in a file with that name. If FILENAME is a | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
945 number, prompt the user for the name of the file to save in." |
7257 | 946 |
10683 | 947 (interactive (list (ps-print-preprint current-prefix-arg))) |
7257 | 948 (ps-generate (current-buffer) (point-min) (point-max) |
949 'ps-generate-postscript) | |
950 (ps-do-despool filename)) | |
951 | |
952 | |
10683 | 953 ;;;###autoload |
7257 | 954 (defun ps-print-buffer-with-faces (&optional filename) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
955 "Generate and print a PostScript image of the buffer. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
956 Like `ps-print-buffer', but includes font, color, and underline |
13807 | 957 information in the generated image. This command works only if you |
958 are using a window system, so it has a way to determine color values." | |
10683 | 959 (interactive (list (ps-print-preprint current-prefix-arg))) |
7257 | 960 (ps-generate (current-buffer) (point-min) (point-max) |
961 'ps-generate-postscript-with-faces) | |
962 (ps-do-despool filename)) | |
963 | |
964 | |
10683 | 965 ;;;###autoload |
7257 | 966 (defun ps-print-region (from to &optional filename) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
967 "Generate and print a PostScript image of the region. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
968 Like `ps-print-buffer', but prints just the current region." |
7257 | 969 |
10683 | 970 (interactive (list (point) (mark) (ps-print-preprint current-prefix-arg))) |
7257 | 971 (ps-generate (current-buffer) from to |
972 'ps-generate-postscript) | |
973 (ps-do-despool filename)) | |
974 | |
975 | |
10683 | 976 ;;;###autoload |
7257 | 977 (defun ps-print-region-with-faces (from to &optional filename) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
978 "Generate and print a PostScript image of the region. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
979 Like `ps-print-region', but includes font, color, and underline |
13807 | 980 information in the generated image. This command works only if you |
981 are using a window system, so it has a way to determine color values." | |
7257 | 982 |
10683 | 983 (interactive (list (point) (mark) (ps-print-preprint current-prefix-arg))) |
7257 | 984 (ps-generate (current-buffer) from to |
985 'ps-generate-postscript-with-faces) | |
986 (ps-do-despool filename)) | |
987 | |
988 | |
10683 | 989 ;;;###autoload |
7257 | 990 (defun ps-spool-buffer () |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
991 "Generate and spool a PostScript image of the buffer. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
992 Like `ps-print-buffer' except that the PostScript image is saved in a |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
993 local buffer to be sent to the printer later. |
7257 | 994 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
995 Use the command `ps-despool' to send the spooled images to the printer." |
7257 | 996 (interactive) |
997 (ps-generate (current-buffer) (point-min) (point-max) | |
998 'ps-generate-postscript)) | |
999 | |
1000 | |
10683 | 1001 ;;;###autoload |
7257 | 1002 (defun ps-spool-buffer-with-faces () |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1003 "Generate and spool a PostScript image of the buffer. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1004 Like `ps-spool-buffer', but includes font, color, and underline |
13807 | 1005 information in the generated image. This command works only if you |
13828
612d7bd4b5d1
(ps-spool-buffer-with-faces): Fix typo in previous chg.
Richard M. Stallman <rms@gnu.org>
parents:
13807
diff
changeset
|
1006 are using a window system, so it has a way to determine color values. |
7257 | 1007 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1008 Use the command `ps-despool' to send the spooled images to the printer." |
7257 | 1009 |
1010 (interactive) | |
1011 (ps-generate (current-buffer) (point-min) (point-max) | |
1012 'ps-generate-postscript-with-faces)) | |
1013 | |
1014 | |
10683 | 1015 ;;;###autoload |
7257 | 1016 (defun ps-spool-region (from to) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1017 "Generate a PostScript image of the region and spool locally. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1018 Like `ps-spool-buffer', but spools just the current region. |
7257 | 1019 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1020 Use the command `ps-despool' to send the spooled images to the printer." |
7257 | 1021 (interactive "r") |
1022 (ps-generate (current-buffer) from to | |
1023 'ps-generate-postscript)) | |
1024 | |
1025 | |
10683 | 1026 ;;;###autoload |
7257 | 1027 (defun ps-spool-region-with-faces (from to) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1028 "Generate a PostScript image of the region and spool locally. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1029 Like `ps-spool-region', but includes font, color, and underline |
13807 | 1030 information in the generated image. This command works only if you |
13828
612d7bd4b5d1
(ps-spool-buffer-with-faces): Fix typo in previous chg.
Richard M. Stallman <rms@gnu.org>
parents:
13807
diff
changeset
|
1031 are using a window system, so it has a way to determine color values. |
7257 | 1032 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1033 Use the command `ps-despool' to send the spooled images to the printer." |
7257 | 1034 (interactive "r") |
1035 (ps-generate (current-buffer) from to | |
1036 'ps-generate-postscript-with-faces)) | |
1037 | |
10683 | 1038 ;;;###autoload |
7257 | 1039 (defun ps-despool (&optional filename) |
1040 "Send the spooled PostScript to the printer. | |
1041 | |
1042 When called with a numeric prefix argument (C-u), prompt the user for | |
1043 the name of a file to save the spooled PostScript in, instead of sending | |
1044 it to the printer. | |
1045 | |
1046 More specifically, the FILENAME argument is treated as follows: if it | |
1047 is nil, send the image to the printer. If FILENAME is a string, save | |
1048 the PostScript image in a file with that name. If FILENAME is a | |
1049 number, prompt the user for the name of the file to save in." | |
10683 | 1050 (interactive (list (ps-print-preprint current-prefix-arg))) |
1051 (ps-do-despool filename)) | |
7257 | 1052 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1053 ;;;###autoload |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1054 (defun ps-line-lengths () |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1055 "*Display the correspondance between a line length and a font size, |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1056 using the current ps-print setup. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1057 Try: pr -t file | awk '{printf \"%3d %s\n\", length($0), $0}' | sort -r | head" |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1058 (interactive) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1059 (ps-line-lengths-internal)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1060 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1061 ;;;###autoload |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1062 (defun ps-nb-pages-buffer (nb-lines) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1063 "*Display an approximate correspondance between a font size and the number |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1064 of pages the current buffer would require to print |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1065 using the current ps-print setup." |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1066 (interactive (list (count-lines (point-min) (point-max)))) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1067 (ps-nb-pages nb-lines)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1068 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1069 ;;;###autoload |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1070 (defun ps-nb-pages-region (nb-lines) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1071 "*Display an approximate correspondance between a font size and the number |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1072 of pages the current region would require to print |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1073 using the current ps-print setup." |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1074 (interactive (list (count-lines (mark) (point)))) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1075 (ps-nb-pages nb-lines)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1076 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1077 ;;;###autoload |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1078 (defun ps-setup () |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1079 "*Return the current setup" |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1080 (format " |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1081 (setq ps-print-color-p %s |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1082 ps-lpr-command \"%s\" |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1083 ps-lpr-switches %s |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1084 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1085 ps-paper-type '%s |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1086 ps-landscape-mode %s |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1087 ps-number-of-columns %s |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1088 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1089 ps-left-margin %s |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1090 ps-right-margin %s |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1091 ps-inter-column %s |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1092 ps-bottom-margin %s |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1093 ps-top-margin %s |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1094 ps-header-offset %s |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1095 ps-header-line-pad %s |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1096 ps-print-header %s |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1097 ps-print-header-frame %s |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1098 ps-header-lines %s |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1099 ps-show-n-of-n %s |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1100 ps-spool-duplex %s |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1101 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1102 ps-font-family '%s |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1103 ps-font-size %s |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1104 ps-header-font-family '%s |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1105 ps-header-font-size %s |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1106 ps-header-title-font-size %s) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1107 " |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1108 ps-print-color-p |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1109 ps-lpr-command |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1110 ps-lpr-switches |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1111 ps-paper-type |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1112 ps-landscape-mode |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1113 ps-number-of-columns |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1114 ps-left-margin |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1115 ps-right-margin |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1116 ps-inter-column |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1117 ps-bottom-margin |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1118 ps-top-margin |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1119 ps-header-offset |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1120 ps-header-line-pad |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1121 ps-print-header |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1122 ps-print-header-frame |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1123 ps-header-lines |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1124 ps-show-n-of-n |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1125 ps-spool-duplex |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1126 ps-font-family |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1127 ps-font-size |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1128 ps-header-font-family |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1129 ps-header-font-size |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1130 ps-header-title-font-size)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1131 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1132 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1133 ;; Utility functions and variables: |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1134 |
12769
4a905565cfa6
(ps-print-emacs-type): Renamed from emacs-type.
Richard M. Stallman <rms@gnu.org>
parents:
12768
diff
changeset
|
1135 (defvar ps-print-emacs-type |
4a905565cfa6
(ps-print-emacs-type): Renamed from emacs-type.
Richard M. Stallman <rms@gnu.org>
parents:
12768
diff
changeset
|
1136 (cond ((string-match "XEmacs" emacs-version) 'xemacs) |
4a905565cfa6
(ps-print-emacs-type): Renamed from emacs-type.
Richard M. Stallman <rms@gnu.org>
parents:
12768
diff
changeset
|
1137 ((string-match "Lucid" emacs-version) 'lucid) |
4a905565cfa6
(ps-print-emacs-type): Renamed from emacs-type.
Richard M. Stallman <rms@gnu.org>
parents:
12768
diff
changeset
|
1138 ((string-match "Epoch" emacs-version) 'epoch) |
4a905565cfa6
(ps-print-emacs-type): Renamed from emacs-type.
Richard M. Stallman <rms@gnu.org>
parents:
12768
diff
changeset
|
1139 (t 'emacs))) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1140 |
12769
4a905565cfa6
(ps-print-emacs-type): Renamed from emacs-type.
Richard M. Stallman <rms@gnu.org>
parents:
12768
diff
changeset
|
1141 (if (or (eq ps-print-emacs-type 'lucid) |
4a905565cfa6
(ps-print-emacs-type): Renamed from emacs-type.
Richard M. Stallman <rms@gnu.org>
parents:
12768
diff
changeset
|
1142 (eq ps-print-emacs-type 'xemacs)) |
11799
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
1143 (if (< emacs-minor-version 12) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
1144 (setq ps-print-color-p nil)) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1145 (require 'faces)) ; face-font, face-underline-p, |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1146 ; x-font-regexp |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1147 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1148 (require 'time-stamp) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1149 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1150 (defvar ps-font nil |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1151 "Font family name for ordinary text, when generating Postscript.") |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1152 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1153 (defvar ps-font-bold nil |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1154 "Font family name for bold text, when generating Postscript.") |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1155 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1156 (defvar ps-font-italic nil |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1157 "Font family name for italic text, when generating Postscript.") |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1158 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1159 (defvar ps-font-bold-italic nil |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1160 "Font family name for bold italic text, when generating Postscript.") |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1161 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1162 (defvar ps-avg-char-width nil |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1163 "The average width, in points, of a character, for generating Postscript. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1164 This is the value that ps-print uses to determine the length, |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1165 x-dimension, of the text it has printed, and thus affects the point at |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1166 which long lines wrap around.") |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1167 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1168 (defvar ps-space-width nil |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1169 "The width of a space character, for generating Postscript. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1170 This value is used in expanding tab characters.") |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1171 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1172 (defvar ps-line-height nil |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1173 "The height of a line, for generating Postscript. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1174 This is the value that ps-print uses to determine the height, |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1175 y-dimension, of the lines of text it has printed, and thus affects the |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1176 point at which page-breaks are placed. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1177 The line-height is *not* the same as the point size of the font.") |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1178 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1179 (defvar ps-print-prologue-1 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1180 "% ISOLatin1Encoding stolen from ps_init.ps in GhostScript 2.6.1.4: |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1181 /ISOLatin1Encoding where { pop } { |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1182 % -- The ISO Latin-1 encoding vector isn't known, so define it. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1183 % -- The first half is the same as the standard encoding, |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1184 % -- except for minus instead of hyphen at code 055. |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1185 /ISOLatin1Encoding |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1186 StandardEncoding 0 45 getinterval aload pop |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1187 /minus |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1188 StandardEncoding 46 82 getinterval aload pop |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1189 %*** NOTE: the following are missing in the Adobe documentation, |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1190 %*** but appear in the displayed table: |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1191 %*** macron at 0225, dieresis at 0230, cedilla at 0233, space at 0240. |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1192 % 0200 (128) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1193 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1194 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1195 /dotlessi /grave /acute /circumflex /tilde /macron /breve /dotaccent |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1196 /dieresis /.notdef /ring /cedilla /.notdef /hungarumlaut /ogonek /caron |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1197 % 0240 (160) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1198 /space /exclamdown /cent /sterling |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1199 /currency /yen /brokenbar /section |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1200 /dieresis /copyright /ordfeminine /guillemotleft |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1201 /logicalnot /hyphen /registered /macron |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1202 /degree /plusminus /twosuperior /threesuperior |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1203 /acute /mu /paragraph /periodcentered |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1204 /cedilla /onesuperior /ordmasculine /guillemotright |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1205 /onequarter /onehalf /threequarters /questiondown |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1206 % 0300 (192) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1207 /Agrave /Aacute /Acircumflex /Atilde |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1208 /Adieresis /Aring /AE /Ccedilla |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1209 /Egrave /Eacute /Ecircumflex /Edieresis |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1210 /Igrave /Iacute /Icircumflex /Idieresis |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1211 /Eth /Ntilde /Ograve /Oacute |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1212 /Ocircumflex /Otilde /Odieresis /multiply |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1213 /Oslash /Ugrave /Uacute /Ucircumflex |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1214 /Udieresis /Yacute /Thorn /germandbls |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1215 % 0340 (224) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1216 /agrave /aacute /acircumflex /atilde |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1217 /adieresis /aring /ae /ccedilla |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1218 /egrave /eacute /ecircumflex /edieresis |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1219 /igrave /iacute /icircumflex /idieresis |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1220 /eth /ntilde /ograve /oacute |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1221 /ocircumflex /otilde /odieresis /divide |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1222 /oslash /ugrave /uacute /ucircumflex |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1223 /udieresis /yacute /thorn /ydieresis |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1224 256 packedarray def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1225 } ifelse |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1226 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1227 /reencodeFontISO { %def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1228 dup |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1229 length 5 add dict % Make a new font (a new dict the same size |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1230 % as the old one) with room for our new symbols. |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1231 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1232 begin % Make the new font the current dictionary. |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1233 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1234 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1235 { 1 index /FID ne |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1236 { def } { pop pop } ifelse |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1237 } forall % Copy each of the symbols from the old dictionary |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1238 % to the new one except for the font ID. |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1239 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1240 /Encoding ISOLatin1Encoding def % Override the encoding with |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1241 % the ISOLatin1 encoding. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1242 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1243 % Use the font's bounding box to determine the ascent, descent, |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1244 % and overall height; don't forget that these values have to be |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1245 % transformed using the font's matrix. |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1246 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1247 % ^ (x2 y2) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1248 % | | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1249 % | v |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1250 % | +----+ - - |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1251 % | | | ^ |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1252 % | | | | Ascent (usually > 0) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1253 % | | | | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1254 % (0 0) -> +--+----+--------> |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1255 % | | | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1256 % | | v Descent (usually < 0) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1257 % (x1 y1) --> +----+ - - |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1258 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1259 FontBBox % -- x1 y1 x2 y2 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1260 FontMatrix transform /Ascent exch def pop |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1261 FontMatrix transform /Descent exch def pop |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1262 /FontHeight Ascent Descent sub def % use `sub' because descent < 0 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1263 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1264 % Define these in case they're not in the FontInfo |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1265 % (also, here they're easier to get to. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1266 /UnderlinePosition 1 def |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1267 /UnderlineThickness 1 def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1268 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1269 % Get the underline position and thickness if they're defined. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1270 currentdict /FontInfo known { |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1271 FontInfo |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1272 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1273 dup /UnderlinePosition known { |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1274 dup /UnderlinePosition get |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1275 0 exch FontMatrix transform exch pop |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1276 /UnderlinePosition exch def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1277 } if |
7257 | 1278 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1279 dup /UnderlineThickness known { |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1280 /UnderlineThickness get |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1281 0 exch FontMatrix transform exch pop |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1282 /UnderlineThickness exch def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1283 } if |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1284 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1285 } if |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1286 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1287 currentdict % Leave the new font on the stack |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1288 end % Stop using the font as the current dictionary. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1289 definefont % Put the font into the font dictionary |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1290 pop % Discard the returned font. |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1291 } bind def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1292 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1293 /DefFont { % Font definition |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1294 findfont exch scalefont reencodeFontISO |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1295 } def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1296 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1297 /F { % Font selection |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1298 findfont |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1299 dup /Ascent get /Ascent exch def |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1300 dup /Descent get /Descent exch def |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1301 dup /FontHeight get /FontHeight exch def |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1302 dup /UnderlinePosition get /UnderlinePosition exch def |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1303 dup /UnderlineThickness get /UnderlineThickness exch def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1304 setfont |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1305 } def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1306 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1307 /FG /setrgbcolor load def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1308 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1309 /bg false def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1310 /BG { |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1311 dup /bg exch def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1312 { mark 4 1 roll ] /bgcolor exch def } if |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1313 } def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1314 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1315 % B width C |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1316 % +-----------+ |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1317 % | Ascent (usually > 0) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1318 % A + + |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1319 % | Descent (usually < 0) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1320 % +-----------+ |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1321 % E width D |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1322 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1323 /dobackground { % width -- |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1324 currentpoint % -- width x y |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1325 gsave |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1326 newpath |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1327 moveto % A (x y) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1328 0 Ascent rmoveto % B |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1329 dup 0 rlineto % C |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1330 0 Descent Ascent sub rlineto % D |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1331 neg 0 rlineto % E |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1332 closepath |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1333 bgcolor aload pop setrgbcolor |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1334 fill |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1335 grestore |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1336 } def |
7257 | 1337 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1338 /dobackgroundstring { % string -- |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1339 stringwidth pop |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1340 dobackground |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1341 } def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1342 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1343 /dounderline { % fromx fromy -- |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1344 currentpoint |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1345 gsave |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1346 UnderlineThickness setlinewidth |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1347 4 2 roll |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1348 UnderlinePosition add moveto |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1349 UnderlinePosition add lineto |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1350 stroke |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1351 grestore |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1352 } def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1353 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1354 /eolbg { % dobackground until right margin |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1355 PrintWidth % -- x-eol |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1356 currentpoint pop % -- cur-x |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1357 sub % -- width until eol |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1358 dobackground |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1359 } def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1360 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1361 /eolul { % idem for underline |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1362 PrintWidth % -- x-eol |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1363 currentpoint exch pop % -- x-eol cur-y |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1364 dounderline |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1365 } def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1366 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1367 /SL { % Soft Linefeed |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1368 bg { eolbg } if |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1369 ul { eolul } if |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1370 0 currentpoint exch pop LineHeight sub moveto |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1371 } def |
7257 | 1372 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1373 /HL /SL load def % Hard Linefeed |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1374 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1375 /sp1 { currentpoint 3 -1 roll } def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1376 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1377 % Some debug |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1378 /dcp { currentpoint exch 40 string cvs print (, ) print = } def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1379 /dp { print 2 copy |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1380 exch 40 string cvs print (, ) print = } def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1381 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1382 /S { |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1383 bg { dup dobackgroundstring } if |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1384 ul { sp1 } if |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1385 show |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1386 ul { dounderline } if |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1387 } def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1388 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1389 /W { |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1390 ul { sp1 } if |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1391 ( ) stringwidth % Get the width of a space in the current font. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1392 pop % Discard the Y component. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1393 mul % Multiply the width of a space |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1394 % by the number of spaces to plot |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1395 bg { dup dobackground } if |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1396 0 rmoveto |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1397 ul { dounderline } if |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1398 } def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1399 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1400 /BeginDoc { |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1401 % ---- save the state of the document (useful for ghostscript!) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1402 /docState save def |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1403 % ---- [jack] Kludge: my ghostscript window is 21x27.7 instead of 21x29.7 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1404 /JackGhostscript where { |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1405 pop 1 27.7 29.7 div scale |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1406 } if |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1407 LandscapeMode { |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1408 % ---- translate to bottom-right corner of Portrait page |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1409 LandscapePageHeight 0 translate |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1410 90 rotate |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1411 } if |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1412 /ColumnWidth PrintWidth InterColumn add def |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1413 % ---- translate to lower left corner of TEXT |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1414 LeftMargin BottomMargin translate |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1415 % ---- define where printing will start |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1416 /f0 F % this installs Ascent |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1417 /PrintStartY PrintHeight Ascent sub def |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1418 /ColumnIndex 1 def |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1419 } def |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1420 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1421 /EndDoc { |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1422 % ---- on last page but not last column, spit out the page |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1423 ColumnIndex 1 eq not { showpage } if |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1424 % ---- restore the state of the document (useful for ghostscript!) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1425 docState restore |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1426 } def |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1427 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1428 /BeginDSCPage { |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1429 % ---- when 1st column, save the state of the page |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1430 ColumnIndex 1 eq { /pageState save def } if |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1431 % ---- save the state of the column |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1432 /columnState save def |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1433 } def |
7257 | 1434 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1435 /BeginPage { |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1436 PrintHeader { |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1437 PrintHeaderFrame { HeaderFrame } if |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1438 HeaderText |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1439 } if |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1440 0 PrintStartY moveto % move to where printing will start |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1441 } def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1442 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1443 /EndPage { |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1444 bg { eolbg } if |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1445 ul { eolul } if |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1446 } def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1447 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1448 /EndDSCPage { |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1449 ColumnIndex NumberOfColumns eq { |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1450 % ---- on last column, spit out the page |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1451 showpage |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1452 % ---- restore the state of the page |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1453 pageState restore |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1454 /ColumnIndex 1 def |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1455 } { % else |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1456 % ---- restore the state of the current column |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1457 columnState restore |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1458 % ---- and translate to the next column |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1459 ColumnWidth 0 translate |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1460 /ColumnIndex ColumnIndex 1 add def |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1461 } ifelse |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1462 } def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1463 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1464 /ul false def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1465 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1466 /UL { /ul exch def } def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1467 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1468 /SetHeaderLines { % nb-lines -- |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1469 /HeaderLines exch def |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1470 % ---- bottom up |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1471 HeaderPad |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1472 HeaderLines 1 sub HeaderLineHeight mul add |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1473 HeaderTitleLineHeight add |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1474 HeaderPad add |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1475 /HeaderHeight exch def |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1476 } def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1477 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1478 % |---------| |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1479 % | tm | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1480 % |---------| |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1481 % | header | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1482 % |-+-------| <-- (x y) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1483 % | ho | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1484 % |---------| |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1485 % | text | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1486 % |-+-------| <-- (0 0) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1487 % | bm | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1488 % |---------| |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1489 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1490 /HeaderFrameStart { % -- x y |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1491 0 PrintHeight HeaderOffset add |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1492 } def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1493 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1494 /HeaderFramePath { |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1495 PrintWidth 0 rlineto |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1496 0 HeaderHeight rlineto |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1497 PrintWidth neg 0 rlineto |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1498 0 HeaderHeight neg rlineto |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1499 } def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1500 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1501 /HeaderFrame { |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1502 gsave |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1503 0.4 setlinewidth |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1504 % ---- fill a black rectangle (the shadow of the next one) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1505 HeaderFrameStart moveto |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1506 1 -1 rmoveto |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1507 HeaderFramePath |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1508 0 setgray fill |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1509 % ---- do the next rectangle ... |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1510 HeaderFrameStart moveto |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1511 HeaderFramePath |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1512 gsave 0.9 setgray fill grestore % filled with grey |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1513 gsave 0 setgray stroke grestore % drawn with black |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1514 grestore |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1515 } def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1516 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1517 /HeaderStart { |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1518 HeaderFrameStart |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1519 exch HeaderPad add exch % horizontal pad |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1520 % ---- bottom up |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1521 HeaderPad add % vertical pad |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1522 HeaderDescent sub |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1523 HeaderLineHeight HeaderLines 1 sub mul add |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1524 } def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1525 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1526 /strcat { |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1527 dup length 3 -1 roll dup length dup 4 -1 roll add string dup |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1528 0 5 -1 roll putinterval |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1529 dup 4 2 roll exch putinterval |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1530 } def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1531 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1532 /pagenumberstring { |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1533 PageNumber 32 string cvs |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1534 ShowNofN { |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1535 (/) strcat |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1536 PageCount 32 string cvs strcat |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1537 } if |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1538 } def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1539 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1540 /HeaderText { |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1541 HeaderStart moveto |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1542 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1543 HeaderLinesRight HeaderLinesLeft % -- rightLines leftLines |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1544 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1545 % ---- hack: `PN 1 and' == `PN 2 modulo' |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1546 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1547 % ---- if duplex and even page number, then exchange left and right |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1548 Duplex PageNumber 1 and 0 eq and { exch } if |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1549 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1550 { % ---- process the left lines |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1551 aload pop |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1552 exch F |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1553 gsave |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1554 dup xcheck { exec } if |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1555 show |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1556 grestore |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1557 0 HeaderLineHeight neg rmoveto |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1558 } forall |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1559 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1560 HeaderStart moveto |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1561 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1562 { % ---- process the right lines |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1563 aload pop |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1564 exch F |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1565 gsave |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1566 dup xcheck { exec } if |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1567 dup stringwidth pop |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1568 PrintWidth exch sub HeaderPad 2 mul sub 0 rmoveto |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1569 show |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1570 grestore |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1571 0 HeaderLineHeight neg rmoveto |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1572 } forall |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1573 } def |
7257 | 1574 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1575 /ReportFontInfo { |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1576 2 copy |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1577 /t0 3 1 roll DefFont |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1578 /t0 F |
10683 | 1579 /lh FontHeight def |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1580 /sw ( ) stringwidth pop def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1581 /aw (01234567890abcdefghijklmnopqrstuvwxyz) dup length exch |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1582 stringwidth pop exch div def |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1583 /t1 12 /Helvetica-Oblique DefFont |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1584 /t1 F |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1585 gsave |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1586 (For ) show |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1587 128 string cvs show |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1588 ( ) show |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1589 32 string cvs show |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1590 ( point, the line height is ) show |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1591 lh 32 string cvs show |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1592 (, the space width is ) show |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1593 sw 32 string cvs show |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1594 (,) show |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1595 grestore |
10683 | 1596 0 FontHeight neg rmoveto |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1597 gsave |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1598 (and a crude estimate of average character width is ) show |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1599 aw 32 string cvs show |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1600 (.) show |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1601 grestore |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1602 0 FontHeight neg rmoveto |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1603 } def |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1604 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1605 /cm { % cm to point |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1606 72 mul 2.54 div |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1607 } def |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1608 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1609 /ReportAllFontInfo { |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1610 FontDirectory |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1611 { % key = font name value = font dictionary |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1612 pop 10 exch ReportFontInfo |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1613 } forall |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1614 } def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1615 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1616 % 3 cm 20 cm moveto 10 /Courier ReportFontInfo showpage |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1617 % 3 cm 20 cm moveto ReportAllFontInfo showpage |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1618 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1619 ") |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1620 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1621 (defvar ps-print-prologue-2 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1622 " |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1623 % ---- These lines must be kept together because... |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1624 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1625 /h0 F |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1626 /HeaderTitleLineHeight FontHeight def |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1627 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1628 /h1 F |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1629 /HeaderLineHeight FontHeight def |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1630 /HeaderDescent Descent def |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1631 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1632 % ---- ...because `F' has a side-effect on `FontHeight' and `Descent' |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1633 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1634 ") |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1635 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1636 ;; Start Editing Here: |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1637 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1638 (defvar ps-source-buffer nil) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1639 (defvar ps-spool-buffer-name "*PostScript*") |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1640 (defvar ps-spool-buffer nil) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1641 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1642 (defvar ps-output-head nil) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1643 (defvar ps-output-tail nil) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1644 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1645 (defvar ps-page-count 0) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1646 (defvar ps-showpage-count 0) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1647 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1648 (defvar ps-current-font 0) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1649 (defvar ps-current-underline-p nil) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1650 (defvar ps-default-color (if ps-print-color-p ps-default-fg)) ; black |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1651 (defvar ps-current-color ps-default-color) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1652 (defvar ps-current-bg nil) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1653 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1654 (defvar ps-razchunk 0) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1655 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1656 (defvar ps-color-format |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1657 (if (eq ps-print-emacs-type 'emacs) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1658 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1659 ;;Emacs understands the %f format; we'll |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1660 ;;use it to limit color RGB values to |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1661 ;;three decimals to cut down some on the |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1662 ;;size of the PostScript output. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1663 "%0.3f %0.3f %0.3f" |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1664 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1665 ;; Lucid emacsen will have to make do with |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1666 ;; %s (princ) for floats. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1667 "%s %s %s")) |
7257 | 1668 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1669 ;; These values determine how much print-height to deduct when headers |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1670 ;; are turned on. This is a pretty clumsy way of handling it, but |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1671 ;; it'll do for now. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1672 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1673 (defvar ps-header-font) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1674 (defvar ps-header-title-font) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1675 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1676 (defvar ps-header-line-height) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1677 (defvar ps-header-title-line-height) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1678 (defvar ps-header-pad 0 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1679 "Vertical and horizontal space in points (1/72 inch) between the header frame |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1680 and the text it contains.") |
7257 | 1681 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1682 ;; Define accessors to the dimensions list. |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1683 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1684 (defmacro ps-page-dimensions-get-width (dims) `(nth 0 ,dims)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1685 (defmacro ps-page-dimensions-get-height (dims) `(nth 1 ,dims)) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1686 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1687 (defvar ps-landscape-page-height) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1688 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1689 (defvar ps-print-width nil) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1690 (defvar ps-print-height nil) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1691 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1692 (defvar ps-height-remaining) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1693 (defvar ps-width-remaining) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1694 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1695 (defvar ps-ref-bold-faces nil) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1696 (defvar ps-ref-italic-faces nil) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1697 (defvar ps-ref-underlined-faces nil) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1698 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1699 (defvar ps-print-color-scale nil) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1700 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1701 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1702 ;; Internal functions |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1703 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1704 (defun ps-line-lengths-internal () |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1705 "Display the correspondance between a line length and a font size, |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1706 using the current ps-print setup. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1707 Try: pr -t file | awk '{printf \"%3d %s\n\", length($0), $0}' | sort -r | head" |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1708 (let ((buf (get-buffer-create "*Line-lengths*")) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1709 (ifs ps-font-size) ; initial font size |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1710 (icw ps-avg-char-width) ; initial character width |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1711 (print-width (progn (ps-get-page-dimensions) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1712 ps-print-width)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1713 (ps-setup (ps-setup)) ; setup for the current buffer |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1714 (fs-min 5) ; minimum font size |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1715 cw-min ; minimum character width |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1716 nb-cpl-max ; maximum nb of characters per line |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1717 (fs-max 14) ; maximum font size |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1718 cw-max ; maximum character width |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1719 nb-cpl-min ; minimum nb of characters per line |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1720 fs ; current font size |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1721 cw ; current character width |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1722 nb-cpl ; current nb of characters per line |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1723 ) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1724 (setq cw-min (/ (* icw fs-min) ifs) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1725 nb-cpl-max (floor (/ print-width cw-min)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1726 cw-max (/ (* icw fs-max) ifs) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1727 nb-cpl-min (floor (/ print-width cw-max))) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1728 (setq nb-cpl nb-cpl-min) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1729 (set-buffer buf) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1730 (goto-char (point-max)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1731 (if (not (bolp)) (insert "\n")) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1732 (insert ps-setup) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1733 (insert "nb char per line / font size\n") |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1734 (while (<= nb-cpl nb-cpl-max) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1735 (setq cw (/ print-width (float nb-cpl)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1736 fs (/ (* ifs cw) icw)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1737 (insert (format "%3s %s\n" nb-cpl fs)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1738 (setq nb-cpl (1+ nb-cpl))) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1739 (insert "\n") |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1740 (display-buffer buf 'not-this-window))) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1741 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1742 (defun ps-nb-pages (nb-lines) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1743 "Display an approximate correspondance between a font size and the number |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1744 of pages the number of lines would require to print |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1745 using the current ps-print setup." |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1746 (let ((buf (get-buffer-create "*Nb-Pages*")) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1747 (ifs ps-font-size) ; initial font size |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1748 (ilh ps-line-height) ; initial line height |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1749 (page-height (progn (ps-get-page-dimensions) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1750 ps-print-height)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1751 (ps-setup (ps-setup)) ; setup for the current buffer |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1752 (fs-min 4) ; minimum font size |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1753 lh-min ; minimum line height |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1754 nb-lpp-max ; maximum nb of lines per page |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1755 nb-page-min ; minimum nb of pages |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1756 (fs-max 14) ; maximum font size |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1757 lh-max ; maximum line height |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1758 nb-lpp-min ; minimum nb of lines per page |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1759 nb-page-max ; maximum nb of pages |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1760 fs ; current font size |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1761 lh ; current line height |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1762 nb-lpp ; current nb of lines per page |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1763 nb-page ; current nb of pages |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1764 ) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1765 (setq lh-min (/ (* ilh fs-min) ifs) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1766 nb-lpp-max (floor (/ page-height lh-min)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1767 nb-page-min (ceiling (/ (float nb-lines) nb-lpp-max)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1768 lh-max (/ (* ilh fs-max) ifs) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1769 nb-lpp-min (floor (/ page-height lh-max)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1770 nb-page-max (ceiling (/ (float nb-lines) nb-lpp-min))) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1771 (setq nb-page nb-page-min) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1772 (set-buffer buf) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1773 (goto-char (point-max)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1774 (if (not (bolp)) (insert "\n")) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1775 (insert ps-setup) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1776 (insert (format "%d lines\n" nb-lines)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1777 (insert "nb page / font size\n") |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1778 (while (<= nb-page nb-page-max) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1779 (setq nb-lpp (ceiling (/ nb-lines (float nb-page))) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1780 lh (/ page-height nb-lpp) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1781 fs (/ (* ifs lh) ilh)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1782 (insert (format "%s %s\n" nb-page fs)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1783 (setq nb-page (1+ nb-page))) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1784 (insert "\n") |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1785 (display-buffer buf 'not-this-window))) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1786 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1787 (defun ps-select-font () |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1788 "Choose the font name and size (scaling data)." |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1789 (let ((assoc (assq ps-font-family ps-font-info-database)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1790 l fn fb fi bi sz lh sw aw) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1791 (if (null assoc) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1792 (error "Don't have data to scale font %s. Known fonts families are %s" |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1793 ps-font-family |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1794 (mapcar 'car ps-font-info-database))) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1795 (setq l (cdr assoc) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1796 fn (prog1 (car l) (setq l (cdr l))) ; need `pop' |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1797 fb (prog1 (car l) (setq l (cdr l))) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1798 fi (prog1 (car l) (setq l (cdr l))) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1799 bi (prog1 (car l) (setq l (cdr l))) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1800 sz (prog1 (car l) (setq l (cdr l))) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1801 lh (prog1 (car l) (setq l (cdr l))) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1802 sw (prog1 (car l) (setq l (cdr l))) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1803 aw (prog1 (car l) (setq l (cdr l)))) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1804 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1805 (setq ps-font fn) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1806 (setq ps-font-bold fb) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1807 (setq ps-font-italic fi) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1808 (setq ps-font-bold-italic bi) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1809 ;; These data just need to be rescaled: |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1810 (setq ps-line-height (/ (* lh ps-font-size) sz)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1811 (setq ps-space-width (/ (* sw ps-font-size) sz)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1812 (setq ps-avg-char-width (/ (* aw ps-font-size) sz)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1813 ps-font-family)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1814 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1815 (defun ps-select-header-font () |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1816 "Choose the font name and size (scaling data) for the header." |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1817 (let ((assoc (assq ps-header-font-family ps-font-info-database)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1818 l fn fb fi bi sz lh sw aw) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1819 (if (null assoc) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1820 (error "Don't have data to scale font %s. Known fonts families are %s" |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1821 ps-font-family |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1822 (mapcar 'car ps-font-info-database))) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1823 (setq l (cdr assoc) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1824 fn (prog1 (car l) (setq l (cdr l))) ; need `pop' |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1825 fb (prog1 (car l) (setq l (cdr l))) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1826 fi (prog1 (car l) (setq l (cdr l))) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1827 bi (prog1 (car l) (setq l (cdr l))) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1828 sz (prog1 (car l) (setq l (cdr l))) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1829 lh (prog1 (car l) (setq l (cdr l))) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1830 sw (prog1 (car l) (setq l (cdr l))) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1831 aw (prog1 (car l) (setq l (cdr l)))) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1832 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1833 ;; Font name |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1834 (setq ps-header-font fn) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1835 (setq ps-header-title-font fb) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1836 ;; Line height: These data just need to be rescaled: |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1837 (setq ps-header-title-line-height (/ (* lh ps-header-title-font-size) sz)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1838 (setq ps-header-line-height (/ (* lh ps-header-font-size) sz)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1839 ps-header-font-family)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1840 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1841 (defun ps-get-page-dimensions () |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1842 (let ((page-dimensions (cdr (assq ps-paper-type ps-page-dimensions-database))) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1843 page-width page-height) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1844 (cond |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1845 ((null page-dimensions) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1846 (error "`ps-paper-type' must be one of:\n%s" |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1847 (mapcar 'car ps-page-dimensions-database))) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1848 ((< ps-number-of-columns 1) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1849 (error "The number of columns %d should not be negative"))) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1850 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1851 (ps-select-font) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1852 (ps-select-header-font) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1853 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1854 (setq page-width (ps-page-dimensions-get-width page-dimensions) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1855 page-height (ps-page-dimensions-get-height page-dimensions)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1856 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1857 ;; Landscape mode |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1858 (if ps-landscape-mode |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1859 ;; exchange width and height |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1860 (setq page-width (prog1 page-height (setq page-height page-width)))) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1861 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1862 ;; It is used to get the lower right corner (only in landscape mode) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1863 (setq ps-landscape-page-height page-height) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1864 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1865 ;; | lm | text | ic | text | ic | text | rm | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1866 ;; page-width == lm + n * pw + (n - 1) * ic + rm |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1867 ;; => pw == (page-width - lm -rm - (n - 1) * ic) / n |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1868 (setq ps-print-width |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1869 (/ (- page-width |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1870 ps-left-margin ps-right-margin |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1871 (* (1- ps-number-of-columns) ps-inter-column)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1872 ps-number-of-columns)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1873 (if (<= ps-print-width 0) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1874 (error "Bad horizontal layout: |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1875 page-width == %s |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1876 ps-left-margin == %s |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1877 ps-right-margin == %s |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1878 ps-inter-column == %s |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1879 ps-number-of-columns == %s |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1880 | lm | text | ic | text | ic | text | rm | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1881 page-width == lm + n * print-width + (n - 1) * ic + rm |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1882 => print-width == %d !" |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1883 page-width |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1884 ps-left-margin |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1885 ps-right-margin |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1886 ps-inter-column |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1887 ps-number-of-columns |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1888 ps-print-width)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1889 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1890 (setq ps-print-height |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1891 (- page-height ps-bottom-margin ps-top-margin)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1892 (if (<= ps-print-height 0) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1893 (error "Bad vertical layout: |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1894 ps-top-margin == %s |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1895 ps-bottom-margin == %s |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1896 page-height == bm + print-height + tm |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1897 => print-height == %d !" |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1898 ps-top-margin |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1899 ps-bottom-margin |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1900 ps-print-height)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1901 ;; If headers are turned on, deduct the height of the header from |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1902 ;; the print height. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1903 (cond |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1904 (ps-print-header |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1905 (setq ps-header-pad |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1906 (* ps-header-line-pad ps-header-title-line-height)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1907 (setq ps-print-height |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1908 (- ps-print-height |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1909 ps-header-offset |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1910 ps-header-pad |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1911 ps-header-title-line-height |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1912 (* ps-header-line-height (- ps-header-lines 1)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1913 ps-header-pad)))) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1914 (if (<= ps-print-height 0) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1915 (error "Bad vertical layout: |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1916 ps-top-margin == %s |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1917 ps-bottom-margin == %s |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1918 ps-header-offset == %s |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1919 ps-header-pad == %s |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1920 header-height == %s |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1921 page-height == bm + print-height + tm - ho - hh |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1922 => print-height == %d !" |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1923 ps-top-margin |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1924 ps-bottom-margin |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1925 ps-header-offset |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1926 ps-header-pad |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1927 (+ ps-header-pad |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1928 ps-header-title-line-height |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1929 (* ps-header-line-height (- ps-header-lines 1)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1930 ps-header-pad) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1931 ps-print-height)))) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1932 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1933 (defun ps-print-preprint (&optional filename) |
7257 | 1934 (if (and filename |
1935 (or (numberp filename) | |
1936 (listp filename))) | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1937 (let* ((name (concat (buffer-name) ".ps")) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1938 (prompt (format "Save PostScript to file: (default %s) " |
15163
df250bc97b46
(ps-print-preprint): Special handling if
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
1939 name)) |
df250bc97b46
(ps-print-preprint): Special handling if
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
1940 (res (read-file-name prompt default-directory name nil))) |
df250bc97b46
(ps-print-preprint): Special handling if
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
1941 (if (file-directory-p res) |
df250bc97b46
(ps-print-preprint): Special handling if
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
1942 (expand-file-name name (file-name-as-directory res)) |
df250bc97b46
(ps-print-preprint): Special handling if
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
1943 res)))) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1944 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1945 ;; The following functions implement a simple list-buffering scheme so |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1946 ;; that ps-print doesn't have to repeatedly switch between buffers |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1947 ;; while spooling. The functions ps-output and ps-output-string build |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1948 ;; up the lists; the function ps-flush-output takes the lists and |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1949 ;; insert its contents into the spool buffer (*PostScript*). |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1950 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1951 (defun ps-output-string-prim (string) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1952 (insert "(") ;insert start-string delimiter |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1953 (save-excursion ;insert string |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1954 (insert string)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1955 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1956 ;; Find and quote special characters as necessary for PS |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1957 (while (re-search-forward "[()\\]" nil t) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1958 (save-excursion |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1959 (forward-char -1) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1960 (insert "\\"))) |
7257 | 1961 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1962 (goto-char (point-max)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1963 (insert ")")) ;insert end-string delimiter |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1964 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1965 (defun ps-init-output-queue () |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1966 (setq ps-output-head (list "")) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1967 (setq ps-output-tail ps-output-head)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1968 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1969 (defun ps-output (&rest args) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1970 (setcdr ps-output-tail args) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1971 (while (cdr ps-output-tail) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1972 (setq ps-output-tail (cdr ps-output-tail)))) |
7257 | 1973 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1974 (defun ps-output-string (string) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1975 (ps-output t string)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1976 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1977 (defun ps-flush-output () |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1978 (save-excursion |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1979 (set-buffer ps-spool-buffer) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1980 (goto-char (point-max)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1981 (while ps-output-head |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1982 (let ((it (car ps-output-head))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1983 (if (not (eq t it)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1984 (insert it) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1985 (setq ps-output-head (cdr ps-output-head)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1986 (ps-output-string-prim (car ps-output-head)))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1987 (setq ps-output-head (cdr ps-output-head)))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1988 (ps-init-output-queue)) |
7257 | 1989 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1990 (defun ps-insert-file (fname) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1991 (ps-flush-output) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1992 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1993 ;; Check to see that the file exists and is readable; if not, throw |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1994 ;; and error. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1995 (if (not (file-readable-p fname)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1996 (error "Could not read file `%s'" fname)) |
7257 | 1997 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1998 (save-excursion |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1999 (set-buffer ps-spool-buffer) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2000 (goto-char (point-max)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2001 (insert-file fname))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2002 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2003 ;; These functions insert the arrays that define the contents of the |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2004 ;; headers. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2005 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2006 (defun ps-generate-header-line (fonttag &optional content) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2007 (ps-output " [ " fonttag " ") |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2008 (cond |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2009 ;; Literal strings should be output as is -- the string must |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2010 ;; contain its own PS string delimiters, '(' and ')', if necessary. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2011 ((stringp content) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2012 (ps-output content)) |
7257 | 2013 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2014 ;; Functions are called -- they should return strings; they will be |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2015 ;; inserted as strings and the PS string delimiters added. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2016 ((and (symbolp content) (fboundp content)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2017 (ps-output-string (funcall content))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2018 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2019 ;; Variables will have their contents inserted. They should |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2020 ;; contain strings, and will be inserted as strings. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2021 ((and (symbolp content) (boundp content)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2022 (ps-output-string (symbol-value content))) |
7257 | 2023 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2024 ;; Anything else will get turned into an empty string. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2025 (t |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2026 (ps-output-string ""))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2027 (ps-output " ]\n")) |
7257 | 2028 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2029 (defun ps-generate-header (name contents) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2030 (ps-output "/" name " [\n") |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2031 (if (> ps-header-lines 0) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2032 (let ((count 1)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2033 (ps-generate-header-line "/h0" (car contents)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2034 (while (and (< count ps-header-lines) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2035 (setq contents (cdr contents))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2036 (ps-generate-header-line "/h1" (car contents)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2037 (setq count (+ count 1))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2038 (ps-output "] def\n")))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2039 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2040 (defun ps-output-boolean (name bool) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2041 (ps-output (format "/%s %s def\n" name (if bool "true" "false")))) |
7257 | 2042 |
2043 (defun ps-begin-file () | |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2044 (ps-get-page-dimensions) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2045 (setq ps-showpage-count 0) |
7257 | 2046 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2047 (ps-output ps-adobe-tag) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2048 (ps-output "%%Title: " (buffer-name) "\n") ;Take job name from name of |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2049 ;first buffer printed |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2050 (ps-output "%%Creator: " (user-full-name) "\n") |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2051 (ps-output "%%CreationDate: " |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2052 (time-stamp-hh:mm:ss) " " (time-stamp-mon-dd-yyyy) "\n") |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2053 (ps-output "%% DocumentFonts: " |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2054 ps-font " " ps-font-bold " " ps-font-italic " " |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2055 ps-font-bold-italic " " |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2056 ps-header-font " " ps-header-title-font "\n") |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2057 (ps-output "%%Pages: (atend)\n") |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2058 (ps-output "%%EndComments\n\n") |
7257 | 2059 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2060 (ps-output-boolean "LandscapeMode" ps-landscape-mode) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2061 (ps-output (format "/NumberOfColumns %d def\n" ps-number-of-columns)) |
7257 | 2062 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2063 (ps-output (format "/LandscapePageHeight %s def\n" ps-landscape-page-height)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2064 (ps-output (format "/PrintWidth %s def\n" ps-print-width)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2065 (ps-output (format "/PrintHeight %s def\n" ps-print-height)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2066 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2067 (ps-output (format "/LeftMargin %s def\n" ps-left-margin)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2068 (ps-output (format "/RightMargin %s def\n" ps-right-margin)) ; not used |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2069 (ps-output (format "/InterColumn %s def\n" ps-inter-column)) |
7257 | 2070 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2071 (ps-output (format "/BottomMargin %s def\n" ps-bottom-margin)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2072 (ps-output (format "/TopMargin %s def\n" ps-top-margin)) ; not used |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2073 (ps-output (format "/HeaderOffset %s def\n" ps-header-offset)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2074 (ps-output (format "/HeaderPad %s def\n" ps-header-pad)) |
10683 | 2075 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2076 (ps-output-boolean "PrintHeader" ps-print-header) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2077 (ps-output-boolean "PrintHeaderFrame" ps-print-header-frame) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2078 (ps-output-boolean "ShowNofN" ps-show-n-of-n) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2079 (ps-output-boolean "Duplex" ps-spool-duplex) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2080 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2081 (ps-output (format "/LineHeight %s def\n" ps-line-height)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2082 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2083 (ps-output ps-print-prologue-1) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2084 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2085 ;; Header fonts |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2086 (ps-output ; /h0 14 /Helvetica-Bold Font |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2087 (format "/h0 %s /%s DefFont\n" ps-header-title-font-size ps-header-title-font)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2088 (ps-output ; /h1 12 /Helvetica Font |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2089 (format "/h1 %s /%s DefFont\n" ps-header-font-size ps-header-font)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2090 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2091 (ps-output ps-print-prologue-2) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2092 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2093 ;; Text fonts |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2094 (ps-output (format "/f0 %s /%s DefFont\n" ps-font-size ps-font)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2095 (ps-output (format "/f1 %s /%s DefFont\n" ps-font-size ps-font-bold)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2096 (ps-output (format "/f2 %s /%s DefFont\n" ps-font-size ps-font-italic)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2097 (ps-output (format "/f3 %s /%s DefFont\n" ps-font-size ps-font-bold-italic)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2098 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2099 (ps-output "\nBeginDoc\n\n") |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2100 (ps-output "%%EndPrologue\n")) |
7257 | 2101 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2102 (defun ps-header-dirpart () |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2103 (let ((fname (buffer-file-name))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2104 (if fname |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2105 (if (string-equal (buffer-name) (file-name-nondirectory fname)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2106 (file-name-directory fname) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2107 fname) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2108 ""))) |
7257 | 2109 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2110 (defun ps-get-buffer-name () |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2111 (cond |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2112 ;; Indulge Jim this little easter egg: |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2113 ((string= (buffer-name) "ps-print.el") |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2114 "Hey, Cool! It's ps-print.el!!!") |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2115 ;; Indulge Jack this other little easter egg: |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2116 ((string= (buffer-name) "sokoban.el") |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2117 "Super! C'est sokoban.el!") |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2118 (t (buffer-name)))) |
7257 | 2119 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2120 (defun ps-begin-job () |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2121 (setq ps-page-count 0)) |
7257 | 2122 |
2123 (defun ps-end-file () | |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2124 (ps-output "\nEndDoc\n\n") |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2125 (ps-output "%%Trailer\n") |
16870
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
2126 (ps-output (format "%%%%Pages: %d\n" (1+ (/ (1- ps-page-count) |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
2127 ps-number-of-columns))))) |
7257 | 2128 |
2129 (defun ps-next-page () | |
2130 (ps-end-page) | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2131 (ps-flush-output) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2132 (ps-begin-page)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2133 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2134 (defun ps-begin-page (&optional dummypage) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2135 (ps-get-page-dimensions) |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2136 (setq ps-width-remaining ps-print-width) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2137 (setq ps-height-remaining ps-print-height) |
7257 | 2138 |
16870
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
2139 ;; Print only when a new real page begins. |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
2140 (when (zerop (mod ps-page-count ps-number-of-columns)) |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
2141 (ps-output (format "\n%%%%Page: %d %d\n" |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
2142 (1+ (/ ps-page-count ps-number-of-columns)) |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
2143 (1+ (/ ps-page-count ps-number-of-columns))))) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2144 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2145 (ps-output "BeginDSCPage\n") |
16870
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
2146 (ps-output (format "/PageNumber %d def\n" (incf ps-page-count))) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2147 (ps-output "/PageCount 0 def\n") |
7257 | 2148 |
16870
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
2149 (when ps-print-header |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
2150 (ps-generate-header "HeaderLinesLeft" ps-left-header) |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
2151 (ps-generate-header "HeaderLinesRight" ps-right-header) |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
2152 (ps-output (format "%d SetHeaderLines\n" ps-header-lines))) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2153 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2154 (ps-output "BeginPage\n") |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2155 (ps-set-font ps-current-font) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2156 (ps-set-bg ps-current-bg) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2157 (ps-set-color ps-current-color) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2158 (ps-set-underline ps-current-underline-p)) |
7257 | 2159 |
2160 (defun ps-end-page () | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2161 (setq ps-showpage-count (+ 1 ps-showpage-count)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2162 (ps-output "EndPage\n") |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2163 (ps-output "EndDSCPage\n")) |
7257 | 2164 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2165 (defun ps-dummy-page () |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2166 (setq ps-showpage-count (+ 1 ps-showpage-count)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2167 (ps-output "%%Page: " (format "- %d\n" ps-showpage-count) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2168 "BeginDSCPage |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2169 /PrintHeader false def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2170 BeginPage |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2171 EndPage |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2172 EndDSCPage\n")) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2173 |
7257 | 2174 (defun ps-next-line () |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2175 (if (< ps-height-remaining ps-line-height) |
7257 | 2176 (ps-next-page) |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2177 (setq ps-width-remaining ps-print-width) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2178 (setq ps-height-remaining (- ps-height-remaining ps-line-height)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2179 (ps-hard-lf))) |
7257 | 2180 |
2181 (defun ps-continue-line () | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2182 (if (< ps-height-remaining ps-line-height) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2183 (ps-next-page) |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2184 (setq ps-width-remaining ps-print-width) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2185 (setq ps-height-remaining (- ps-height-remaining ps-line-height)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2186 (ps-soft-lf))) |
7257 | 2187 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2188 ;; [jack] Why hard and soft ? |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2189 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2190 (defun ps-hard-lf () |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2191 (ps-output "HL\n")) |
7257 | 2192 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2193 (defun ps-soft-lf () |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2194 (ps-output "SL\n")) |
7257 | 2195 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2196 (defun ps-find-wrappoint (from to char-width) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2197 (let ((avail (truncate (/ ps-width-remaining char-width))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2198 (todo (- to from))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2199 (if (< todo avail) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2200 (cons to (* todo char-width)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2201 (cons (+ from avail) ps-width-remaining)))) |
7257 | 2202 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2203 (defun ps-basic-plot-string (from to &optional bg-color) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2204 (let* ((wrappoint (ps-find-wrappoint from to ps-avg-char-width)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2205 (to (car wrappoint)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2206 (string (buffer-substring from to))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2207 (ps-output-string string) |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2208 (ps-output " S\n") |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2209 wrappoint)) |
7257 | 2210 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2211 (defun ps-basic-plot-whitespace (from to &optional bg-color) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2212 (let* ((wrappoint (ps-find-wrappoint from to ps-space-width)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2213 (to (car wrappoint))) |
7257 | 2214 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2215 (ps-output (format "%d W\n" (- to from))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2216 wrappoint)) |
7257 | 2217 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2218 (defun ps-plot (plotfunc from to &optional bg-color) |
7257 | 2219 (while (< from to) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2220 (let* ((wrappoint (funcall plotfunc from to bg-color)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2221 (plotted-to (car wrappoint)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2222 (plotted-width (cdr wrappoint))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2223 (setq from plotted-to) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2224 (setq ps-width-remaining (- ps-width-remaining plotted-width)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2225 (if (< from to) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2226 (ps-continue-line)))) |
7257 | 2227 (if ps-razzle-dazzle |
2228 (let* ((q-todo (- (point-max) (point-min))) | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2229 (q-done (- (point) (point-min))) |
7257 | 2230 (chunkfrac (/ q-todo 8)) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2231 (chunksize (if (> chunkfrac 1000) 1000 chunkfrac))) |
7257 | 2232 (if (> (- q-done ps-razchunk) chunksize) |
10683 | 2233 (let (foo) |
7257 | 2234 (setq ps-razchunk q-done) |
2235 (setq foo | |
2236 (if (< q-todo 100) | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2237 (/ (* 100 q-done) q-todo) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2238 (/ q-done (/ q-todo 100)))) |
16870
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
2239 (message "Formatting...%3d%%" foo)))))) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2240 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2241 (defun ps-set-font (font) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2242 (setq ps-current-font font) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2243 (ps-output (format "/f%d F\n" ps-current-font))) |
7257 | 2244 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2245 (defun ps-set-bg (color) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2246 (if (setq ps-current-bg color) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2247 (ps-output (format ps-color-format (nth 0 color) (nth 1 color) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2248 (nth 2 color)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2249 " true BG\n") |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2250 (ps-output "false BG\n"))) |
7257 | 2251 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2252 (defun ps-set-color (color) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2253 (if (setq ps-current-color color) |
11799
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2254 nil |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2255 (setq ps-current-color ps-default-fg)) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2256 (ps-output (format ps-color-format (nth 0 ps-current-color) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2257 (nth 1 ps-current-color) (nth 2 ps-current-color)) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2258 " FG\n")) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2259 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2260 (defun ps-set-underline (underline-p) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2261 (ps-output (if underline-p "true" "false") " UL\n") |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2262 (setq ps-current-underline-p underline-p)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2263 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2264 (defun ps-plot-region (from to font fg-color &optional bg-color underline-p) |
7257 | 2265 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2266 (if (not (equal font ps-current-font)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2267 (ps-set-font font)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2268 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2269 ;; Specify a foreground color only if one's specified and it's |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2270 ;; different than the current. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2271 (if (not (equal fg-color ps-current-color)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2272 (ps-set-color fg-color)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2273 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2274 (if (not (equal bg-color ps-current-bg)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2275 (ps-set-bg bg-color)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2276 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2277 ;; Toggle underlining if different. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2278 (if (not (equal underline-p ps-current-underline-p)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2279 (ps-set-underline underline-p)) |
7257 | 2280 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2281 ;; Starting at the beginning of the specified region... |
7257 | 2282 (save-excursion |
2283 (goto-char from) | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2284 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2285 ;; ...break the region up into chunks separated by tabs, linefeeds, |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2286 ;; and pagefeeds, and plot each chunk. |
7257 | 2287 (while (< from to) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2288 (if (re-search-forward "[\t\n\f]" to t) |
7257 | 2289 (let ((match (char-after (match-beginning 0)))) |
2290 (cond | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2291 ((= match ?\t) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2292 (let ((linestart |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2293 (save-excursion (beginning-of-line) (point)))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2294 (ps-plot 'ps-basic-plot-string from (- (point) 1) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2295 bg-color) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2296 (forward-char -1) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2297 (setq from (+ linestart (current-column))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2298 (if (re-search-forward "[ \t]+" to t) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2299 (ps-plot 'ps-basic-plot-whitespace |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2300 from (+ linestart (current-column)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2301 bg-color)))) |
7257 | 2302 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2303 ((= match ?\n) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2304 (ps-plot 'ps-basic-plot-string from (- (point) 1) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2305 bg-color) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2306 (ps-next-line) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2307 ) |
7257 | 2308 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2309 ((= match ?\f) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2310 (ps-plot 'ps-basic-plot-string from (- (point) 1) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2311 bg-color) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2312 (ps-next-page))) |
7257 | 2313 (setq from (point))) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2314 (ps-plot 'ps-basic-plot-string from to bg-color) |
7257 | 2315 (setq from to))))) |
2316 | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2317 (defun ps-color-value (x-color-value) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2318 ;; Scale 16-bit X-COLOR-VALUE to PostScript color value in [0, 1] interval. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2319 (/ x-color-value ps-print-color-scale)) |
7257 | 2320 |
11799
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2321 (defun ps-color-values (x-color) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2322 (cond ((fboundp 'x-color-values) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2323 (x-color-values x-color)) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2324 ((fboundp 'pixel-components) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2325 (pixel-components x-color)) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2326 (t (error "No available function to determine X color values.")))) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2327 |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2328 (defun ps-face-attributes (face) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2329 (let ((differs (face-differs-from-default-p face))) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2330 (list (memq face ps-ref-bold-faces) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2331 (memq face ps-ref-italic-faces) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2332 (memq face ps-ref-underlined-faces) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2333 (and differs (face-foreground face)) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2334 (and differs (face-background face))))) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2335 |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2336 (defun ps-face-attribute-list (face-or-list) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2337 (if (listp face-or-list) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2338 (let (bold-p italic-p underline-p foreground background face-attr face) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2339 (while face-or-list |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2340 (setq face (car face-or-list)) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2341 (setq face-attr (ps-face-attributes face)) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2342 (setq bold-p (or bold-p (nth 0 face-attr))) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2343 (setq italic-p (or italic-p (nth 1 face-attr))) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2344 (setq underline-p (or underline-p (nth 2 face-attr))) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2345 (if foreground |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2346 nil |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2347 (setq foreground (nth 3 face-attr))) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2348 (if background |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2349 nil |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2350 (setq background (nth 4 face-attr))) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2351 (setq face-or-list (cdr face-or-list))) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2352 (list bold-p italic-p underline-p foreground background)) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2353 |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2354 (ps-face-attributes face-or-list))) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2355 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2356 (defun ps-plot-with-face (from to face) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2357 (if face |
11799
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2358 (let* ((face-attr (ps-face-attribute-list face)) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2359 (bold-p (nth 0 face-attr)) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2360 (italic-p (nth 1 face-attr)) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2361 (underline-p (nth 2 face-attr)) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2362 (foreground (nth 3 face-attr)) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2363 (background (nth 4 face-attr)) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2364 (fg-color (if (and ps-print-color-p foreground) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2365 (mapcar 'ps-color-value |
11799
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2366 (ps-color-values foreground)) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2367 ps-default-color)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2368 (bg-color (if (and ps-print-color-p background) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2369 (mapcar 'ps-color-value |
11799
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2370 (ps-color-values background))))) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2371 (ps-plot-region from to |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2372 (cond ((and bold-p italic-p) 3) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2373 (italic-p 2) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2374 (bold-p 1) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2375 (t 0)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2376 ; (or fg-color '(0.0 0.0 0.0)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2377 fg-color |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2378 bg-color underline-p)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2379 (goto-char to))) |
7257 | 2380 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2381 |
12768
68b1359ecd66
Renamed `fsf' to `emacs' in all names.
Richard M. Stallman <rms@gnu.org>
parents:
11799
diff
changeset
|
2382 (defun ps-emacs-face-kind-p (face kind kind-regex kind-list) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2383 (let ((frame-font (face-font face)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2384 (face-defaults (face-font face t))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2385 (or |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2386 ;; Check FACE defaults: |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2387 (and (listp face-defaults) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2388 (memq kind face-defaults)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2389 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2390 ;; Check the user's preferences |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2391 (memq face kind-list)))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2392 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2393 (defun ps-xemacs-face-kind-p (face kind kind-regex kind-list) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2394 (let* ((frame-font (or (face-font face) (face-font 'default))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2395 (kind-cons (assq kind (x-font-properties frame-font))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2396 (kind-spec (cdr-safe kind-cons)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2397 (case-fold-search t)) |
7257 | 2398 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2399 (or (and kind-spec (string-match kind-regex kind-spec)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2400 ;; Kludge-compatible: |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2401 (memq face kind-list)))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2402 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2403 (defun ps-face-bold-p (face) |
12769
4a905565cfa6
(ps-print-emacs-type): Renamed from emacs-type.
Richard M. Stallman <rms@gnu.org>
parents:
12768
diff
changeset
|
2404 (if (eq ps-print-emacs-type 'emacs) |
12768
68b1359ecd66
Renamed `fsf' to `emacs' in all names.
Richard M. Stallman <rms@gnu.org>
parents:
11799
diff
changeset
|
2405 (ps-emacs-face-kind-p face 'bold "-\\(bold\\|demibold\\)-" |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2406 ps-bold-faces) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2407 (ps-xemacs-face-kind-p face 'WEIGHT_NAME "bold\\|demibold" |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2408 ps-bold-faces))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2409 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2410 (defun ps-face-italic-p (face) |
12769
4a905565cfa6
(ps-print-emacs-type): Renamed from emacs-type.
Richard M. Stallman <rms@gnu.org>
parents:
12768
diff
changeset
|
2411 (if (eq ps-print-emacs-type 'emacs) |
12768
68b1359ecd66
Renamed `fsf' to `emacs' in all names.
Richard M. Stallman <rms@gnu.org>
parents:
11799
diff
changeset
|
2412 (ps-emacs-face-kind-p face 'italic "-[io]-" ps-italic-faces) |
10683 | 2413 (or |
2414 (ps-xemacs-face-kind-p face 'ANGLE_NAME "i\\|o" ps-italic-faces) | |
2415 (ps-xemacs-face-kind-p face 'SLANT "i\\|o" ps-italic-faces)))) | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2416 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2417 (defun ps-face-underlined-p (face) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2418 (or (face-underline-p face) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2419 (memq face ps-underlined-faces))) |
7257 | 2420 |
11799
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2421 ;; Ensure that face-list is fbound. |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2422 (or (fboundp 'face-list) (defalias 'face-list 'list-faces)) |
7257 | 2423 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2424 (defun ps-build-reference-face-lists () |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2425 (if ps-auto-font-detect |
11799
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2426 (let ((faces (face-list)) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2427 the-face) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2428 (setq ps-ref-bold-faces nil |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2429 ps-ref-italic-faces nil |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2430 ps-ref-underlined-faces nil) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2431 (while faces |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2432 (setq the-face (car faces)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2433 (if (ps-face-italic-p the-face) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2434 (setq ps-ref-italic-faces |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2435 (cons the-face ps-ref-italic-faces))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2436 (if (ps-face-bold-p the-face) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2437 (setq ps-ref-bold-faces |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2438 (cons the-face ps-ref-bold-faces))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2439 (if (ps-face-underlined-p the-face) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2440 (setq ps-ref-underlined-faces |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2441 (cons the-face ps-ref-underlined-faces))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2442 (setq faces (cdr faces)))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2443 (setq ps-ref-bold-faces ps-bold-faces) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2444 (setq ps-ref-italic-faces ps-italic-faces) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2445 (setq ps-ref-underlined-faces ps-underlined-faces)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2446 (setq ps-build-face-reference nil)) |
7257 | 2447 |
2448 (defun ps-mapper (extent list) | |
2449 (nconc list (list (list (extent-start-position extent) 'push extent) | |
2450 (list (extent-end-position extent) 'pull extent))) | |
2451 nil) | |
2452 | |
10683 | 2453 (defun ps-extent-sorter (a b) |
2454 (< (extent-priority a) (extent-priority b))) | |
11799
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2455 |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2456 (defun ps-print-ensure-fontified (start end) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2457 (if (and (boundp 'lazy-lock-mode) lazy-lock-mode) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2458 (if (fboundp 'lazy-lock-fontify-region) |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2459 (lazy-lock-fontify-region start end) ; the new |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2460 (lazy-lock-fontify-buffer)))) ; the old |
11799
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2461 |
7257 | 2462 (defun ps-generate-postscript-with-faces (from to) |
10683 | 2463 ;; Build the reference lists of faces if necessary. |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2464 (if (or ps-always-build-face-reference |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2465 ps-build-face-reference) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2466 (progn |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2467 (message "Collecting face information...") |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2468 (ps-build-reference-face-lists))) |
10683 | 2469 ;; Set the color scale. We do it here instead of in the defvar so |
2470 ;; that ps-print can be dumped into emacs. This expression can't be | |
2471 ;; evaluated at dump-time because X isn't initialized. | |
2472 (setq ps-print-color-scale | |
2473 (if ps-print-color-p | |
11799
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2474 (float (car (ps-color-values "white"))) |
10683 | 2475 1.0)) |
2476 ;; Generate some PostScript. | |
7257 | 2477 (save-restriction |
2478 (narrow-to-region from to) | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2479 (let ((face 'default) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2480 (position to)) |
11799
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2481 (ps-print-ensure-fontified from to) |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2482 (cond ((or (eq ps-print-emacs-type 'lucid) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2483 (eq ps-print-emacs-type 'xemacs)) |
7257 | 2484 ;; Build the list of extents... |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2485 (let ((a (cons 'dummy nil)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2486 record type extent extent-list) |
7257 | 2487 (map-extents 'ps-mapper nil from to a) |
16870
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
2488 (setq a (sort (cdr a) 'car-less-than-car)) |
7257 | 2489 |
2490 (setq extent-list nil) | |
2491 | |
2492 ;; Loop through the extents... | |
2493 (while a | |
2494 (setq record (car a)) | |
2495 | |
2496 (setq position (car record)) | |
2497 (setq record (cdr record)) | |
2498 | |
2499 (setq type (car record)) | |
2500 (setq record (cdr record)) | |
2501 | |
2502 (setq extent (car record)) | |
2503 | |
2504 ;; Plot up to this record. | |
11799
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2505 ;; XEmacs 19.12: for some reason, we're getting into a |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2506 ;; situation in which some of the records have |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2507 ;; positions less than 'from'. Since we've narrowed |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2508 ;; the buffer, this'll generate errors. This is a |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2509 ;; hack, but don't call ps-plot-with-face unless from > |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2510 ;; point-min. |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2511 (if (and (>= from (point-min)) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2512 (<= position (point-max))) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2513 (ps-plot-with-face from position face)) |
7257 | 2514 |
2515 (cond | |
2516 ((eq type 'push) | |
11799
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2517 (if (extent-face extent) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2518 (setq extent-list (sort (cons extent extent-list) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2519 'ps-extent-sorter)))) |
7257 | 2520 |
2521 ((eq type 'pull) | |
2522 (setq extent-list (sort (delq extent extent-list) | |
2523 'ps-extent-sorter)))) | |
2524 | |
2525 (setq face | |
2526 (if extent-list | |
2527 (extent-face (car extent-list)) | |
2528 'default)) | |
2529 | |
2530 (setq from position) | |
2531 (setq a (cdr a))))) | |
2532 | |
12769
4a905565cfa6
(ps-print-emacs-type): Renamed from emacs-type.
Richard M. Stallman <rms@gnu.org>
parents:
12768
diff
changeset
|
2533 ((eq ps-print-emacs-type 'emacs) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2534 (let ((property-change from) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2535 (overlay-change from)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2536 (while (< from to) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2537 (if (< property-change to) ; Don't search for property change |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2538 ; unless previous search succeeded. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2539 (setq property-change |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2540 (next-property-change from nil to))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2541 (if (< overlay-change to) ; Don't search for overlay change |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2542 ; unless previous search succeeded. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2543 (setq overlay-change |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2544 (min (next-overlay-change from) to))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2545 (setq position |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2546 (min property-change overlay-change)) |
14626
e555a2d12121
(ps-generate-postscript-with-faces):
Karl Heuer <kwzh@gnu.org>
parents:
14190
diff
changeset
|
2547 ;; The code below is not quite correct, |
e555a2d12121
(ps-generate-postscript-with-faces):
Karl Heuer <kwzh@gnu.org>
parents:
14190
diff
changeset
|
2548 ;; because a non-nil overlay invisible property |
e555a2d12121
(ps-generate-postscript-with-faces):
Karl Heuer <kwzh@gnu.org>
parents:
14190
diff
changeset
|
2549 ;; which is inactive according to the current value |
e555a2d12121
(ps-generate-postscript-with-faces):
Karl Heuer <kwzh@gnu.org>
parents:
14190
diff
changeset
|
2550 ;; of buffer-invisibility-spec nonetheless overrides |
e555a2d12121
(ps-generate-postscript-with-faces):
Karl Heuer <kwzh@gnu.org>
parents:
14190
diff
changeset
|
2551 ;; a face text property. |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2552 (setq face |
14626
e555a2d12121
(ps-generate-postscript-with-faces):
Karl Heuer <kwzh@gnu.org>
parents:
14190
diff
changeset
|
2553 (cond ((let ((prop (get-text-property from 'invisible))) |
e555a2d12121
(ps-generate-postscript-with-faces):
Karl Heuer <kwzh@gnu.org>
parents:
14190
diff
changeset
|
2554 ;; Decide whether this invisible property |
e555a2d12121
(ps-generate-postscript-with-faces):
Karl Heuer <kwzh@gnu.org>
parents:
14190
diff
changeset
|
2555 ;; really makes the text invisible. |
e555a2d12121
(ps-generate-postscript-with-faces):
Karl Heuer <kwzh@gnu.org>
parents:
14190
diff
changeset
|
2556 (if (eq buffer-invisibility-spec t) |
e555a2d12121
(ps-generate-postscript-with-faces):
Karl Heuer <kwzh@gnu.org>
parents:
14190
diff
changeset
|
2557 (not (null prop)) |
e555a2d12121
(ps-generate-postscript-with-faces):
Karl Heuer <kwzh@gnu.org>
parents:
14190
diff
changeset
|
2558 (or (memq prop buffer-invisibility-spec) |
e555a2d12121
(ps-generate-postscript-with-faces):
Karl Heuer <kwzh@gnu.org>
parents:
14190
diff
changeset
|
2559 (assq prop buffer-invisibility-spec)))) |
e555a2d12121
(ps-generate-postscript-with-faces):
Karl Heuer <kwzh@gnu.org>
parents:
14190
diff
changeset
|
2560 nil) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2561 ((get-text-property from 'face)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2562 (t 'default))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2563 (let ((overlays (overlays-at from)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2564 (face-priority -1)) ; text-property |
7257 | 2565 (while overlays |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2566 (let* ((overlay (car overlays)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2567 (overlay-face (overlay-get overlay 'face)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2568 (overlay-invisible (overlay-get overlay 'invisible)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2569 (overlay-priority (or (overlay-get overlay |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2570 'priority) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2571 0))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2572 (if (and (or overlay-invisible overlay-face) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2573 (> overlay-priority face-priority)) |
14626
e555a2d12121
(ps-generate-postscript-with-faces):
Karl Heuer <kwzh@gnu.org>
parents:
14190
diff
changeset
|
2574 (setq face (cond ((if (eq buffer-invisibility-spec t) |
e555a2d12121
(ps-generate-postscript-with-faces):
Karl Heuer <kwzh@gnu.org>
parents:
14190
diff
changeset
|
2575 (not (null overlay-invisible)) |
e555a2d12121
(ps-generate-postscript-with-faces):
Karl Heuer <kwzh@gnu.org>
parents:
14190
diff
changeset
|
2576 (or (memq overlay-invisible buffer-invisibility-spec) |
e555a2d12121
(ps-generate-postscript-with-faces):
Karl Heuer <kwzh@gnu.org>
parents:
14190
diff
changeset
|
2577 (assq overlay-invisible buffer-invisibility-spec))) |
e555a2d12121
(ps-generate-postscript-with-faces):
Karl Heuer <kwzh@gnu.org>
parents:
14190
diff
changeset
|
2578 nil) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2579 ((and face overlay-face))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2580 face-priority overlay-priority))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2581 (setq overlays (cdr overlays)))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2582 ;; Plot up to this record. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2583 (ps-plot-with-face from position face) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2584 (setq from position))))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2585 (ps-plot-with-face from to face)))) |
7257 | 2586 |
2587 (defun ps-generate-postscript (from to) | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2588 (ps-plot-region from to 0 nil)) |
7257 | 2589 |
2590 (defun ps-generate (buffer from to genfunc) | |
10683 | 2591 (let ((from (min to from)) |
14712
974766c7bddc
(ps-generate): Bind inhibit-read-only.
Richard M. Stallman <rms@gnu.org>
parents:
14626
diff
changeset
|
2592 (to (max to from)) |
974766c7bddc
(ps-generate): Bind inhibit-read-only.
Richard M. Stallman <rms@gnu.org>
parents:
14626
diff
changeset
|
2593 ;; This avoids trouble if chars with read-only properties |
974766c7bddc
(ps-generate): Bind inhibit-read-only.
Richard M. Stallman <rms@gnu.org>
parents:
14626
diff
changeset
|
2594 ;; are copied into ps-spool-buffer. |
974766c7bddc
(ps-generate): Bind inhibit-read-only.
Richard M. Stallman <rms@gnu.org>
parents:
14626
diff
changeset
|
2595 (inhibit-read-only t)) |
10683 | 2596 (save-restriction |
2597 (narrow-to-region from to) | |
2598 (if ps-razzle-dazzle | |
16870
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
2599 (message "Formatting...%3d%%" (setq ps-razchunk 0))) |
10683 | 2600 (set-buffer buffer) |
2601 (setq ps-source-buffer buffer) | |
2602 (setq ps-spool-buffer (get-buffer-create ps-spool-buffer-name)) | |
2603 (ps-init-output-queue) | |
2604 (let (safe-marker completed-safely needs-begin-file) | |
2605 (unwind-protect | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2606 (progn |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2607 (set-buffer ps-spool-buffer) |
10683 | 2608 |
2609 ;; Get a marker and make it point to the current end of the | |
2610 ;; buffer, If an error occurs, we'll delete everything from | |
2611 ;; the end of this marker onwards. | |
2612 (setq safe-marker (make-marker)) | |
2613 (set-marker safe-marker (point-max)) | |
2614 | |
2615 (goto-char (point-min)) | |
2616 (if (looking-at (regexp-quote "%!PS-Adobe-1.0")) | |
2617 nil | |
2618 (setq needs-begin-file t)) | |
2619 (save-excursion | |
2620 (set-buffer ps-source-buffer) | |
2621 (if needs-begin-file (ps-begin-file)) | |
2622 (ps-begin-job) | |
2623 (ps-begin-page)) | |
2624 (set-buffer ps-source-buffer) | |
2625 (funcall genfunc from to) | |
2626 (ps-end-page) | |
2627 | |
2628 (if (and ps-spool-duplex | |
2629 (= (mod ps-page-count 2) 1)) | |
2630 (ps-dummy-page)) | |
2631 (ps-flush-output) | |
2632 | |
2633 ;; Back to the PS output buffer to set the page count | |
2634 (set-buffer ps-spool-buffer) | |
2635 (goto-char (point-max)) | |
2636 (while (re-search-backward "^/PageCount 0 def$" nil t) | |
2637 (replace-match (format "/PageCount %d def" ps-page-count) t)) | |
7257 | 2638 |
10683 | 2639 ;; Setting this variable tells the unwind form that the |
2640 ;; the postscript was generated without error. | |
2641 (setq completed-safely t)) | |
2642 | |
14040 | 2643 ;; Unwind form: If some bad mojo occurred while generating |
10683 | 2644 ;; postscript, delete all the postscript that was generated. |
2645 ;; This protects the previously spooled files from getting | |
2646 ;; corrupted. | |
2647 (if (and (markerp safe-marker) (not completed-safely)) | |
2648 (progn | |
2649 (set-buffer ps-spool-buffer) | |
2650 (delete-region (marker-position safe-marker) (point-max)))))) | |
2651 | |
2652 (if ps-razzle-dazzle | |
2653 (message "Formatting...done"))))) | |
7257 | 2654 |
2655 (defun ps-do-despool (filename) | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2656 (if (or (not (boundp 'ps-spool-buffer)) |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2657 (not (symbol-value 'ps-spool-buffer))) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2658 (message "No spooled PostScript to print") |
7257 | 2659 (ps-end-file) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2660 (ps-flush-output) |
7257 | 2661 (if filename |
2662 (save-excursion | |
2663 (if ps-razzle-dazzle | |
2664 (message "Saving...")) | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2665 (set-buffer ps-spool-buffer) |
7257 | 2666 (setq filename (expand-file-name filename)) |
2667 (write-region (point-min) (point-max) filename) | |
2668 (if ps-razzle-dazzle | |
2669 (message "Wrote %s" filename))) | |
2670 ;; Else, spool to the printer | |
2671 (if ps-razzle-dazzle | |
2672 (message "Printing...")) | |
2673 (save-excursion | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2674 (set-buffer ps-spool-buffer) |
14190
395b22713872
(ps-do-despool): On MS-DOS, allow both the usual and
Richard M. Stallman <rms@gnu.org>
parents:
14169
diff
changeset
|
2675 (if (and (eq system-type 'ms-dos) (stringp dos-ps-printer)) |
395b22713872
(ps-do-despool): On MS-DOS, allow both the usual and
Richard M. Stallman <rms@gnu.org>
parents:
14169
diff
changeset
|
2676 (write-region (point-min) (point-max) dos-ps-printer t 0) |
395b22713872
(ps-do-despool): On MS-DOS, allow both the usual and
Richard M. Stallman <rms@gnu.org>
parents:
14169
diff
changeset
|
2677 (let ((binary-process-input t)) ; for MS-DOS |
395b22713872
(ps-do-despool): On MS-DOS, allow both the usual and
Richard M. Stallman <rms@gnu.org>
parents:
14169
diff
changeset
|
2678 (apply 'call-process-region |
395b22713872
(ps-do-despool): On MS-DOS, allow both the usual and
Richard M. Stallman <rms@gnu.org>
parents:
14169
diff
changeset
|
2679 (point-min) (point-max) ps-lpr-command nil |
395b22713872
(ps-do-despool): On MS-DOS, allow both the usual and
Richard M. Stallman <rms@gnu.org>
parents:
14169
diff
changeset
|
2680 (if (fboundp 'start-process) 0 nil) |
395b22713872
(ps-do-despool): On MS-DOS, allow both the usual and
Richard M. Stallman <rms@gnu.org>
parents:
14169
diff
changeset
|
2681 nil |
395b22713872
(ps-do-despool): On MS-DOS, allow both the usual and
Richard M. Stallman <rms@gnu.org>
parents:
14169
diff
changeset
|
2682 ps-lpr-switches)))) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2683 (if ps-razzle-dazzle |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2684 (message "Printing...done"))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2685 (kill-buffer ps-spool-buffer))) |
7257 | 2686 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2687 (defun ps-kill-emacs-check () |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2688 (let (ps-buffer) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2689 (if (and (setq ps-buffer (get-buffer ps-spool-buffer-name)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2690 (buffer-modified-p ps-buffer)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2691 (if (y-or-n-p "Unprinted PostScript waiting; print now? ") |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2692 (ps-despool))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2693 (if (and (setq ps-buffer (get-buffer ps-spool-buffer-name)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2694 (buffer-modified-p ps-buffer)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2695 (if (yes-or-no-p "Unprinted PostScript waiting; exit anyway? ") |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2696 nil |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2697 (error "Unprinted PostScript"))))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2698 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2699 (if (fboundp 'add-hook) |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2700 (funcall 'add-hook 'kill-emacs-hook 'ps-kill-emacs-check) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2701 (if kill-emacs-hook |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2702 (message "Won't override existing kill-emacs-hook") |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2703 (setq kill-emacs-hook 'ps-kill-emacs-check))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2704 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2705 ;;; Sample Setup Code: |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2706 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2707 ;; This stuff is for anybody that's brave enough to look this far, |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2708 ;; and able to figure out how to use it. It isn't really part of ps- |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2709 ;; print, but I'll leave it here in hopes it might be useful: |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2710 |
11799
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2711 ;; WARNING!!! The following code is *sample* code only. Don't use it |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2712 ;; unless you understand what it does! |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2713 |
12769
4a905565cfa6
(ps-print-emacs-type): Renamed from emacs-type.
Richard M. Stallman <rms@gnu.org>
parents:
12768
diff
changeset
|
2714 (defmacro ps-prsc () (list 'if (list 'eq 'ps-print-emacs-type ''emacs) |
4a905565cfa6
(ps-print-emacs-type): Renamed from emacs-type.
Richard M. Stallman <rms@gnu.org>
parents:
12768
diff
changeset
|
2715 [f22] ''f22)) |
4a905565cfa6
(ps-print-emacs-type): Renamed from emacs-type.
Richard M. Stallman <rms@gnu.org>
parents:
12768
diff
changeset
|
2716 (defmacro ps-c-prsc () (list 'if (list 'eq 'ps-print-emacs-type ''emacs) |
4a905565cfa6
(ps-print-emacs-type): Renamed from emacs-type.
Richard M. Stallman <rms@gnu.org>
parents:
12768
diff
changeset
|
2717 [C-f22] |
10683 | 2718 ''(control f22))) |
12769
4a905565cfa6
(ps-print-emacs-type): Renamed from emacs-type.
Richard M. Stallman <rms@gnu.org>
parents:
12768
diff
changeset
|
2719 (defmacro ps-s-prsc () (list 'if (list 'eq 'ps-print-emacs-type ''emacs) |
4a905565cfa6
(ps-print-emacs-type): Renamed from emacs-type.
Richard M. Stallman <rms@gnu.org>
parents:
12768
diff
changeset
|
2720 [S-f22] |
10683 | 2721 ''(shift f22))) |
2722 | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2723 ;; Look in an article or mail message for the Subject: line. To be |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2724 ;; placed in ps-left-headers. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2725 (defun ps-article-subject () |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2726 (save-excursion |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2727 (goto-char (point-min)) |
15620
7844c0f756d0
(ps-article-subject): Don't die if no subject header.
Karl Heuer <kwzh@gnu.org>
parents:
15163
diff
changeset
|
2728 (if (re-search-forward "^Subject:[ \t]+\\(.*\\)$" nil t) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2729 (buffer-substring (match-beginning 1) (match-end 1)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2730 "Subject ???"))) |
7257 | 2731 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2732 ;; Look in an article or mail message for the From: line. Sorta-kinda |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2733 ;; understands RFC-822 addresses and can pull the real name out where |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2734 ;; it's provided. To be placed in ps-left-headers. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2735 (defun ps-article-author () |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2736 (save-excursion |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2737 (goto-char (point-min)) |
15621
6be6d1990543
(ps-article-author, ps-info-file, ps-info-node): Don't die if header is missing.
Karl Heuer <kwzh@gnu.org>
parents:
15620
diff
changeset
|
2738 (if (re-search-forward "^From:[ \t]+\\(.*\\)$" nil t) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2739 (let ((fromstring (buffer-substring (match-beginning 1) (match-end 1)))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2740 (cond |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2741 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2742 ;; Try first to match addresses that look like |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2743 ;; thompson@wg2.waii.com (Jim Thompson) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2744 ((string-match ".*[ \t]+(\\(.*\\))" fromstring) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2745 (substring fromstring (match-beginning 1) (match-end 1))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2746 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2747 ;; Next try to match addresses that look like |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2748 ;; Jim Thompson <thompson@wg2.waii.com> |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2749 ((string-match "\\(.*\\)[ \t]+<.*>" fromstring) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2750 (substring fromstring (match-beginning 1) (match-end 1))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2751 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2752 ;; Couldn't find a real name -- show the address instead. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2753 (t fromstring))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2754 "From ???"))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2755 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2756 ;; A hook to bind to gnus-Article-prepare-hook. This will set the ps- |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2757 ;; left-headers specially for gnus articles. Unfortunately, gnus- |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2758 ;; article-mode-hook is called only once, the first time the *Article* |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2759 ;; buffer enters that mode, so it would only work for the first time |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2760 ;; we ran gnus. The second time, this hook wouldn't get set up. The |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2761 ;; only alternative is gnus-article-prepare-hook. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2762 (defun ps-gnus-article-prepare-hook () |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2763 (setq ps-header-lines 3) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2764 (setq ps-left-header |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2765 ;; The left headers will display the article's subject, its |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2766 ;; author, and the newsgroup it was in. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2767 (list 'ps-article-subject 'ps-article-author 'gnus-newsgroup-name))) |
7257 | 2768 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2769 ;; A hook to bind to vm-mode-hook to locally bind prsc and set the ps- |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2770 ;; left-headers specially for mail messages. This header setup would |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2771 ;; also work, I think, for RMAIL. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2772 (defun ps-vm-mode-hook () |
10683 | 2773 (local-set-key (ps-prsc) 'ps-vm-print-message-from-summary) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2774 (setq ps-header-lines 3) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2775 (setq ps-left-header |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2776 ;; The left headers will display the message's subject, its |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2777 ;; author, and the name of the folder it was in. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2778 (list 'ps-article-subject 'ps-article-author 'buffer-name))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2779 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2780 ;; Every now and then I forget to switch from the *Summary* buffer to |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2781 ;; the *Article* before hitting prsc, and a nicely formatted list of |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2782 ;; article subjects shows up at the printer. This function, bound to |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2783 ;; prsc for the gnus *Summary* buffer means I don't have to switch |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2784 ;; buffers first. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2785 (defun ps-gnus-print-article-from-summary () |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2786 (interactive) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2787 (if (get-buffer "*Article*") |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2788 (save-excursion |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2789 (set-buffer "*Article*") |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2790 (ps-spool-buffer-with-faces)))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2791 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2792 ;; See ps-gnus-print-article-from-summary. This function does the |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2793 ;; same thing for vm. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2794 (defun ps-vm-print-message-from-summary () |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2795 (interactive) |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2796 (if (and (boundp 'vm-mail-buffer) (symbol-value 'vm-mail-buffer)) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2797 (save-excursion |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2798 (set-buffer (symbol-value 'vm-mail-buffer)) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2799 (ps-spool-buffer-with-faces)))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2800 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2801 ;; A hook to bind to bind to gnus-summary-setup-buffer to locally bind |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2802 ;; prsc. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2803 (defun ps-gnus-summary-setup () |
10683 | 2804 (local-set-key (ps-prsc) 'ps-gnus-print-article-from-summary)) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2805 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2806 ;; Look in an article or mail message for the Subject: line. To be |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2807 ;; placed in ps-left-headers. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2808 (defun ps-info-file () |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2809 (save-excursion |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2810 (goto-char (point-min)) |
15621
6be6d1990543
(ps-article-author, ps-info-file, ps-info-node): Don't die if header is missing.
Karl Heuer <kwzh@gnu.org>
parents:
15620
diff
changeset
|
2811 (if (re-search-forward "File:[ \t]+\\([^, \t\n]*\\)" nil t) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2812 (buffer-substring (match-beginning 1) (match-end 1)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2813 "File ???"))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2814 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2815 ;; Look in an article or mail message for the Subject: line. To be |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2816 ;; placed in ps-left-headers. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2817 (defun ps-info-node () |
7257 | 2818 (save-excursion |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2819 (goto-char (point-min)) |
15621
6be6d1990543
(ps-article-author, ps-info-file, ps-info-node): Don't die if header is missing.
Karl Heuer <kwzh@gnu.org>
parents:
15620
diff
changeset
|
2820 (if (re-search-forward "Node:[ \t]+\\([^,\t\n]*\\)" nil t) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2821 (buffer-substring (match-beginning 1) (match-end 1)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2822 "Node ???"))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2823 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2824 (defun ps-info-mode-hook () |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2825 (setq ps-left-header |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2826 ;; The left headers will display the node name and file name. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2827 (list 'ps-info-node 'ps-info-file))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2828 |
11799
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2829 ;; WARNING! The following function is a *sample* only, and is *not* |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2830 ;; meant to be used as a whole unless you understand what the effects |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2831 ;; will be! (In fact, this is a copy of Jim's setup for ps-print -- I'd |
11799
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2832 ;; be very surprised if it was useful to *anybody*, without |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2833 ;; modification.) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2834 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2835 (defun ps-jts-ps-setup () |
10683 | 2836 (global-set-key (ps-prsc) 'ps-spool-buffer-with-faces) ;f22 is prsc |
2837 (global-set-key (ps-s-prsc) 'ps-spool-region-with-faces) | |
2838 (global-set-key (ps-c-prsc) 'ps-despool) | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2839 (add-hook 'gnus-article-prepare-hook 'ps-gnus-article-prepare-hook) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2840 (add-hook 'gnus-summary-mode-hook 'ps-gnus-summary-setup) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2841 (add-hook 'vm-mode-hook 'ps-vm-mode-hook) |
10683 | 2842 (add-hook 'vm-mode-hooks 'ps-vm-mode-hook) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2843 (add-hook 'Info-mode-hook 'ps-info-mode-hook) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2844 (setq ps-spool-duplex t) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2845 (setq ps-print-color-p nil) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2846 (setq ps-lpr-command "lpr") |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2847 (setq ps-lpr-switches '("-Jjct,duplex_long")) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2848 'ps-jts-ps-setup) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2849 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2850 ;; WARNING! The following function is a *sample* only, and is *not* |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2851 ;; meant to be used as a whole unless it corresponds to your needs. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2852 ;; (In fact, this is a copy of Jack's setup for ps-print -- |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2853 ;; I would not be that surprised if it was useful to *anybody*, |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2854 ;; without modification.) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2855 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2856 (defun ps-jack-setup () |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2857 (setq ps-print-color-p 'nil |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2858 ps-lpr-command "lpr" |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2859 ps-lpr-switches (list) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2860 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2861 ps-paper-type 'a4 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2862 ps-landscape-mode 't |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2863 ps-number-of-columns 2 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2864 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2865 ps-left-margin (/ (* 72 1.0) 2.54) ; 1.0 cm |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2866 ps-right-margin (/ (* 72 1.0) 2.54) ; 1.0 cm |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2867 ps-inter-column (/ (* 72 1.0) 2.54) ; 1.0 cm |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2868 ps-bottom-margin (/ (* 72 1.5) 2.54) ; 1.5 cm |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2869 ps-top-margin (/ (* 72 1.5) 2.54) ; 1.5 cm |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2870 ps-header-offset (/ (* 72 1.0) 2.54) ; 1.0 cm |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2871 ps-header-line-pad .15 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2872 ps-print-header t |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2873 ps-print-header-frame t |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2874 ps-header-lines 2 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2875 ps-show-n-of-n t |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2876 ps-spool-duplex nil |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2877 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2878 ps-font-family 'Courier |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2879 ps-font-size 5.5 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2880 ps-header-font-family 'Helvetica |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2881 ps-header-font-size 6 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2882 ps-header-title-font-size 8) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2883 'ps-jack-setup) |
7257 | 2884 |
2885 (provide 'ps-print) | |
10738
e7d5b119b583
(ps-print-version): Add caveat about version number.
Richard M. Stallman <rms@gnu.org>
parents:
10683
diff
changeset
|
2886 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2887 ;;; ps-print.el ends here |