Mercurial > emacs
annotate lisp/ps-print.el @ 19168:8b79ec97982b
(updates): Add missing semicolons.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 05 Aug 1997 17:06:51 +0000 |
parents | 96c53acede23 |
children | 94a54fbffb3e |
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 |
19011 | 3 ;; Copyright (C) 1993, 1994, 1995, 1996, 1997 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>) |
19011 | 6 ;; Author: Jacques Duthen <duthen@club-internet.fr> |
7 ;; Maintainer: Vinicius Jose Latorre <vinicius@cpqd.br> | |
16870
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
8 ;; Keywords: print, PostScript |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
9 ;; 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
|
10 ;; Version: 3.04 |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
11 |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
12 (defconst ps-print-version "3.04" |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
13 "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
|
14 |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
15 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
|
16 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
|
17 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
|
18 distributed with. |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
19 |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
20 Please send all bug fixes and enhancements to |
17406
672954f25d25
Fix second copy of Duthen's email address.
Richard M. Stallman <rms@gnu.org>
parents:
17405
diff
changeset
|
21 Jacques Duthen <duthen@club-internet.fr>>. |
16870
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
22 ") |
7257 | 23 |
10493 | 24 ;; This file is part of GNU Emacs. |
7257 | 25 |
26 ;; GNU Emacs is free software; you can redistribute it and/or modify | |
27 ;; it under the terms of the GNU General Public License as published by | |
28 ;; the Free Software Foundation; either version 2, or (at your option) | |
29 ;; any later version. | |
30 | |
31 ;; GNU Emacs is distributed in the hope that it will be useful, | |
32 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
33 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
34 ;; GNU General Public License for more details. | |
35 | |
36 ;; You should have received a copy of the GNU General Public License | |
14169 | 37 ;; along with GNU Emacs; see the file COPYING. If not, write to the |
38 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
39 ;; Boston, MA 02111-1307, USA. | |
7257 | 40 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
41 ;;; Commentary: |
7257 | 42 |
43 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
44 ;; | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
45 ;; About ps-print |
7257 | 46 ;; -------------- |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
47 ;; |
7257 | 48 ;; This package provides printing of Emacs buffers on PostScript |
49 ;; printers; the buffer's bold and italic text attributes are | |
50 ;; preserved in the printer output. Ps-print is intended for use with | |
10683 | 51 ;; Emacs 19 or Lucid Emacs, together with a fontifying package such as |
52 ;; font-lock or hilit. | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
53 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
54 ;; |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
55 ;; Using ps-print |
7257 | 56 ;; -------------- |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
57 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
58 ;; The Commands |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
59 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
60 ;; Ps-print provides eight commands for generating PostScript images |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
61 ;; of Emacs buffers: |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
62 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
63 ;; ps-print-buffer |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
64 ;; ps-print-buffer-with-faces |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
65 ;; ps-print-region |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
66 ;; ps-print-region-with-faces |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
67 ;; ps-spool-buffer |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
68 ;; ps-spool-buffer-with-faces |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
69 ;; ps-spool-region |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
70 ;; ps-spool-region-with-faces |
7257 | 71 ;; |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
72 ;; These commands all perform essentially the same function: they |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
73 ;; generate PostScript images suitable for printing on a PostScript |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
74 ;; printer or displaying with GhostScript. These commands are |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
75 ;; collectively referred to as "ps-print- commands". |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
76 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
77 ;; 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
|
78 ;; PostScript image is sent to the printer: |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
79 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
80 ;; print - The PostScript image is immediately sent to the |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
81 ;; printer; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
82 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
83 ;; spool - The PostScript image is saved temporarily in an |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
84 ;; Emacs buffer. Many images may be spooled locally |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
85 ;; 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
|
86 ;; to the printer, use the command `ps-despool'. |
7257 | 87 ;; |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
88 ;; The spooling mechanism was designed for printing lots of small |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
89 ;; 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
|
90 ;; 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
|
91 ;; 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
|
92 ;; printout than to find 50 single-page printouts). |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
93 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
94 ;; Ps-print has a hook in the `kill-emacs-hooks' so that you won't |
14040 | 95 ;; accidentally quit from Emacs while you have unprinted PostScript |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
96 ;; 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
|
97 ;; 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
|
98 ;; 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
|
99 ;; on the confirmation that Emacs uses for modified buffers. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
100 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
101 ;; 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
|
102 ;; much of the buffer is printed: |
7257 | 103 ;; |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
104 ;; buffer - Print the entire buffer. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
105 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
106 ;; region - Print just the current region. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
107 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
108 ;; 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
|
109 ;; will include font, color, and underline information in the |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
110 ;; 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
|
111 ;; buffer. The ps-print- commands without the -with-faces suffix |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
112 ;; don't include font, color, or underline information; images printed |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
113 ;; 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
|
114 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
115 ;; Two ps-print- command examples: |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
116 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
117 ;; ps-print-buffer - print the entire buffer, |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
118 ;; without font, color, or |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
119 ;; underline information, and |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
120 ;; send it immediately to the |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
121 ;; printer. |
7257 | 122 ;; |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
123 ;; ps-spool-region-with-faces - print just the current region; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
124 ;; include font, color, and |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
125 ;; underline information, and |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
126 ;; spool the image in Emacs to |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
127 ;; send to the printer later. |
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 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
130 ;; 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
|
131 ;; ----------------- |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
132 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
133 ;; To print your buffer, type |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
134 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
135 ;; M-x ps-print-buffer |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
136 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
137 ;; 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
|
138 ;; 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
|
139 ;; specified. By giving the command a prefix argument |
7257 | 140 ;; |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
141 ;; C-u M-x ps-print-buffer |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
142 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
143 ;; 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
|
144 ;; 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
|
145 ;; 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
|
146 ;; 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
|
147 ;; file by giving a prefix argument to `ps-despool': |
7257 | 148 ;; |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
149 ;; C-u M-x ps-despool |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
150 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
151 ;; 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
|
152 ;; the file to save to. |
7257 | 153 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
154 ;; 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
|
155 ;; 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
|
156 ;; 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
|
157 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
158 ;; (global-set-key 'f22 'ps-spool-buffer-with-faces) ;f22 is prsc |
7257 | 159 ;; (global-set-key '(shift f22) 'ps-spool-region-with-faces) |
160 ;; (global-set-key '(control f22) 'ps-despool) | |
161 ;; | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
162 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
163 ;; 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
|
164 ;; --------------------- |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
165 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
166 ;; 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
|
167 ;; 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
|
168 ;; 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
|
169 ;; `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
|
170 ;; 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
|
171 ;; 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
|
172 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
173 ;; 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
|
174 ;; 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
|
175 ;; `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
|
176 ;; 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
|
177 ;; a program that does not format the files it prints. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
178 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
179 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
180 ;; The Page Layout |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
181 ;; --------------- |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
182 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
183 ;; 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
|
184 ;; 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
|
185 ;; 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
|
186 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
187 ;; 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
|
188 ;; 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
|
189 ;; `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
|
190 ;; `ledger' `statement' `executive' `a4small' `b4' `b5' |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
191 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
192 ;; 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
|
193 ;; 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
|
194 ;; 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
|
195 ;; 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
|
196 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
197 ;; 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
|
198 ;; 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
|
199 ;; 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
|
200 ;; 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
|
201 ;; and the printed header, whatever the orientation is. |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
202 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
203 ;; 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
|
204 ;; 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
|
205 ;; You can use: |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
206 ;; - (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
|
207 ;; - (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
|
208 ;; but also |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
209 ;; - 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
|
210 ;; - multi-column portrait or landscape mode |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
211 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
212 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
213 ;; Horizontal layout |
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 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
216 ;; 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
|
217 ;; `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
|
218 ;; as follows: |
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 ;; | | | | | | | | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
222 ;; | 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
|
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 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
226 ;; 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
|
227 ;; 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
|
228 ;; 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
|
229 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
230 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
231 ;; Vertical layout |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
232 ;; --------------- |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
233 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
234 ;; 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
|
235 ;; `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
|
236 ;; as follows: |
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 ;; |--------| |--------| |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
239 ;; | tm | | tm | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
240 ;; |--------| |--------| |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
241 ;; | header | | | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
242 ;; |--------| | | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
243 ;; | ho | | | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
244 ;; |--------| or | text | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
245 ;; | | | | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
246 ;; | text | | | |
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 ;; |--------| |--------| |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
249 ;; | bm | | bm | |
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 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
252 ;; 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
|
253 ;; 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
|
254 ;; 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
|
255 ;; and the printed header, whatever the orientation is. |
10492
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 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
258 ;; Headers |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
259 ;; ------- |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
260 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
261 ;; 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
|
262 ;; 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
|
263 ;; 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
|
264 ;; 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
|
265 ;; The default headers look something like this: |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
266 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
267 ;; ps-print.el 1/21 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
268 ;; /home/jct/emacs-lisp/ps/new 94/12/31 |
7257 | 269 ;; |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
270 ;; 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
|
271 ;; 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
|
272 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
273 ;; Headers are configurable: |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
274 ;; 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
|
275 ;; 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
|
276 ;; set `ps-print-header-frame' to nil. |
7257 | 277 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
278 ;; 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
|
279 ;; 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
|
280 ;; `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
|
281 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
282 ;; 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
|
283 ;; 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
|
284 ;; 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
|
285 ;; .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
|
286 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
287 ;; 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
|
288 ;; 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
|
289 ;; set `ps-show-n-of-n' to nil. |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
290 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
291 ;; 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
|
292 ;; 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
|
293 ;; 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
|
294 ;; 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
|
295 ;; printing below the date. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
296 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
297 ;; 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
|
298 ;; `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
|
299 ;; 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
|
300 ;; 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
|
301 ;; 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
|
302 ;; 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
|
303 ;; and should contain the PostScript string delimiters '(' and ')'. |
7257 | 304 ;; |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
305 ;; Symbols in the header format lists can either represent functions |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
306 ;; 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
|
307 ;; 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
|
308 ;; the header. In either case, function or variable, the PostScript |
14040 | 309 ;; 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
|
310 ;; the returned value. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
311 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
312 ;; 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
|
313 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
314 ;; Moe |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
315 ;; Larry |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
316 ;; Curly |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
317 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
318 ;; where we have a function to return "Moe" |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
319 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
320 ;; (defun moe-func () |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
321 ;; "Moe") |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
322 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
323 ;; a variable specifying "Larry" |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
324 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
325 ;; (setq larry-var "Larry") |
7257 | 326 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
327 ;; 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
|
328 ;; set: |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
329 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
330 ;; (setq ps-left-header (list 'moe-func 'larry-var "(Curly)")) |
7257 | 331 ;; |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
332 ;; 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
|
333 ;; 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
|
334 ;; 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
|
335 ;; 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
|
336 ;; 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
|
337 ;; 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
|
338 ;; Consider yourself warned! |
10492
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 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
341 ;; Duplex Printers |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
342 ;; --------------- |
7257 | 343 ;; |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
344 ;; 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
|
345 ;; 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
|
346 ;; 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
|
347 ;; 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
|
348 ;; 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
|
349 ;; for your printer. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
350 ;; |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
351 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
352 ;; Font managing |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
353 ;; ------------- |
7257 | 354 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
355 ;; 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
|
356 ;; 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
|
357 ;; 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
|
358 ;; `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
|
359 ;; 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
|
360 ;; 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
|
361 ;; 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
|
362 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
363 ;; 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
|
364 ;; 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
|
365 ;; 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
|
366 ;; 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
|
367 ;; which lists the currently available font families. |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
368 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
369 ;; 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
|
370 ;; 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
|
371 ;; 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
|
372 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
373 ;; 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
|
374 ;; 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
|
375 ;; 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
|
376 ;; 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
|
377 ;; 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
|
378 ;; in points, for the top line of text in the header. |
7257 | 379 ;; |
10738
e7d5b119b583
(ps-print-version): Add caveat about version number.
Richard M. Stallman <rms@gnu.org>
parents:
10683
diff
changeset
|
380 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
381 ;; 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
|
382 ;; ------------------------ |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
383 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
384 ;; 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
|
385 ;; 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
|
386 ;; 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
|
387 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
388 ;; 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
|
389 ;; 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
|
390 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
391 ;; - 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
|
392 ;; - 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
|
393 ;; - 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
|
394 ;; `% 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
|
395 ;; - 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
|
396 ;; - 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
|
397 ;; 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
|
398 ;; `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
|
399 ;; - 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
|
400 ;; 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
|
401 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
402 ;; 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
|
403 ;; 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
|
404 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
405 ;; - 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
|
406 ;; (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
|
407 ;; (append |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
408 ;; '((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
|
409 ;; "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
|
410 ;; 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
|
411 ;; 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
|
412 ;; - 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
|
413 ;; (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
|
414 ;; - 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
|
415 ;; 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
|
416 ;; (require 'ps-print) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
417 ;; (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
|
418 ;; 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
|
419 ;; (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
|
420 ;; 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
|
421 ;; (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
|
422 ;; 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
|
423 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
424 ;; 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
|
425 ;; (my-mixed-family |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
426 ;; "Courier-Bold" "Helvetica" |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
427 ;; "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
|
428 ;; 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
|
429 ;; 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
|
430 ;; (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
|
431 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
432 ;; 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
|
433 ;; 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
|
434 ;; % 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
|
435 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
436 ;; 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
|
437 ;; 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
|
438 ;; 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
|
439 ;; 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
|
440 ;; much font info. |
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 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
443 ;; 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
|
444 ;; ----------------------------- |
10738
e7d5b119b583
(ps-print-version): Add caveat about version number.
Richard M. Stallman <rms@gnu.org>
parents:
10683
diff
changeset
|
445 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
446 ;; 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
|
447 ;; 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
|
448 ;; 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
|
449 ;; 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
|
450 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
451 ;; 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
|
452 ;; 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
|
453 ;; 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
|
454 ;; 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
|
455 ;; 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
|
456 ;; file: |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
457 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
458 ;; (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
|
459 ;; (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
|
460 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
461 ;; 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
|
462 ;; *both* lists. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
463 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
464 ;; 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
|
465 ;; 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
|
466 ;; 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
|
467 ;; 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
|
468 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
469 ;; 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
|
470 ;; 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
|
471 ;; 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
|
472 ;; `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
|
473 ;; 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
|
474 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
475 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
476 ;; 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
|
477 ;; ----------------------------- |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
478 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
479 ;; 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
|
480 ;; 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
|
481 ;; 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
|
482 ;; 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
|
483 ;; 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
|
484 ;; 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
|
485 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
486 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
487 ;; Utilities |
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 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
490 ;; 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
|
491 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
492 ;; `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
|
493 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
494 ;; 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
|
495 ;; 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
|
496 ;; 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
|
497 ;; 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
|
498 ;; 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
|
499 ;; 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
|
500 ;; 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
|
501 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
502 ;; 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
|
503 ;; 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
|
504 ;; 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
|
505 ;; 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
|
506 ;; 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
|
507 ;; 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
|
508 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
509 ;; |
10738
e7d5b119b583
(ps-print-version): Add caveat about version number.
Richard M. Stallman <rms@gnu.org>
parents:
10683
diff
changeset
|
510 ;; New since version 1.5 |
e7d5b119b583
(ps-print-version): Add caveat about version number.
Richard M. Stallman <rms@gnu.org>
parents:
10683
diff
changeset
|
511 ;; --------------------- |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
512 ;; |
10738
e7d5b119b583
(ps-print-version): Add caveat about version number.
Richard M. Stallman <rms@gnu.org>
parents:
10683
diff
changeset
|
513 ;; Color output capability. |
e7d5b119b583
(ps-print-version): Add caveat about version number.
Richard M. Stallman <rms@gnu.org>
parents:
10683
diff
changeset
|
514 ;; 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
|
515 ;; 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
|
516 ;; Slightly faster. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
517 ;; 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
|
518 ;; 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
|
519 ;; |
e7d5b119b583
(ps-print-version): Add caveat about version number.
Richard M. Stallman <rms@gnu.org>
parents:
10683
diff
changeset
|
520 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
521 ;; 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
|
522 ;; --------------------- |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
523 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
524 ;; [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
|
525 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
526 ;; 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
|
527 ;; Landscape mode. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
528 ;; Multiple columns. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
529 ;; Tools for page setup. |
10738
e7d5b119b583
(ps-print-version): Add caveat about version number.
Richard M. Stallman <rms@gnu.org>
parents:
10683
diff
changeset
|
530 ;; |
7257 | 531 ;; |
532 ;; Known bugs and limitations of ps-print: | |
533 ;; -------------------------------------- | |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
534 ;; |
11799
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
535 ;; 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
|
536 ;; 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
|
537 ;; background color. |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
538 ;; |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
539 ;; 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
|
540 ;; |
10738
e7d5b119b583
(ps-print-version): Add caveat about version number.
Richard M. Stallman <rms@gnu.org>
parents:
10683
diff
changeset
|
541 ;; Automatic font-attribute detection doesn't work well, especially |
10683 | 542 ;; 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
|
543 ;; 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
|
544 ;; `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
|
545 ;; detection by setting `ps-auto-font-detect' to nil. |
10683 | 546 ;; |
11799
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
547 ;; 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
|
548 ;; 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
|
549 ;; instead. |
7257 | 550 ;; |
10683 | 551 ;; Still too slow; could use some hand-optimization. |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
552 ;; |
7257 | 553 ;; ASCII Control characters other than tab, linefeed and pagefeed are |
554 ;; not handled. | |
555 ;; | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
556 ;; Default background color isn't working. |
7257 | 557 ;; |
558 ;; Faces are always treated as opaque. | |
559 ;; | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
560 ;; Epoch and Emacs 18 not supported. At all. |
7257 | 561 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
562 ;; Fixed-pitch fonts work better for line folding, but are not required. |
7257 | 563 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
564 ;; `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
|
565 ;; of folding lines. |
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 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
568 ;; Things to change: |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
569 ;; ---------------- |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
570 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
571 ;; 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
|
572 ;; 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
|
573 ;; 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
|
574 ;; 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
|
575 ;; 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
|
576 ;; 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
|
577 ;; `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
|
578 ;; of folding lines. |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
579 ;; |
7257 | 580 ;; |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
581 ;; Acknowledgements |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
582 ;; ---------------- |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
583 ;; 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
|
584 ;; [jack] |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
585 ;; |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
586 ;; 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
|
587 ;; color and the invisible property. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
588 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
589 ;; 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
|
590 ;; 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
|
591 ;; ps-print, but his work is still appreciated. |
7257 | 592 ;; |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
593 ;; 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
|
594 ;; 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
|
595 ;; ps-print, but their efforts are not forgotten. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
596 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
597 ;; 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
|
598 ;; 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
|
599 ;; sharing it with me. |
7257 | 600 ;; |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
601 ;; Thanks to all who mailed comments, encouragement, and criticism. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
602 ;; 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
|
603 ;; 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
|
604 ;; interest. |
7257 | 605 ;; |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
606 ;; Jim |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
607 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
7257 | 608 |
609 ;;; Code: | |
610 | |
16870
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
611 (eval-when-compile |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
612 (require 'cl)) |
10738
e7d5b119b583
(ps-print-version): Add caveat about version number.
Richard M. Stallman <rms@gnu.org>
parents:
10683
diff
changeset
|
613 |
16870
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
614 (unless (featurep 'lisp-float-type) |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
615 (error "`ps-print' requires floating point support")) |
7257 | 616 |
617 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
618 ;; User Variables: |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
619 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
620 ;;; 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
|
621 |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
622 (defgroup ps-print nil |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
623 "Postscript generator for Emacs 19" |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
624 :prefix "ps-" |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
625 :group 'wp) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
626 |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
627 (defgroup ps-print-horizontal nil |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
628 "Horizontal page layout" |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
629 :prefix "ps-" |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
630 :tag "Horizontal" |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
631 :group 'ps-print) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
632 |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
633 (defgroup ps-print-vertical nil |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
634 "Vertical page layout" |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
635 :prefix "ps-" |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
636 :tag "Vertical" |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
637 :group 'ps-print) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
638 |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
639 (defgroup ps-print-header nil |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
640 "Headers layout" |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
641 :prefix "ps-" |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
642 :tag "Header" |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
643 :group 'ps-print) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
644 |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
645 (defgroup ps-print-font nil |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
646 "Fonts customization" |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
647 :prefix "ps-" |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
648 :tag "Font" |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
649 :group 'ps-print) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
650 |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
651 (defgroup ps-print-color nil |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
652 "Color customization" |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
653 :prefix "ps-" |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
654 :tag "Color" |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
655 :group 'ps-print) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
656 |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
657 (defgroup ps-print-face nil |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
658 "Faces customization" |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
659 :prefix "ps-" |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
660 :tag "PS Faces" |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
661 :group 'ps-print |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
662 :group 'faces) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
663 |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
664 |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
665 (defcustom ps-lpr-command lpr-command |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
666 "*The shell command for printing a PostScript file." |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
667 :type 'string |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
668 :group 'ps-print) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
669 |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
670 (defcustom ps-lpr-switches lpr-switches |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
671 "*A list of extra switches to pass to `ps-lpr-command'." |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
672 :type '(repeat string) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
673 :group 'ps-print) |
7257 | 674 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
675 ;;; Page layout |
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 ;; 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
|
678 ;; 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
|
679 ;; 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
|
680 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
681 ;; 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
|
682 ;; 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
|
683 ;; 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
|
684 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
685 ;; 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
|
686 ;; 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
|
687 ;; 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
|
688 ;; 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
|
689 ;; 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
|
690 ;; 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
|
691 ;; 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
|
692 ;; 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
|
693 ;; 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
|
694 |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
695 (defcustom ps-page-dimensions-database |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
696 (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
|
697 (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
|
698 (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
|
699 (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
|
700 (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
|
701 (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
|
702 (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
|
703 (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
|
704 (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
|
705 (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
|
706 (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
|
707 (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
|
708 "*List associating a symbolic paper type to its width and height. |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
709 see `ps-paper-type'." |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
710 :type '(repeat (list :tag "Paper Type" |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
711 (symbol :tag "Name") |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
712 (number :tag "Width") |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
713 (number :tag "Height"))) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
714 :group 'ps-print) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
715 |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
716 (defcustom ps-paper-type 'letter |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
717 "*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
|
718 Should be one of the paper types defined in `ps-page-dimensions-database', for |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
719 example `letter', `legal' or `a4'." |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
720 :type '(symbol :validate (lambda (wid) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
721 (if (assq (widget-value wid) ps-page-dimensions-database) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
722 nil |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
723 (widget-put wid :error "Unknown paper size") |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
724 wid))) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
725 :group 'ps-print) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
726 |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
727 (defcustom ps-landscape-mode 'nil |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
728 "*Non-nil means print in landscape mode." |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
729 :type 'boolean |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
730 :group 'ps-print) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
731 |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
732 (defcustom ps-number-of-columns (if ps-landscape-mode 2 1) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
733 "*Specifies the number of columns" |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
734 :type 'integer |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
735 :group 'ps-print) |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
736 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
737 ;;; Horizontal layout |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
738 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
739 ;; ------------------------------------------ |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
740 ;; | | | | | | | | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
741 ;; | 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
|
742 ;; | | | | | | | | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
743 ;; ------------------------------------------ |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
744 |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
745 (defcustom ps-left-margin (/ (* 72 2.0) 2.54) ; 2 cm |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
746 "*Left margin in points (1/72 inch)." |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
747 :type 'number |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
748 :group 'ps-print-horizontal) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
749 |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
750 (defcustom ps-right-margin (/ (* 72 2.0) 2.54) ; 2 cm |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
751 "*Right margin in points (1/72 inch)." |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
752 :type 'number |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
753 :group 'ps-print-horizontal) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
754 |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
755 (defcustom ps-inter-column (/ (* 72 2.0) 2.54) ; 2 cm |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
756 "*Horizontal space between columns in points (1/72 inch)." |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
757 :type 'number |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
758 :group 'ps-print-horizontal) |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
759 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
760 ;;; Vertical layout |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
761 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
762 ;; |--------| |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
763 ;; | tm | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
764 ;; |--------| |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
765 ;; | header | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
766 ;; |--------| |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
767 ;; | ho | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
768 ;; |--------| |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
769 ;; | text | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
770 ;; |--------| |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
771 ;; | bm | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
772 ;; |--------| |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
773 |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
774 (defcustom ps-bottom-margin (/ (* 72 1.5) 2.54) ; 1.5 cm |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
775 "*Bottom margin in points (1/72 inch)." |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
776 :type 'number |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
777 :group 'ps-print-vertical) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
778 |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
779 (defcustom ps-top-margin (/ (* 72 1.5) 2.54) ; 1.5 cm |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
780 "*Top margin in points (1/72 inch)." |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
781 :type 'number |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
782 :group 'ps-print-vertical) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
783 |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
784 (defcustom ps-header-offset (/ (* 72 1.0) 2.54) ; 1.0 cm |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
785 "*Vertical space in points (1/72 inch) between the main text and the header." |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
786 :type 'number |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
787 :group 'ps-print-vertical) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
788 |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
789 (defcustom ps-header-line-pad 0.15 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
790 "*Portion of a header title line height to insert between the header frame |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
791 and the text it contains, both in the vertical and horizontal directions." |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
792 :type 'number |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
793 :group 'ps-print-vertical) |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
794 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
795 ;;; Header setup |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
796 |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
797 (defcustom ps-print-header t |
10493 | 798 "*Non-nil means print a header at the top of each page. |
799 By default, the header displays the buffer name, page number, and, if | |
800 the buffer is visiting a file, the file's directory. Headers are | |
16949
18731f7e2c73
(ps-print-header): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
16870
diff
changeset
|
801 customizable by changing variables `ps-left-header' and |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
802 `ps-right-header'." |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
803 :type 'boolean |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
804 :group 'ps-print-header) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
805 |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
806 (defcustom ps-print-header-frame t |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
807 "*Non-nil means draw a gaudy frame around the header." |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
808 :type 'boolean |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
809 :group 'ps-print-header) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
810 |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
811 (defcustom ps-header-lines 2 |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
812 "*Number of lines to display in page header, when generating Postscript." |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
813 :type 'integer |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
814 :group 'ps-print-header) |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
815 (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
|
816 |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
817 (defcustom ps-show-n-of-n t |
10683 | 818 "*Non-nil means show page numbers as N/M, meaning page N of M. |
819 Note: page numbers are displayed as part of headers, see variable | |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
820 `ps-print-headers'." |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
821 :type 'boolean |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
822 :group 'ps-print-header) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
823 |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
824 (defcustom ps-spool-duplex nil ; Not many people have duplex |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
825 ; 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
|
826 "*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
|
827 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
|
828 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
|
829 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
|
830 will be reversed on duplex printers so that the page numbers fall to |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
831 the left on even-numbered pages." |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
832 :type 'boolean |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
833 :group 'ps-print-header) |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
834 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
835 ;;; Fonts |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
836 |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
837 (defcustom ps-font-info-database |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
838 '((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
|
839 "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
|
840 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
|
841 (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
|
842 "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
|
843 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
|
844 (Times |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
845 "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
|
846 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
|
847 (Palatino |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
848 "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
|
849 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
|
850 (Helvetica-Narrow |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
851 "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
|
852 "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
|
853 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
|
854 (NewCenturySchlbk |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
855 "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
|
856 "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
|
857 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
|
858 ;; 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
|
859 (AvantGarde-Book |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
860 "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
|
861 "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
|
862 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
|
863 (AvantGarde-Demi |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
864 "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
|
865 "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
|
866 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
|
867 (Bookman-Demi |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
868 "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
|
869 "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
|
870 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
|
871 (Bookman-Light |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
872 "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
|
873 "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
|
874 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
|
875 ;; 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
|
876 (Symbol |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
877 "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
|
878 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
|
879 (Zapf-Dingbats |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
880 "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
|
881 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
|
882 (Zapf-Chancery-MediumItalic |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
883 "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
|
884 "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
|
885 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
|
886 ) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
887 "*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
|
888 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
|
889 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
|
890 - 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
|
891 - 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
|
892 - 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
|
893 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
|
894 `% 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
|
895 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
|
896 `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
|
897 - add the values to `ps-font-info-database'. |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
898 You can get all the fonts of YOUR printer using `ReportAllFontInfo'." |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
899 :type '(repeat (list :tag "Font Definition" |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
900 (symbol :tag "Font") |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
901 (string :tag "Name") |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
902 (string :tag "Bold") |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
903 (string :tag "Italic") |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
904 (string :tag "Bold-Italic") |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
905 (number :tag "Reference Size") |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
906 (number :tag "Line Height") |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
907 (number :tag "Space Width") |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
908 (number :tag "Average Character Width"))) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
909 :group 'ps-print-font) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
910 |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
911 (defcustom ps-font-family 'Courier |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
912 "Font family name for ordinary text, when generating Postscript." |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
913 :type 'symbol |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
914 :group 'ps-print-font) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
915 |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
916 (defcustom ps-font-size (if ps-landscape-mode 7 8.5) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
917 "Font size, in points, for ordinary text, when generating Postscript." |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
918 :type 'number |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
919 :group 'ps-print-font) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
920 |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
921 (defcustom ps-header-font-family 'Helvetica |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
922 "Font family name for text in the header, when generating Postscript." |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
923 :type 'symbol |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
924 :group 'ps-print-font) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
925 |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
926 (defcustom ps-header-font-size (if ps-landscape-mode 10 12) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
927 "Font size, in points, for text in the header, when generating Postscript." |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
928 :type 'number |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
929 :group 'ps-print-font) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
930 |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
931 (defcustom 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
|
932 "Font size, in points, for the top line of text in the header, |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
933 when generating Postscript." |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
934 :type 'number |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
935 :group 'ps-print-font) |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
936 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
937 ;;; Colors |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
938 |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
939 (defcustom ps-print-color-p (or (fboundp 'x-color-values) ; Emacs |
17440
03d612dba255
(ps-print-color-p): Fix minor error.
Richard M. Stallman <rms@gnu.org>
parents:
17406
diff
changeset
|
940 (fboundp 'pixel-components)) ; XEmacs |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
941 ; xemacs |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
942 ; Printing color requires x-color-values. |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
943 "*If non-nil, print the buffer's text in color." |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
944 :type 'boolean |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
945 :group 'ps-print-color) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
946 |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
947 (defcustom ps-default-fg '(0.0 0.0 0.0) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
948 "*RGB values of the default foreground color. Defaults to black." |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
949 :type '(list (number :tag "Red") (number :tag "Green") (number :tag "Blue")) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
950 :group 'ps-print-color) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
951 |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
952 (defcustom ps-default-bg '(1.0 1.0 1.0) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
953 "*RGB values of the default background color. Defaults to white." |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
954 :type '(list (number :tag "Red") (number :tag "Green") (number :tag "Blue")) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
955 :group 'ps-print-color) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
956 |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
957 (defcustom ps-auto-font-detect t |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
958 "*Non-nil means automatically detect bold/italic face attributes. |
10493 | 959 nil means rely solely on the lists `ps-bold-faces', `ps-italic-faces', |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
960 and `ps-underlined-faces'." |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
961 :type 'boolean |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
962 :group 'ps-print-font) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
963 |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
964 (defcustom ps-bold-faces |
16870
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
965 (unless ps-print-color-p |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
966 '(font-lock-function-name-face |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
967 font-lock-builtin-face |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
968 font-lock-variable-name-face |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
969 font-lock-keyword-face |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
970 font-lock-warning-face)) |
10493 | 971 "*A list of the \(non-bold\) faces that should be printed in bold font. |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
972 This applies to generating Postscript." |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
973 :type '(repeat face) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
974 :group 'ps-print-face) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
975 |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
976 (defcustom ps-italic-faces |
16870
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
977 (unless ps-print-color-p |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
978 '(font-lock-variable-name-face |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
979 font-lock-string-face |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
980 font-lock-comment-face |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
981 font-lock-warning-face)) |
10493 | 982 "*A list of the \(non-italic\) faces that should be printed in italic font. |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
983 This applies to generating Postscript." |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
984 :type '(repeat face) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
985 :group 'ps-print-face) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
986 |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
987 (defcustom ps-underlined-faces |
16870
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
988 (unless ps-print-color-p |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
989 '(font-lock-function-name-face |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
990 font-lock-type-face |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
991 font-lock-reference-face |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
992 font-lock-warning-face)) |
10493 | 993 "*A list of the \(non-underlined\) faces that should be printed underlined. |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
994 This applies to generating Postscript." |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
995 :type '(repeat face) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
996 :group 'ps-print-face) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
997 |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
998 (defcustom ps-left-header |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
999 (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
|
1000 "*The items to display (each on a line) on the left part of the page header. |
10493 | 1001 This applies to generating Postscript. |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1002 |
10493 | 1003 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
|
1004 entry in the PostScript array HeaderLinesLeft. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1005 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1006 Strings are inserted unchanged into the array; those representing |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1007 PostScript string literals should be delimited with PostScript string |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1008 delimiters '(' and ')'. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1009 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1010 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
|
1011 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
|
1012 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
|
1013 In either case, function or variable, the string value has PostScript |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1014 string delimiters added to it." |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1015 :type '(repeat (choice string symbol)) |
17681 | 1016 :group 'ps-print-header) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1017 (make-variable-buffer-local 'ps-left-header) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1018 |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1019 (defcustom ps-right-header |
16870
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
1020 (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
|
1021 "*The items to display (each on a line) on the right part of the page header. |
10493 | 1022 This applies to generating Postscript. |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1023 |
10493 | 1024 See the variable `ps-left-header' for a description of the format of |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1025 this variable." |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1026 :type '(repeat (choice string symbol)) |
17681 | 1027 :group 'ps-print-header) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1028 (make-variable-buffer-local 'ps-right-header) |
7257 | 1029 |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1030 (defcustom ps-razzle-dazzle t |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1031 "*Non-nil means report progress while formatting buffer." |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1032 :type 'boolean |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1033 :group 'ps-print) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1034 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1035 (defvar ps-adobe-tag "%!PS-Adobe-1.0\n" |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1036 "*Contains the header line identifying the output as PostScript. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1037 By default, `ps-adobe-tag' contains the standard identifier. Some |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1038 printers require slightly different versions of this line.") |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1039 |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1040 (defcustom ps-build-face-reference t |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1041 "*Non-nil means build the reference face lists. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1042 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1043 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
|
1044 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
|
1045 can force ps-print to rebuild the lists the next time you invoke one |
10493 | 1046 of the ...-with-faces commands. |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1047 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1048 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
|
1049 any face, or create new faces. Most users shouldn't have to worry |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1050 about its setting, though." |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1051 :type 'boolean |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1052 :group 'ps-print-face) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1053 |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1054 (defcustom ps-always-build-face-reference nil |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1055 "*Non-nil means always rebuild the reference face lists. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1056 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1057 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
|
1058 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
|
1059 -with-faces commands is called. Most users shouldn't need to set this |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1060 variable." |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1061 :type 'boolean |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1062 :group 'ps-print-face) |
7257 | 1063 |
1064 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1065 ;; User commands |
7257 | 1066 |
10683 | 1067 ;;;###autoload |
7257 | 1068 (defun ps-print-buffer (&optional filename) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1069 "Generate and print a PostScript image of the buffer. |
7257 | 1070 |
10493 | 1071 When called with a numeric prefix argument (C-u), prompts the user for |
7257 | 1072 the name of a file to save the PostScript image in, instead of sending |
1073 it to the printer. | |
1074 | |
1075 More specifically, the FILENAME argument is treated as follows: if it | |
1076 is nil, send the image to the printer. If FILENAME is a string, save | |
1077 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
|
1078 number, prompt the user for the name of the file to save in." |
7257 | 1079 |
10683 | 1080 (interactive (list (ps-print-preprint current-prefix-arg))) |
7257 | 1081 (ps-generate (current-buffer) (point-min) (point-max) |
1082 'ps-generate-postscript) | |
1083 (ps-do-despool filename)) | |
1084 | |
1085 | |
10683 | 1086 ;;;###autoload |
7257 | 1087 (defun ps-print-buffer-with-faces (&optional filename) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1088 "Generate and print a PostScript image of the buffer. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1089 Like `ps-print-buffer', but includes font, color, and underline |
13807 | 1090 information in the generated image. This command works only if you |
1091 are using a window system, so it has a way to determine color values." | |
10683 | 1092 (interactive (list (ps-print-preprint current-prefix-arg))) |
7257 | 1093 (ps-generate (current-buffer) (point-min) (point-max) |
1094 'ps-generate-postscript-with-faces) | |
1095 (ps-do-despool filename)) | |
1096 | |
1097 | |
10683 | 1098 ;;;###autoload |
7257 | 1099 (defun ps-print-region (from to &optional filename) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1100 "Generate and print a PostScript image of the region. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1101 Like `ps-print-buffer', but prints just the current region." |
7257 | 1102 |
10683 | 1103 (interactive (list (point) (mark) (ps-print-preprint current-prefix-arg))) |
7257 | 1104 (ps-generate (current-buffer) from to |
1105 'ps-generate-postscript) | |
1106 (ps-do-despool filename)) | |
1107 | |
1108 | |
10683 | 1109 ;;;###autoload |
7257 | 1110 (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
|
1111 "Generate and print a PostScript image of the region. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1112 Like `ps-print-region', but includes font, color, and underline |
13807 | 1113 information in the generated image. This command works only if you |
1114 are using a window system, so it has a way to determine color values." | |
7257 | 1115 |
10683 | 1116 (interactive (list (point) (mark) (ps-print-preprint current-prefix-arg))) |
7257 | 1117 (ps-generate (current-buffer) from to |
1118 'ps-generate-postscript-with-faces) | |
1119 (ps-do-despool filename)) | |
1120 | |
1121 | |
10683 | 1122 ;;;###autoload |
7257 | 1123 (defun ps-spool-buffer () |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1124 "Generate and spool a PostScript image of the buffer. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1125 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
|
1126 local buffer to be sent to the printer later. |
7257 | 1127 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1128 Use the command `ps-despool' to send the spooled images to the printer." |
7257 | 1129 (interactive) |
1130 (ps-generate (current-buffer) (point-min) (point-max) | |
1131 'ps-generate-postscript)) | |
1132 | |
1133 | |
10683 | 1134 ;;;###autoload |
7257 | 1135 (defun ps-spool-buffer-with-faces () |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1136 "Generate and spool a PostScript image of the buffer. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1137 Like `ps-spool-buffer', but includes font, color, and underline |
13807 | 1138 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
|
1139 are using a window system, so it has a way to determine color values. |
7257 | 1140 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1141 Use the command `ps-despool' to send the spooled images to the printer." |
7257 | 1142 |
1143 (interactive) | |
1144 (ps-generate (current-buffer) (point-min) (point-max) | |
1145 'ps-generate-postscript-with-faces)) | |
1146 | |
1147 | |
10683 | 1148 ;;;###autoload |
7257 | 1149 (defun ps-spool-region (from to) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1150 "Generate a PostScript image of the region and spool locally. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1151 Like `ps-spool-buffer', but spools just the current region. |
7257 | 1152 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1153 Use the command `ps-despool' to send the spooled images to the printer." |
7257 | 1154 (interactive "r") |
1155 (ps-generate (current-buffer) from to | |
1156 'ps-generate-postscript)) | |
1157 | |
1158 | |
10683 | 1159 ;;;###autoload |
7257 | 1160 (defun ps-spool-region-with-faces (from to) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1161 "Generate a PostScript image of the region and spool locally. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1162 Like `ps-spool-region', but includes font, color, and underline |
13807 | 1163 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
|
1164 are using a window system, so it has a way to determine color values. |
7257 | 1165 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1166 Use the command `ps-despool' to send the spooled images to the printer." |
7257 | 1167 (interactive "r") |
1168 (ps-generate (current-buffer) from to | |
1169 'ps-generate-postscript-with-faces)) | |
1170 | |
10683 | 1171 ;;;###autoload |
7257 | 1172 (defun ps-despool (&optional filename) |
1173 "Send the spooled PostScript to the printer. | |
1174 | |
1175 When called with a numeric prefix argument (C-u), prompt the user for | |
1176 the name of a file to save the spooled PostScript in, instead of sending | |
1177 it to the printer. | |
1178 | |
1179 More specifically, the FILENAME argument is treated as follows: if it | |
1180 is nil, send the image to the printer. If FILENAME is a string, save | |
1181 the PostScript image in a file with that name. If FILENAME is a | |
1182 number, prompt the user for the name of the file to save in." | |
10683 | 1183 (interactive (list (ps-print-preprint current-prefix-arg))) |
1184 (ps-do-despool filename)) | |
7257 | 1185 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1186 ;;;###autoload |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1187 (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
|
1188 "*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
|
1189 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
|
1190 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
|
1191 (interactive) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1192 (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
|
1193 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1194 ;;;###autoload |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1195 (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
|
1196 "*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
|
1197 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
|
1198 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
|
1199 (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
|
1200 (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
|
1201 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1202 ;;;###autoload |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1203 (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
|
1204 "*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
|
1205 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
|
1206 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
|
1207 (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
|
1208 (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
|
1209 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1210 ;;;###autoload |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1211 (defun ps-setup () |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1212 "*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
|
1213 (format " |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1214 (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
|
1215 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
|
1216 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
|
1217 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1218 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
|
1219 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
|
1220 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
|
1221 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1222 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
|
1223 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
|
1224 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
|
1225 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
|
1226 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
|
1227 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
|
1228 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
|
1229 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
|
1230 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
|
1231 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
|
1232 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
|
1233 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
|
1234 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1235 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
|
1236 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
|
1237 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
|
1238 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
|
1239 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
|
1240 " |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1241 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
|
1242 ps-lpr-command |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1243 ps-lpr-switches |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1244 ps-paper-type |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1245 ps-landscape-mode |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1246 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
|
1247 ps-left-margin |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1248 ps-right-margin |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1249 ps-inter-column |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1250 ps-bottom-margin |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1251 ps-top-margin |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1252 ps-header-offset |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1253 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
|
1254 ps-print-header |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1255 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
|
1256 ps-header-lines |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1257 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
|
1258 ps-spool-duplex |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1259 ps-font-family |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1260 ps-font-size |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1261 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
|
1262 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
|
1263 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
|
1264 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1265 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1266 ;; Utility functions and variables: |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1267 |
12769
4a905565cfa6
(ps-print-emacs-type): Renamed from emacs-type.
Richard M. Stallman <rms@gnu.org>
parents:
12768
diff
changeset
|
1268 (defvar ps-print-emacs-type |
4a905565cfa6
(ps-print-emacs-type): Renamed from emacs-type.
Richard M. Stallman <rms@gnu.org>
parents:
12768
diff
changeset
|
1269 (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
|
1270 ((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
|
1271 ((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
|
1272 (t 'emacs))) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1273 |
12769
4a905565cfa6
(ps-print-emacs-type): Renamed from emacs-type.
Richard M. Stallman <rms@gnu.org>
parents:
12768
diff
changeset
|
1274 (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
|
1275 (eq ps-print-emacs-type 'xemacs)) |
11799
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
1276 (if (< emacs-minor-version 12) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
1277 (setq ps-print-color-p nil)) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1278 (require 'faces)) ; face-font, face-underline-p, |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1279 ; x-font-regexp |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1280 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1281 (require 'time-stamp) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1282 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1283 (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
|
1284 "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
|
1285 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1286 (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
|
1287 "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
|
1288 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1289 (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
|
1290 "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
|
1291 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1292 (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
|
1293 "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
|
1294 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1295 (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
|
1296 "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
|
1297 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
|
1298 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
|
1299 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
|
1300 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1301 (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
|
1302 "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
|
1303 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
|
1304 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1305 (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
|
1306 "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
|
1307 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
|
1308 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
|
1309 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
|
1310 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
|
1311 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1312 (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
|
1313 "% 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
|
1314 /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
|
1315 % -- 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
|
1316 % -- 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
|
1317 % -- except for minus instead of hyphen at code 055. |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1318 /ISOLatin1Encoding |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1319 StandardEncoding 0 45 getinterval aload pop |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1320 /minus |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1321 StandardEncoding 46 82 getinterval aload pop |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1322 %*** NOTE: the following are missing in the Adobe documentation, |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1323 %*** but appear in the displayed table: |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1324 %*** 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
|
1325 % 0200 (128) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1326 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1327 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1328 /dotlessi /grave /acute /circumflex /tilde /macron /breve /dotaccent |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1329 /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
|
1330 % 0240 (160) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1331 /space /exclamdown /cent /sterling |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1332 /currency /yen /brokenbar /section |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1333 /dieresis /copyright /ordfeminine /guillemotleft |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1334 /logicalnot /hyphen /registered /macron |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1335 /degree /plusminus /twosuperior /threesuperior |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1336 /acute /mu /paragraph /periodcentered |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1337 /cedilla /onesuperior /ordmasculine /guillemotright |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1338 /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
|
1339 % 0300 (192) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1340 /Agrave /Aacute /Acircumflex /Atilde |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1341 /Adieresis /Aring /AE /Ccedilla |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1342 /Egrave /Eacute /Ecircumflex /Edieresis |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1343 /Igrave /Iacute /Icircumflex /Idieresis |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1344 /Eth /Ntilde /Ograve /Oacute |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1345 /Ocircumflex /Otilde /Odieresis /multiply |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1346 /Oslash /Ugrave /Uacute /Ucircumflex |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1347 /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
|
1348 % 0340 (224) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1349 /agrave /aacute /acircumflex /atilde |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1350 /adieresis /aring /ae /ccedilla |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1351 /egrave /eacute /ecircumflex /edieresis |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1352 /igrave /iacute /icircumflex /idieresis |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1353 /eth /ntilde /ograve /oacute |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1354 /ocircumflex /otilde /odieresis /divide |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1355 /oslash /ugrave /uacute /ucircumflex |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1356 /udieresis /yacute /thorn /ydieresis |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1357 256 packedarray def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1358 } ifelse |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1359 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1360 /reencodeFontISO { %def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1361 dup |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1362 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
|
1363 % 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
|
1364 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1365 begin % Make the new font the current dictionary. |
10492
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 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1368 { 1 index /FID ne |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1369 { 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
|
1370 } 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
|
1371 % to the new one except for the font ID. |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1372 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1373 /Encoding ISOLatin1Encoding def % Override the encoding with |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1374 % the ISOLatin1 encoding. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1375 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1376 % 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
|
1377 % 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
|
1378 % 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
|
1379 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1380 % ^ (x2 y2) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1381 % | | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1382 % | v |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1383 % | +----+ - - |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1384 % | | | ^ |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1385 % | | | | Ascent (usually > 0) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1386 % | | | | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1387 % (0 0) -> +--+----+--------> |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1388 % | | | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1389 % | | 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
|
1390 % (x1 y1) --> +----+ - - |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1391 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1392 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
|
1393 FontMatrix transform /Ascent exch def pop |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1394 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
|
1395 /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
|
1396 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1397 % 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
|
1398 % (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
|
1399 /UnderlinePosition 1 def |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1400 /UnderlineThickness 1 def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1401 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1402 % Get the underline position and thickness if they're defined. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1403 currentdict /FontInfo known { |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1404 FontInfo |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1405 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1406 dup /UnderlinePosition known { |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1407 dup /UnderlinePosition get |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1408 0 exch FontMatrix transform exch pop |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1409 /UnderlinePosition exch def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1410 } if |
7257 | 1411 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1412 dup /UnderlineThickness known { |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1413 /UnderlineThickness get |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1414 0 exch FontMatrix transform exch pop |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1415 /UnderlineThickness exch def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1416 } if |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1417 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1418 } if |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1419 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1420 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
|
1421 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
|
1422 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
|
1423 pop % Discard the returned font. |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1424 } bind def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1425 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1426 /DefFont { % Font definition |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1427 findfont exch scalefont reencodeFontISO |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1428 } def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1429 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1430 /F { % Font selection |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1431 findfont |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1432 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
|
1433 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
|
1434 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
|
1435 dup /UnderlinePosition get /UnderlinePosition exch def |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1436 dup /UnderlineThickness get /UnderlineThickness exch def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1437 setfont |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1438 } def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1439 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1440 /FG /setrgbcolor load def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1441 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1442 /bg false def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1443 /BG { |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1444 dup /bg exch def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1445 { mark 4 1 roll ] /bgcolor exch def } 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 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1448 % B width C |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1449 % +-----------+ |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1450 % | Ascent (usually > 0) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1451 % A + + |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1452 % | Descent (usually < 0) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1453 % +-----------+ |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1454 % E width D |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1455 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1456 /dobackground { % width -- |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1457 currentpoint % -- width x y |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1458 gsave |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1459 newpath |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1460 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
|
1461 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
|
1462 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
|
1463 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
|
1464 neg 0 rlineto % E |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1465 closepath |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1466 bgcolor aload pop setrgbcolor |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1467 fill |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1468 grestore |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1469 } def |
7257 | 1470 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1471 /dobackgroundstring { % string -- |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1472 stringwidth pop |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1473 dobackground |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1474 } def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1475 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1476 /dounderline { % fromx fromy -- |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1477 currentpoint |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1478 gsave |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1479 UnderlineThickness setlinewidth |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1480 4 2 roll |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1481 UnderlinePosition add moveto |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1482 UnderlinePosition add lineto |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1483 stroke |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1484 grestore |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1485 } def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1486 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1487 /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
|
1488 PrintWidth % -- x-eol |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1489 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
|
1490 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
|
1491 dobackground |
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 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1494 /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
|
1495 PrintWidth % -- x-eol |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1496 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
|
1497 dounderline |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1498 } def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1499 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1500 /SL { % Soft Linefeed |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1501 bg { eolbg } if |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1502 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
|
1503 0 currentpoint exch pop LineHeight sub moveto |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1504 } def |
7257 | 1505 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1506 /HL /SL load def % Hard Linefeed |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1507 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1508 /sp1 { currentpoint 3 -1 roll } def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1509 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1510 % Some debug |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1511 /dcp { currentpoint exch 40 string cvs print (, ) print = } def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1512 /dp { print 2 copy |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1513 exch 40 string cvs print (, ) print = } def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1514 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1515 /S { |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1516 bg { dup dobackgroundstring } if |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1517 ul { sp1 } if |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1518 show |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1519 ul { dounderline } if |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1520 } def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1521 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1522 /W { |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1523 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
|
1524 ( ) 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
|
1525 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
|
1526 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
|
1527 % by the number of spaces to plot |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1528 bg { dup dobackground } if |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1529 0 rmoveto |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1530 ul { dounderline } if |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1531 } def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1532 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1533 /BeginDoc { |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1534 % ---- 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
|
1535 /docState save def |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1536 % ---- [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
|
1537 /JackGhostscript where { |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1538 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
|
1539 } if |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1540 LandscapeMode { |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1541 % ---- 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
|
1542 LandscapePageHeight 0 translate |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1543 90 rotate |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1544 } if |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1545 /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
|
1546 % ---- 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
|
1547 LeftMargin BottomMargin translate |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1548 % ---- 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
|
1549 /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
|
1550 /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
|
1551 /ColumnIndex 1 def |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1552 } def |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1553 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1554 /EndDoc { |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1555 % ---- 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
|
1556 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
|
1557 % ---- 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
|
1558 docState restore |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1559 } def |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1560 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1561 /BeginDSCPage { |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1562 % ---- 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
|
1563 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
|
1564 % ---- 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
|
1565 /columnState save def |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1566 } def |
7257 | 1567 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1568 /BeginPage { |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1569 PrintHeader { |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1570 PrintHeaderFrame { HeaderFrame } if |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1571 HeaderText |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1572 } if |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1573 0 PrintStartY moveto % move to where printing will start |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1574 } def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1575 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1576 /EndPage { |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1577 bg { eolbg } if |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1578 ul { eolul } if |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1579 } def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1580 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1581 /EndDSCPage { |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1582 ColumnIndex NumberOfColumns eq { |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1583 % ---- 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
|
1584 showpage |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1585 % ---- 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
|
1586 pageState restore |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1587 /ColumnIndex 1 def |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1588 } { % else |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1589 % ---- 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
|
1590 columnState restore |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1591 % ---- 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
|
1592 ColumnWidth 0 translate |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1593 /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
|
1594 } ifelse |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1595 } def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1596 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1597 /ul false def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1598 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1599 /UL { /ul exch def } def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1600 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1601 /SetHeaderLines { % nb-lines -- |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1602 /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
|
1603 % ---- bottom up |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1604 HeaderPad |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1605 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
|
1606 HeaderTitleLineHeight add |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1607 HeaderPad add |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1608 /HeaderHeight exch def |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1609 } def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1610 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1611 % |---------| |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1612 % | tm | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1613 % |---------| |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1614 % | header | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1615 % |-+-------| <-- (x y) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1616 % | ho | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1617 % |---------| |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1618 % | text | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1619 % |-+-------| <-- (0 0) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1620 % | bm | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1621 % |---------| |
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 /HeaderFrameStart { % -- x y |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1624 0 PrintHeight HeaderOffset add |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1625 } def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1626 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1627 /HeaderFramePath { |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1628 PrintWidth 0 rlineto |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1629 0 HeaderHeight rlineto |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1630 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
|
1631 0 HeaderHeight neg rlineto |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1632 } def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1633 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1634 /HeaderFrame { |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1635 gsave |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1636 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
|
1637 % ---- 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
|
1638 HeaderFrameStart moveto |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1639 1 -1 rmoveto |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1640 HeaderFramePath |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1641 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
|
1642 % ---- do the next rectangle ... |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1643 HeaderFrameStart moveto |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1644 HeaderFramePath |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1645 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
|
1646 gsave 0 setgray stroke grestore % drawn with black |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1647 grestore |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1648 } def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1649 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1650 /HeaderStart { |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1651 HeaderFrameStart |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1652 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
|
1653 % ---- bottom up |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1654 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
|
1655 HeaderDescent sub |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1656 HeaderLineHeight HeaderLines 1 sub mul add |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1657 } def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1658 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1659 /strcat { |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1660 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
|
1661 0 5 -1 roll putinterval |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1662 dup 4 2 roll exch putinterval |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1663 } def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1664 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1665 /pagenumberstring { |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1666 PageNumber 32 string cvs |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1667 ShowNofN { |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1668 (/) strcat |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1669 PageCount 32 string cvs strcat |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1670 } if |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1671 } def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1672 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1673 /HeaderText { |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1674 HeaderStart moveto |
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 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
|
1677 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1678 % ---- 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
|
1679 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1680 % ---- 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
|
1681 Duplex PageNumber 1 and 0 eq and { exch } if |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1682 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1683 { % ---- process the left lines |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1684 aload pop |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1685 exch F |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1686 gsave |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1687 dup xcheck { exec } if |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1688 show |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1689 grestore |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1690 0 HeaderLineHeight neg rmoveto |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1691 } forall |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1692 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1693 HeaderStart moveto |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1694 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1695 { % ---- process the right lines |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1696 aload pop |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1697 exch F |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1698 gsave |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1699 dup xcheck { exec } if |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1700 dup stringwidth pop |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1701 PrintWidth exch sub HeaderPad 2 mul sub 0 rmoveto |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1702 show |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1703 grestore |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1704 0 HeaderLineHeight neg rmoveto |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1705 } forall |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1706 } def |
7257 | 1707 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1708 /ReportFontInfo { |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1709 2 copy |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1710 /t0 3 1 roll DefFont |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1711 /t0 F |
10683 | 1712 /lh FontHeight def |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1713 /sw ( ) stringwidth pop def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1714 /aw (01234567890abcdefghijklmnopqrstuvwxyz) dup length exch |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1715 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
|
1716 /t1 12 /Helvetica-Oblique DefFont |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1717 /t1 F |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1718 gsave |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1719 (For ) show |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1720 128 string cvs show |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1721 ( ) show |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1722 32 string cvs show |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1723 ( point, the line height is ) show |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1724 lh 32 string cvs show |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1725 (, the space width is ) show |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1726 sw 32 string cvs show |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1727 (,) show |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1728 grestore |
10683 | 1729 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
|
1730 gsave |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1731 (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
|
1732 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
|
1733 (.) show |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1734 grestore |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1735 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
|
1736 } def |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1737 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1738 /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
|
1739 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
|
1740 } def |
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 /ReportAllFontInfo { |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1743 FontDirectory |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1744 { % 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
|
1745 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
|
1746 } forall |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1747 } def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1748 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1749 % 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
|
1750 % 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
|
1751 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1752 ") |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1753 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1754 (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
|
1755 " |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1756 % ---- 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
|
1757 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1758 /h0 F |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1759 /HeaderTitleLineHeight FontHeight def |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1760 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1761 /h1 F |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1762 /HeaderLineHeight FontHeight def |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1763 /HeaderDescent Descent def |
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 % ---- ...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
|
1766 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1767 ") |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1768 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1769 ;; Start Editing Here: |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1770 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1771 (defvar ps-source-buffer nil) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1772 (defvar ps-spool-buffer-name "*PostScript*") |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1773 (defvar ps-spool-buffer nil) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1774 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1775 (defvar ps-output-head nil) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1776 (defvar ps-output-tail nil) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1777 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1778 (defvar ps-page-count 0) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1779 (defvar ps-showpage-count 0) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1780 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1781 (defvar ps-current-font 0) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1782 (defvar ps-current-underline-p nil) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1783 (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
|
1784 (defvar ps-current-color ps-default-color) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1785 (defvar ps-current-bg nil) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1786 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1787 (defvar ps-razchunk 0) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1788 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1789 (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
|
1790 (if (eq ps-print-emacs-type 'emacs) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1791 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1792 ;;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
|
1793 ;;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
|
1794 ;;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
|
1795 ;;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
|
1796 "%0.3f %0.3f %0.3f" |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1797 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1798 ;; 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
|
1799 ;; %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
|
1800 "%s %s %s")) |
7257 | 1801 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1802 ;; 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
|
1803 ;; 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
|
1804 ;; it'll do for now. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1805 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1806 (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
|
1807 (defvar ps-header-title-font) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1808 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1809 (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
|
1810 (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
|
1811 (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
|
1812 "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
|
1813 and the text it contains.") |
7257 | 1814 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1815 ;; Define accessors to the dimensions list. |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1816 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1817 (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
|
1818 (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
|
1819 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1820 (defvar ps-landscape-page-height) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1821 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1822 (defvar ps-print-width nil) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1823 (defvar ps-print-height nil) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1824 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1825 (defvar ps-height-remaining) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1826 (defvar ps-width-remaining) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1827 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1828 (defvar ps-ref-bold-faces nil) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1829 (defvar ps-ref-italic-faces nil) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1830 (defvar ps-ref-underlined-faces nil) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1831 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1832 (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
|
1833 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1834 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1835 ;; Internal functions |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1836 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1837 (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
|
1838 "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
|
1839 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
|
1840 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
|
1841 (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
|
1842 (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
|
1843 (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
|
1844 (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
|
1845 ps-print-width)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1846 (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
|
1847 (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
|
1848 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
|
1849 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
|
1850 (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
|
1851 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
|
1852 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
|
1853 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
|
1854 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
|
1855 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
|
1856 ) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1857 (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
|
1858 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
|
1859 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
|
1860 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
|
1861 (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
|
1862 (set-buffer buf) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1863 (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
|
1864 (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
|
1865 (insert ps-setup) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1866 (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
|
1867 (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
|
1868 (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
|
1869 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
|
1870 (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
|
1871 (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
|
1872 (insert "\n") |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1873 (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
|
1874 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1875 (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
|
1876 "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
|
1877 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
|
1878 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
|
1879 (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
|
1880 (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
|
1881 (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
|
1882 (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
|
1883 ps-print-height)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1884 (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
|
1885 (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
|
1886 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
|
1887 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
|
1888 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
|
1889 (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
|
1890 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
|
1891 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
|
1892 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
|
1893 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
|
1894 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
|
1895 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
|
1896 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
|
1897 ) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1898 (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
|
1899 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
|
1900 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
|
1901 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
|
1902 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
|
1903 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
|
1904 (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
|
1905 (set-buffer buf) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1906 (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
|
1907 (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
|
1908 (insert ps-setup) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1909 (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
|
1910 (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
|
1911 (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
|
1912 (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
|
1913 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
|
1914 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
|
1915 (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
|
1916 (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
|
1917 (insert "\n") |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1918 (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
|
1919 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1920 (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
|
1921 "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
|
1922 (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
|
1923 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
|
1924 (if (null assoc) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1925 (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
|
1926 ps-font-family |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1927 (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
|
1928 (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
|
1929 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
|
1930 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
|
1931 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
|
1932 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
|
1933 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
|
1934 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
|
1935 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
|
1936 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
|
1937 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1938 (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
|
1939 (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
|
1940 (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
|
1941 (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
|
1942 ;; 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
|
1943 (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
|
1944 (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
|
1945 (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
|
1946 ps-font-family)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1947 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1948 (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
|
1949 "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
|
1950 (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
|
1951 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
|
1952 (if (null assoc) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1953 (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
|
1954 ps-font-family |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1955 (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
|
1956 (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
|
1957 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
|
1958 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
|
1959 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
|
1960 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
|
1961 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
|
1962 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
|
1963 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
|
1964 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
|
1965 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1966 ;; Font name |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1967 (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
|
1968 (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
|
1969 ;; 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
|
1970 (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
|
1971 (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
|
1972 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
|
1973 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1974 (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
|
1975 (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
|
1976 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
|
1977 (cond |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1978 ((null page-dimensions) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1979 (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
|
1980 (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
|
1981 ((< 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
|
1982 (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
|
1983 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1984 (ps-select-font) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1985 (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
|
1986 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1987 (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
|
1988 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
|
1989 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1990 ;; Landscape mode |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1991 (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
|
1992 ;; 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
|
1993 (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
|
1994 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1995 ;; 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
|
1996 (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
|
1997 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1998 ;; | 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
|
1999 ;; 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
|
2000 ;; => 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
|
2001 (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
|
2002 (/ (- page-width |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2003 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
|
2004 (* (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
|
2005 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
|
2006 (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
|
2007 (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
|
2008 page-width == %s |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2009 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
|
2010 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
|
2011 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
|
2012 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
|
2013 | 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
|
2014 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
|
2015 => print-width == %d !" |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2016 page-width |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2017 ps-left-margin |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2018 ps-right-margin |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2019 ps-inter-column |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2020 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
|
2021 ps-print-width)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2022 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2023 (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
|
2024 (- 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
|
2025 (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
|
2026 (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
|
2027 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
|
2028 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
|
2029 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
|
2030 => print-height == %d !" |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2031 ps-top-margin |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2032 ps-bottom-margin |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2033 ps-print-height)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2034 ;; 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
|
2035 ;; the print height. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2036 (cond |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2037 (ps-print-header |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2038 (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
|
2039 (* 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
|
2040 (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
|
2041 (- ps-print-height |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2042 ps-header-offset |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2043 ps-header-pad |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2044 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
|
2045 (* 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
|
2046 ps-header-pad)))) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2047 (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
|
2048 (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
|
2049 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
|
2050 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
|
2051 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
|
2052 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
|
2053 header-height == %s |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2054 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
|
2055 => print-height == %d !" |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2056 ps-top-margin |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2057 ps-bottom-margin |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2058 ps-header-offset |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2059 ps-header-pad |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2060 (+ ps-header-pad |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2061 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
|
2062 (* 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
|
2063 ps-header-pad) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2064 ps-print-height)))) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2065 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2066 (defun ps-print-preprint (&optional filename) |
7257 | 2067 (if (and filename |
2068 (or (numberp filename) | |
2069 (listp filename))) | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2070 (let* ((name (concat (buffer-name) ".ps")) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2071 (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
|
2072 name)) |
df250bc97b46
(ps-print-preprint): Special handling if
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
2073 (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
|
2074 (if (file-directory-p res) |
df250bc97b46
(ps-print-preprint): Special handling if
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
2075 (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
|
2076 res)))) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2077 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2078 ;; The following functions implement a simple list-buffering scheme so |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2079 ;; 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
|
2080 ;; 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
|
2081 ;; 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
|
2082 ;; insert its contents into the spool buffer (*PostScript*). |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2083 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2084 (defun ps-output-string-prim (string) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2085 (insert "(") ;insert start-string delimiter |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2086 (save-excursion ;insert string |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2087 (insert string)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2088 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2089 ;; Find and quote special characters as necessary for PS |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2090 (while (re-search-forward "[()\\]" nil t) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2091 (save-excursion |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2092 (forward-char -1) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2093 (insert "\\"))) |
7257 | 2094 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2095 (goto-char (point-max)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2096 (insert ")")) ;insert end-string delimiter |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2097 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2098 (defun ps-init-output-queue () |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2099 (setq ps-output-head (list "")) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2100 (setq ps-output-tail ps-output-head)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2101 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2102 (defun ps-output (&rest args) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2103 (setcdr ps-output-tail args) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2104 (while (cdr ps-output-tail) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2105 (setq ps-output-tail (cdr ps-output-tail)))) |
7257 | 2106 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2107 (defun ps-output-string (string) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2108 (ps-output t string)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2109 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2110 (defun ps-flush-output () |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2111 (save-excursion |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2112 (set-buffer ps-spool-buffer) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2113 (goto-char (point-max)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2114 (while ps-output-head |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2115 (let ((it (car ps-output-head))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2116 (if (not (eq t it)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2117 (insert it) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2118 (setq ps-output-head (cdr ps-output-head)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2119 (ps-output-string-prim (car ps-output-head)))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2120 (setq ps-output-head (cdr ps-output-head)))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2121 (ps-init-output-queue)) |
7257 | 2122 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2123 (defun ps-insert-file (fname) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2124 (ps-flush-output) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2125 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2126 ;; 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
|
2127 ;; and error. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2128 (if (not (file-readable-p fname)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2129 (error "Could not read file `%s'" fname)) |
7257 | 2130 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2131 (save-excursion |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2132 (set-buffer ps-spool-buffer) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2133 (goto-char (point-max)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2134 (insert-file fname))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2135 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2136 ;; 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
|
2137 ;; headers. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2138 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2139 (defun ps-generate-header-line (fonttag &optional content) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2140 (ps-output " [ " fonttag " ") |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2141 (cond |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2142 ;; Literal strings should be output as is -- the string must |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2143 ;; contain its own PS string delimiters, '(' and ')', if necessary. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2144 ((stringp content) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2145 (ps-output content)) |
7257 | 2146 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2147 ;; Functions are called -- they should return strings; they will be |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2148 ;; inserted as strings and the PS string delimiters added. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2149 ((and (symbolp content) (fboundp content)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2150 (ps-output-string (funcall content))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2151 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2152 ;; Variables will have their contents inserted. They should |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2153 ;; contain strings, and will be inserted as strings. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2154 ((and (symbolp content) (boundp content)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2155 (ps-output-string (symbol-value content))) |
7257 | 2156 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2157 ;; Anything else will get turned into an empty string. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2158 (t |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2159 (ps-output-string ""))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2160 (ps-output " ]\n")) |
7257 | 2161 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2162 (defun ps-generate-header (name contents) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2163 (ps-output "/" name " [\n") |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2164 (if (> ps-header-lines 0) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2165 (let ((count 1)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2166 (ps-generate-header-line "/h0" (car contents)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2167 (while (and (< count ps-header-lines) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2168 (setq contents (cdr contents))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2169 (ps-generate-header-line "/h1" (car contents)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2170 (setq count (+ count 1))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2171 (ps-output "] def\n")))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2172 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2173 (defun ps-output-boolean (name bool) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2174 (ps-output (format "/%s %s def\n" name (if bool "true" "false")))) |
7257 | 2175 |
2176 (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
|
2177 (ps-get-page-dimensions) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2178 (setq ps-showpage-count 0) |
7257 | 2179 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2180 (ps-output ps-adobe-tag) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2181 (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
|
2182 ;first buffer printed |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2183 (ps-output "%%Creator: " (user-full-name) "\n") |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2184 (ps-output "%%CreationDate: " |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2185 (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
|
2186 (ps-output "%% DocumentFonts: " |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2187 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
|
2188 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
|
2189 ps-header-font " " ps-header-title-font "\n") |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2190 (ps-output "%%Pages: (atend)\n") |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2191 (ps-output "%%EndComments\n\n") |
7257 | 2192 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2193 (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
|
2194 (ps-output (format "/NumberOfColumns %d def\n" ps-number-of-columns)) |
7257 | 2195 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2196 (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
|
2197 (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
|
2198 (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
|
2199 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2200 (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
|
2201 (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
|
2202 (ps-output (format "/InterColumn %s def\n" ps-inter-column)) |
7257 | 2203 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2204 (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
|
2205 (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
|
2206 (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
|
2207 (ps-output (format "/HeaderPad %s def\n" ps-header-pad)) |
10683 | 2208 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2209 (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
|
2210 (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
|
2211 (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
|
2212 (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
|
2213 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2214 (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
|
2215 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2216 (ps-output ps-print-prologue-1) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2217 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2218 ;; Header fonts |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2219 (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
|
2220 (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
|
2221 (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
|
2222 (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
|
2223 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2224 (ps-output ps-print-prologue-2) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2225 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2226 ;; Text fonts |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2227 (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
|
2228 (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
|
2229 (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
|
2230 (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
|
2231 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2232 (ps-output "\nBeginDoc\n\n") |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2233 (ps-output "%%EndPrologue\n")) |
7257 | 2234 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2235 (defun ps-header-dirpart () |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2236 (let ((fname (buffer-file-name))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2237 (if fname |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2238 (if (string-equal (buffer-name) (file-name-nondirectory fname)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2239 (file-name-directory fname) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2240 fname) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2241 ""))) |
7257 | 2242 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2243 (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
|
2244 (cond |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2245 ;; 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
|
2246 ((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
|
2247 "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
|
2248 ;; 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
|
2249 ((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
|
2250 "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
|
2251 (t (buffer-name)))) |
7257 | 2252 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2253 (defun ps-begin-job () |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2254 (setq ps-page-count 0)) |
7257 | 2255 |
2256 (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
|
2257 (ps-output "\nEndDoc\n\n") |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2258 (ps-output "%%Trailer\n") |
16870
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
2259 (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
|
2260 ps-number-of-columns))))) |
7257 | 2261 |
2262 (defun ps-next-page () | |
2263 (ps-end-page) | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2264 (ps-flush-output) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2265 (ps-begin-page)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2266 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2267 (defun ps-begin-page (&optional dummypage) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2268 (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
|
2269 (setq ps-width-remaining ps-print-width) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2270 (setq ps-height-remaining ps-print-height) |
7257 | 2271 |
16870
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
2272 ;; Print only when a new real page begins. |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
2273 (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
|
2274 (ps-output (format "\n%%%%Page: %d %d\n" |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
2275 (1+ (/ ps-page-count ps-number-of-columns)) |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
2276 (1+ (/ ps-page-count ps-number-of-columns))))) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2277 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2278 (ps-output "BeginDSCPage\n") |
16870
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
2279 (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
|
2280 (ps-output "/PageCount 0 def\n") |
7257 | 2281 |
16870
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
2282 (when ps-print-header |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
2283 (ps-generate-header "HeaderLinesLeft" ps-left-header) |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
2284 (ps-generate-header "HeaderLinesRight" ps-right-header) |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
2285 (ps-output (format "%d SetHeaderLines\n" ps-header-lines))) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2286 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2287 (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
|
2288 (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
|
2289 (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
|
2290 (ps-set-color ps-current-color) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2291 (ps-set-underline ps-current-underline-p)) |
7257 | 2292 |
2293 (defun ps-end-page () | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2294 (setq ps-showpage-count (+ 1 ps-showpage-count)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2295 (ps-output "EndPage\n") |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2296 (ps-output "EndDSCPage\n")) |
7257 | 2297 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2298 (defun ps-dummy-page () |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2299 (setq ps-showpage-count (+ 1 ps-showpage-count)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2300 (ps-output "%%Page: " (format "- %d\n" ps-showpage-count) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2301 "BeginDSCPage |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2302 /PrintHeader false def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2303 BeginPage |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2304 EndPage |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2305 EndDSCPage\n")) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2306 |
7257 | 2307 (defun ps-next-line () |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2308 (if (< ps-height-remaining ps-line-height) |
7257 | 2309 (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
|
2310 (setq ps-width-remaining ps-print-width) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2311 (setq ps-height-remaining (- ps-height-remaining ps-line-height)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2312 (ps-hard-lf))) |
7257 | 2313 |
2314 (defun ps-continue-line () | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2315 (if (< ps-height-remaining ps-line-height) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2316 (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
|
2317 (setq ps-width-remaining ps-print-width) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2318 (setq ps-height-remaining (- ps-height-remaining ps-line-height)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2319 (ps-soft-lf))) |
7257 | 2320 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2321 ;; [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
|
2322 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2323 (defun ps-hard-lf () |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2324 (ps-output "HL\n")) |
7257 | 2325 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2326 (defun ps-soft-lf () |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2327 (ps-output "SL\n")) |
7257 | 2328 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2329 (defun ps-find-wrappoint (from to char-width) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2330 (let ((avail (truncate (/ ps-width-remaining char-width))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2331 (todo (- to from))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2332 (if (< todo avail) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2333 (cons to (* todo char-width)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2334 (cons (+ from avail) ps-width-remaining)))) |
7257 | 2335 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2336 (defun ps-basic-plot-string (from to &optional bg-color) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2337 (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
|
2338 (to (car wrappoint)) |
17588
0054114145ca
change all buffer-substring to buffer-substring-no-properties.
Simon Marshall <simon@gnu.org>
parents:
17440
diff
changeset
|
2339 (string (buffer-substring-no-properties from to))) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2340 (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
|
2341 (ps-output " S\n") |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2342 wrappoint)) |
7257 | 2343 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2344 (defun ps-basic-plot-whitespace (from to &optional bg-color) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2345 (let* ((wrappoint (ps-find-wrappoint from to ps-space-width)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2346 (to (car wrappoint))) |
7257 | 2347 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2348 (ps-output (format "%d W\n" (- to from))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2349 wrappoint)) |
7257 | 2350 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2351 (defun ps-plot (plotfunc from to &optional bg-color) |
7257 | 2352 (while (< from to) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2353 (let* ((wrappoint (funcall plotfunc from to bg-color)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2354 (plotted-to (car wrappoint)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2355 (plotted-width (cdr wrappoint))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2356 (setq from plotted-to) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2357 (setq ps-width-remaining (- ps-width-remaining plotted-width)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2358 (if (< from to) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2359 (ps-continue-line)))) |
7257 | 2360 (if ps-razzle-dazzle |
2361 (let* ((q-todo (- (point-max) (point-min))) | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2362 (q-done (- (point) (point-min))) |
7257 | 2363 (chunkfrac (/ q-todo 8)) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2364 (chunksize (if (> chunkfrac 1000) 1000 chunkfrac))) |
7257 | 2365 (if (> (- q-done ps-razchunk) chunksize) |
10683 | 2366 (let (foo) |
7257 | 2367 (setq ps-razchunk q-done) |
2368 (setq foo | |
2369 (if (< q-todo 100) | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2370 (/ (* 100 q-done) q-todo) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2371 (/ q-done (/ q-todo 100)))) |
16870
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
2372 (message "Formatting...%3d%%" foo)))))) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2373 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2374 (defun ps-set-font (font) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2375 (setq ps-current-font font) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2376 (ps-output (format "/f%d F\n" ps-current-font))) |
7257 | 2377 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2378 (defun ps-set-bg (color) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2379 (if (setq ps-current-bg color) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2380 (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
|
2381 (nth 2 color)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2382 " true BG\n") |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2383 (ps-output "false BG\n"))) |
7257 | 2384 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2385 (defun ps-set-color (color) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2386 (if (setq ps-current-color color) |
11799
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2387 nil |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2388 (setq ps-current-color ps-default-fg)) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2389 (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
|
2390 (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
|
2391 " FG\n")) |
10492
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-set-underline (underline-p) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2394 (ps-output (if underline-p "true" "false") " UL\n") |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2395 (setq ps-current-underline-p underline-p)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2396 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2397 (defun ps-plot-region (from to font fg-color &optional bg-color underline-p) |
7257 | 2398 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2399 (if (not (equal font ps-current-font)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2400 (ps-set-font font)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2401 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2402 ;; 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
|
2403 ;; different than the current. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2404 (if (not (equal fg-color ps-current-color)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2405 (ps-set-color fg-color)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2406 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2407 (if (not (equal bg-color ps-current-bg)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2408 (ps-set-bg bg-color)) |
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 ;; Toggle underlining if different. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2411 (if (not (equal underline-p ps-current-underline-p)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2412 (ps-set-underline underline-p)) |
7257 | 2413 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2414 ;; Starting at the beginning of the specified region... |
7257 | 2415 (save-excursion |
2416 (goto-char from) | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2417 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2418 ;; ...break the region up into chunks separated by tabs, linefeeds, |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2419 ;; and pagefeeds, and plot each chunk. |
7257 | 2420 (while (< from to) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2421 (if (re-search-forward "[\t\n\f]" to t) |
7257 | 2422 (let ((match (char-after (match-beginning 0)))) |
2423 (cond | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2424 ((= match ?\t) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2425 (let ((linestart |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2426 (save-excursion (beginning-of-line) (point)))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2427 (ps-plot 'ps-basic-plot-string from (- (point) 1) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2428 bg-color) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2429 (forward-char -1) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2430 (setq from (+ linestart (current-column))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2431 (if (re-search-forward "[ \t]+" to t) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2432 (ps-plot 'ps-basic-plot-whitespace |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2433 from (+ linestart (current-column)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2434 bg-color)))) |
7257 | 2435 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2436 ((= match ?\n) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2437 (ps-plot 'ps-basic-plot-string from (- (point) 1) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2438 bg-color) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2439 (ps-next-line) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2440 ) |
7257 | 2441 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2442 ((= match ?\f) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2443 (ps-plot 'ps-basic-plot-string from (- (point) 1) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2444 bg-color) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2445 (ps-next-page))) |
7257 | 2446 (setq from (point))) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2447 (ps-plot 'ps-basic-plot-string from to bg-color) |
7257 | 2448 (setq from to))))) |
2449 | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2450 (defun ps-color-value (x-color-value) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2451 ;; 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
|
2452 (/ x-color-value ps-print-color-scale)) |
7257 | 2453 |
11799
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2454 (defun ps-color-values (x-color) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2455 (cond ((fboundp 'x-color-values) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2456 (x-color-values x-color)) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2457 ((fboundp 'pixel-components) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2458 (pixel-components x-color)) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2459 (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
|
2460 |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2461 (defun ps-face-attributes (face) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2462 (let ((differs (face-differs-from-default-p face))) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2463 (list (memq face ps-ref-bold-faces) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2464 (memq face ps-ref-italic-faces) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2465 (memq face ps-ref-underlined-faces) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2466 (and differs (face-foreground face)) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2467 (and differs (face-background face))))) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2468 |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2469 (defun ps-face-attribute-list (face-or-list) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2470 (if (listp face-or-list) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2471 (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
|
2472 (while face-or-list |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2473 (setq face (car face-or-list)) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2474 (setq face-attr (ps-face-attributes face)) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2475 (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
|
2476 (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
|
2477 (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
|
2478 (if foreground |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2479 nil |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2480 (setq foreground (nth 3 face-attr))) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2481 (if background |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2482 nil |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2483 (setq background (nth 4 face-attr))) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2484 (setq face-or-list (cdr face-or-list))) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2485 (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
|
2486 |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2487 (ps-face-attributes face-or-list))) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2488 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2489 (defun ps-plot-with-face (from to face) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2490 (if face |
11799
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2491 (let* ((face-attr (ps-face-attribute-list face)) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2492 (bold-p (nth 0 face-attr)) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2493 (italic-p (nth 1 face-attr)) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2494 (underline-p (nth 2 face-attr)) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2495 (foreground (nth 3 face-attr)) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2496 (background (nth 4 face-attr)) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2497 (fg-color (if (and ps-print-color-p foreground) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2498 (mapcar 'ps-color-value |
11799
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2499 (ps-color-values foreground)) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2500 ps-default-color)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2501 (bg-color (if (and ps-print-color-p background) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2502 (mapcar 'ps-color-value |
11799
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2503 (ps-color-values background))))) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2504 (ps-plot-region from to |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2505 (cond ((and bold-p italic-p) 3) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2506 (italic-p 2) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2507 (bold-p 1) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2508 (t 0)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2509 ; (or fg-color '(0.0 0.0 0.0)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2510 fg-color |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2511 bg-color underline-p)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2512 (goto-char to))) |
7257 | 2513 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2514 |
12768
68b1359ecd66
Renamed `fsf' to `emacs' in all names.
Richard M. Stallman <rms@gnu.org>
parents:
11799
diff
changeset
|
2515 (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
|
2516 (let ((frame-font (face-font face)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2517 (face-defaults (face-font face t))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2518 (or |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2519 ;; Check FACE defaults: |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2520 (and (listp face-defaults) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2521 (memq kind face-defaults)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2522 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2523 ;; Check the user's preferences |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2524 (memq face kind-list)))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2525 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2526 (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
|
2527 (let* ((frame-font (or (face-font face) (face-font 'default))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2528 (kind-cons (assq kind (x-font-properties frame-font))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2529 (kind-spec (cdr-safe kind-cons)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2530 (case-fold-search t)) |
7257 | 2531 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2532 (or (and kind-spec (string-match kind-regex kind-spec)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2533 ;; Kludge-compatible: |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2534 (memq face kind-list)))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2535 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2536 (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
|
2537 (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
|
2538 (ps-emacs-face-kind-p face 'bold "-\\(bold\\|demibold\\)-" |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2539 ps-bold-faces) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2540 (ps-xemacs-face-kind-p face 'WEIGHT_NAME "bold\\|demibold" |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2541 ps-bold-faces))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2542 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2543 (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
|
2544 (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
|
2545 (ps-emacs-face-kind-p face 'italic "-[io]-" ps-italic-faces) |
10683 | 2546 (or |
2547 (ps-xemacs-face-kind-p face 'ANGLE_NAME "i\\|o" ps-italic-faces) | |
2548 (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
|
2549 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2550 (defun ps-face-underlined-p (face) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2551 (or (face-underline-p face) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2552 (memq face ps-underlined-faces))) |
7257 | 2553 |
11799
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2554 ;; Ensure that face-list is fbound. |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2555 (or (fboundp 'face-list) (defalias 'face-list 'list-faces)) |
7257 | 2556 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2557 (defun ps-build-reference-face-lists () |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2558 (if ps-auto-font-detect |
11799
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2559 (let ((faces (face-list)) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2560 the-face) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2561 (setq ps-ref-bold-faces nil |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2562 ps-ref-italic-faces nil |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2563 ps-ref-underlined-faces nil) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2564 (while faces |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2565 (setq the-face (car faces)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2566 (if (ps-face-italic-p the-face) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2567 (setq ps-ref-italic-faces |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2568 (cons the-face ps-ref-italic-faces))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2569 (if (ps-face-bold-p the-face) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2570 (setq ps-ref-bold-faces |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2571 (cons the-face ps-ref-bold-faces))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2572 (if (ps-face-underlined-p the-face) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2573 (setq ps-ref-underlined-faces |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2574 (cons the-face ps-ref-underlined-faces))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2575 (setq faces (cdr faces)))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2576 (setq ps-ref-bold-faces ps-bold-faces) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2577 (setq ps-ref-italic-faces ps-italic-faces) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2578 (setq ps-ref-underlined-faces ps-underlined-faces)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2579 (setq ps-build-face-reference nil)) |
7257 | 2580 |
2581 (defun ps-mapper (extent list) | |
2582 (nconc list (list (list (extent-start-position extent) 'push extent) | |
2583 (list (extent-end-position extent) 'pull extent))) | |
2584 nil) | |
2585 | |
10683 | 2586 (defun ps-extent-sorter (a b) |
2587 (< (extent-priority a) (extent-priority b))) | |
11799
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2588 |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2589 (defun ps-print-ensure-fontified (start end) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2590 (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
|
2591 (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
|
2592 (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
|
2593 (lazy-lock-fontify-buffer)))) ; the old |
11799
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2594 |
7257 | 2595 (defun ps-generate-postscript-with-faces (from to) |
10683 | 2596 ;; Build the reference lists of faces if necessary. |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2597 (if (or ps-always-build-face-reference |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2598 ps-build-face-reference) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2599 (progn |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2600 (message "Collecting face information...") |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2601 (ps-build-reference-face-lists))) |
10683 | 2602 ;; Set the color scale. We do it here instead of in the defvar so |
2603 ;; that ps-print can be dumped into emacs. This expression can't be | |
2604 ;; evaluated at dump-time because X isn't initialized. | |
2605 (setq ps-print-color-scale | |
2606 (if ps-print-color-p | |
11799
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2607 (float (car (ps-color-values "white"))) |
10683 | 2608 1.0)) |
2609 ;; Generate some PostScript. | |
7257 | 2610 (save-restriction |
2611 (narrow-to-region from to) | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2612 (let ((face 'default) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2613 (position to)) |
11799
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2614 (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
|
2615 (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
|
2616 (eq ps-print-emacs-type 'xemacs)) |
7257 | 2617 ;; Build the list of extents... |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2618 (let ((a (cons 'dummy nil)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2619 record type extent extent-list) |
7257 | 2620 (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
|
2621 (setq a (sort (cdr a) 'car-less-than-car)) |
7257 | 2622 |
2623 (setq extent-list nil) | |
2624 | |
2625 ;; Loop through the extents... | |
2626 (while a | |
2627 (setq record (car a)) | |
2628 | |
2629 (setq position (car record)) | |
2630 (setq record (cdr record)) | |
2631 | |
2632 (setq type (car record)) | |
2633 (setq record (cdr record)) | |
2634 | |
2635 (setq extent (car record)) | |
2636 | |
2637 ;; Plot up to this record. | |
11799
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2638 ;; 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
|
2639 ;; situation in which some of the records have |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2640 ;; positions less than 'from'. Since we've narrowed |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2641 ;; 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
|
2642 ;; 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
|
2643 ;; point-min. |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2644 (if (and (>= from (point-min)) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2645 (<= position (point-max))) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2646 (ps-plot-with-face from position face)) |
7257 | 2647 |
2648 (cond | |
2649 ((eq type 'push) | |
11799
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2650 (if (extent-face extent) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2651 (setq extent-list (sort (cons extent extent-list) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2652 'ps-extent-sorter)))) |
7257 | 2653 |
2654 ((eq type 'pull) | |
2655 (setq extent-list (sort (delq extent extent-list) | |
2656 'ps-extent-sorter)))) | |
2657 | |
2658 (setq face | |
2659 (if extent-list | |
2660 (extent-face (car extent-list)) | |
2661 'default)) | |
2662 | |
2663 (setq from position) | |
2664 (setq a (cdr a))))) | |
2665 | |
12769
4a905565cfa6
(ps-print-emacs-type): Renamed from emacs-type.
Richard M. Stallman <rms@gnu.org>
parents:
12768
diff
changeset
|
2666 ((eq ps-print-emacs-type 'emacs) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2667 (let ((property-change from) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2668 (overlay-change from)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2669 (while (< from to) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2670 (if (< property-change to) ; Don't search for property change |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2671 ; unless previous search succeeded. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2672 (setq property-change |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2673 (next-property-change from nil to))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2674 (if (< overlay-change to) ; Don't search for overlay change |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2675 ; unless previous search succeeded. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2676 (setq overlay-change |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2677 (min (next-overlay-change from) to))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2678 (setq position |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2679 (min property-change overlay-change)) |
14626
e555a2d12121
(ps-generate-postscript-with-faces):
Karl Heuer <kwzh@gnu.org>
parents:
14190
diff
changeset
|
2680 ;; The code below is not quite correct, |
e555a2d12121
(ps-generate-postscript-with-faces):
Karl Heuer <kwzh@gnu.org>
parents:
14190
diff
changeset
|
2681 ;; because a non-nil overlay invisible property |
e555a2d12121
(ps-generate-postscript-with-faces):
Karl Heuer <kwzh@gnu.org>
parents:
14190
diff
changeset
|
2682 ;; which is inactive according to the current value |
e555a2d12121
(ps-generate-postscript-with-faces):
Karl Heuer <kwzh@gnu.org>
parents:
14190
diff
changeset
|
2683 ;; of buffer-invisibility-spec nonetheless overrides |
e555a2d12121
(ps-generate-postscript-with-faces):
Karl Heuer <kwzh@gnu.org>
parents:
14190
diff
changeset
|
2684 ;; a face text property. |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2685 (setq face |
14626
e555a2d12121
(ps-generate-postscript-with-faces):
Karl Heuer <kwzh@gnu.org>
parents:
14190
diff
changeset
|
2686 (cond ((let ((prop (get-text-property from 'invisible))) |
e555a2d12121
(ps-generate-postscript-with-faces):
Karl Heuer <kwzh@gnu.org>
parents:
14190
diff
changeset
|
2687 ;; Decide whether this invisible property |
e555a2d12121
(ps-generate-postscript-with-faces):
Karl Heuer <kwzh@gnu.org>
parents:
14190
diff
changeset
|
2688 ;; really makes the text invisible. |
e555a2d12121
(ps-generate-postscript-with-faces):
Karl Heuer <kwzh@gnu.org>
parents:
14190
diff
changeset
|
2689 (if (eq buffer-invisibility-spec t) |
e555a2d12121
(ps-generate-postscript-with-faces):
Karl Heuer <kwzh@gnu.org>
parents:
14190
diff
changeset
|
2690 (not (null prop)) |
e555a2d12121
(ps-generate-postscript-with-faces):
Karl Heuer <kwzh@gnu.org>
parents:
14190
diff
changeset
|
2691 (or (memq prop buffer-invisibility-spec) |
e555a2d12121
(ps-generate-postscript-with-faces):
Karl Heuer <kwzh@gnu.org>
parents:
14190
diff
changeset
|
2692 (assq prop buffer-invisibility-spec)))) |
e555a2d12121
(ps-generate-postscript-with-faces):
Karl Heuer <kwzh@gnu.org>
parents:
14190
diff
changeset
|
2693 nil) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2694 ((get-text-property from 'face)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2695 (t 'default))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2696 (let ((overlays (overlays-at from)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2697 (face-priority -1)) ; text-property |
7257 | 2698 (while overlays |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2699 (let* ((overlay (car overlays)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2700 (overlay-face (overlay-get overlay 'face)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2701 (overlay-invisible (overlay-get overlay 'invisible)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2702 (overlay-priority (or (overlay-get overlay |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2703 'priority) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2704 0))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2705 (if (and (or overlay-invisible overlay-face) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2706 (> overlay-priority face-priority)) |
14626
e555a2d12121
(ps-generate-postscript-with-faces):
Karl Heuer <kwzh@gnu.org>
parents:
14190
diff
changeset
|
2707 (setq face (cond ((if (eq buffer-invisibility-spec t) |
e555a2d12121
(ps-generate-postscript-with-faces):
Karl Heuer <kwzh@gnu.org>
parents:
14190
diff
changeset
|
2708 (not (null overlay-invisible)) |
e555a2d12121
(ps-generate-postscript-with-faces):
Karl Heuer <kwzh@gnu.org>
parents:
14190
diff
changeset
|
2709 (or (memq overlay-invisible buffer-invisibility-spec) |
e555a2d12121
(ps-generate-postscript-with-faces):
Karl Heuer <kwzh@gnu.org>
parents:
14190
diff
changeset
|
2710 (assq overlay-invisible buffer-invisibility-spec))) |
e555a2d12121
(ps-generate-postscript-with-faces):
Karl Heuer <kwzh@gnu.org>
parents:
14190
diff
changeset
|
2711 nil) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2712 ((and face overlay-face))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2713 face-priority overlay-priority))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2714 (setq overlays (cdr overlays)))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2715 ;; Plot up to this record. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2716 (ps-plot-with-face from position face) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2717 (setq from position))))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2718 (ps-plot-with-face from to face)))) |
7257 | 2719 |
2720 (defun ps-generate-postscript (from to) | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2721 (ps-plot-region from to 0 nil)) |
7257 | 2722 |
2723 (defun ps-generate (buffer from to genfunc) | |
10683 | 2724 (let ((from (min to from)) |
14712
974766c7bddc
(ps-generate): Bind inhibit-read-only.
Richard M. Stallman <rms@gnu.org>
parents:
14626
diff
changeset
|
2725 (to (max to from)) |
974766c7bddc
(ps-generate): Bind inhibit-read-only.
Richard M. Stallman <rms@gnu.org>
parents:
14626
diff
changeset
|
2726 ;; 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
|
2727 ;; are copied into ps-spool-buffer. |
974766c7bddc
(ps-generate): Bind inhibit-read-only.
Richard M. Stallman <rms@gnu.org>
parents:
14626
diff
changeset
|
2728 (inhibit-read-only t)) |
10683 | 2729 (save-restriction |
2730 (narrow-to-region from to) | |
2731 (if ps-razzle-dazzle | |
16870
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
2732 (message "Formatting...%3d%%" (setq ps-razchunk 0))) |
10683 | 2733 (set-buffer buffer) |
2734 (setq ps-source-buffer buffer) | |
2735 (setq ps-spool-buffer (get-buffer-create ps-spool-buffer-name)) | |
2736 (ps-init-output-queue) | |
2737 (let (safe-marker completed-safely needs-begin-file) | |
2738 (unwind-protect | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2739 (progn |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2740 (set-buffer ps-spool-buffer) |
10683 | 2741 |
2742 ;; Get a marker and make it point to the current end of the | |
2743 ;; buffer, If an error occurs, we'll delete everything from | |
2744 ;; the end of this marker onwards. | |
2745 (setq safe-marker (make-marker)) | |
2746 (set-marker safe-marker (point-max)) | |
2747 | |
2748 (goto-char (point-min)) | |
2749 (if (looking-at (regexp-quote "%!PS-Adobe-1.0")) | |
2750 nil | |
2751 (setq needs-begin-file t)) | |
2752 (save-excursion | |
2753 (set-buffer ps-source-buffer) | |
2754 (if needs-begin-file (ps-begin-file)) | |
2755 (ps-begin-job) | |
2756 (ps-begin-page)) | |
2757 (set-buffer ps-source-buffer) | |
2758 (funcall genfunc from to) | |
2759 (ps-end-page) | |
2760 | |
2761 (if (and ps-spool-duplex | |
2762 (= (mod ps-page-count 2) 1)) | |
2763 (ps-dummy-page)) | |
2764 (ps-flush-output) | |
2765 | |
2766 ;; Back to the PS output buffer to set the page count | |
2767 (set-buffer ps-spool-buffer) | |
2768 (goto-char (point-max)) | |
2769 (while (re-search-backward "^/PageCount 0 def$" nil t) | |
2770 (replace-match (format "/PageCount %d def" ps-page-count) t)) | |
7257 | 2771 |
10683 | 2772 ;; Setting this variable tells the unwind form that the |
2773 ;; the postscript was generated without error. | |
2774 (setq completed-safely t)) | |
2775 | |
14040 | 2776 ;; Unwind form: If some bad mojo occurred while generating |
10683 | 2777 ;; postscript, delete all the postscript that was generated. |
2778 ;; This protects the previously spooled files from getting | |
2779 ;; corrupted. | |
2780 (if (and (markerp safe-marker) (not completed-safely)) | |
2781 (progn | |
2782 (set-buffer ps-spool-buffer) | |
2783 (delete-region (marker-position safe-marker) (point-max)))))) | |
2784 | |
2785 (if ps-razzle-dazzle | |
2786 (message "Formatting...done"))))) | |
7257 | 2787 |
2788 (defun ps-do-despool (filename) | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2789 (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
|
2790 (not (symbol-value 'ps-spool-buffer))) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2791 (message "No spooled PostScript to print") |
7257 | 2792 (ps-end-file) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2793 (ps-flush-output) |
7257 | 2794 (if filename |
2795 (save-excursion | |
2796 (if ps-razzle-dazzle | |
2797 (message "Saving...")) | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2798 (set-buffer ps-spool-buffer) |
7257 | 2799 (setq filename (expand-file-name filename)) |
2800 (write-region (point-min) (point-max) filename) | |
2801 (if ps-razzle-dazzle | |
2802 (message "Wrote %s" filename))) | |
2803 ;; Else, spool to the printer | |
2804 (if ps-razzle-dazzle | |
2805 (message "Printing...")) | |
2806 (save-excursion | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2807 (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
|
2808 (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
|
2809 (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
|
2810 (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
|
2811 (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
|
2812 (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
|
2813 (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
|
2814 nil |
395b22713872
(ps-do-despool): On MS-DOS, allow both the usual and
Richard M. Stallman <rms@gnu.org>
parents:
14169
diff
changeset
|
2815 ps-lpr-switches)))) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2816 (if ps-razzle-dazzle |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2817 (message "Printing...done"))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2818 (kill-buffer ps-spool-buffer))) |
7257 | 2819 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2820 (defun ps-kill-emacs-check () |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2821 (let (ps-buffer) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2822 (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
|
2823 (buffer-modified-p ps-buffer)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2824 (if (y-or-n-p "Unprinted PostScript waiting; print now? ") |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2825 (ps-despool))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2826 (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
|
2827 (buffer-modified-p ps-buffer)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2828 (if (yes-or-no-p "Unprinted PostScript waiting; exit anyway? ") |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2829 nil |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2830 (error "Unprinted PostScript"))))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2831 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2832 (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
|
2833 (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
|
2834 (if kill-emacs-hook |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2835 (message "Won't override existing kill-emacs-hook") |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2836 (setq kill-emacs-hook 'ps-kill-emacs-check))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2837 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2838 ;;; Sample Setup Code: |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2839 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2840 ;; 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
|
2841 ;; 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
|
2842 ;; 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
|
2843 |
11799
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2844 ;; 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
|
2845 ;; unless you understand what it does! |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2846 |
12769
4a905565cfa6
(ps-print-emacs-type): Renamed from emacs-type.
Richard M. Stallman <rms@gnu.org>
parents:
12768
diff
changeset
|
2847 (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
|
2848 [f22] ''f22)) |
4a905565cfa6
(ps-print-emacs-type): Renamed from emacs-type.
Richard M. Stallman <rms@gnu.org>
parents:
12768
diff
changeset
|
2849 (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
|
2850 [C-f22] |
10683 | 2851 ''(control f22))) |
12769
4a905565cfa6
(ps-print-emacs-type): Renamed from emacs-type.
Richard M. Stallman <rms@gnu.org>
parents:
12768
diff
changeset
|
2852 (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
|
2853 [S-f22] |
10683 | 2854 ''(shift f22))) |
2855 | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2856 ;; 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
|
2857 ;; placed in ps-left-headers. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2858 (defun ps-article-subject () |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2859 (save-excursion |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2860 (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
|
2861 (if (re-search-forward "^Subject:[ \t]+\\(.*\\)$" nil t) |
17588
0054114145ca
change all buffer-substring to buffer-substring-no-properties.
Simon Marshall <simon@gnu.org>
parents:
17440
diff
changeset
|
2862 (buffer-substring-no-properties (match-beginning 1) (match-end 1)) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2863 "Subject ???"))) |
7257 | 2864 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2865 ;; 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
|
2866 ;; 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
|
2867 ;; it's provided. To be placed in ps-left-headers. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2868 (defun ps-article-author () |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2869 (save-excursion |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2870 (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
|
2871 (if (re-search-forward "^From:[ \t]+\\(.*\\)$" nil t) |
17588
0054114145ca
change all buffer-substring to buffer-substring-no-properties.
Simon Marshall <simon@gnu.org>
parents:
17440
diff
changeset
|
2872 (let ((fromstring (buffer-substring-no-properties (match-beginning 1) (match-end 1)))) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2873 (cond |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2874 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2875 ;; Try first to match addresses that look like |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2876 ;; thompson@wg2.waii.com (Jim Thompson) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2877 ((string-match ".*[ \t]+(\\(.*\\))" fromstring) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2878 (substring fromstring (match-beginning 1) (match-end 1))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2879 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2880 ;; Next try to match addresses that look like |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2881 ;; Jim Thompson <thompson@wg2.waii.com> |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2882 ((string-match "\\(.*\\)[ \t]+<.*>" fromstring) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2883 (substring fromstring (match-beginning 1) (match-end 1))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2884 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2885 ;; Couldn't find a real name -- show the address instead. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2886 (t fromstring))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2887 "From ???"))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2888 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2889 ;; 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
|
2890 ;; left-headers specially for gnus articles. Unfortunately, gnus- |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2891 ;; 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
|
2892 ;; 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
|
2893 ;; 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
|
2894 ;; only alternative is gnus-article-prepare-hook. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2895 (defun ps-gnus-article-prepare-hook () |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2896 (setq ps-header-lines 3) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2897 (setq ps-left-header |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2898 ;; The left headers will display the article's subject, its |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2899 ;; author, and the newsgroup it was in. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2900 (list 'ps-article-subject 'ps-article-author 'gnus-newsgroup-name))) |
7257 | 2901 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2902 ;; 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
|
2903 ;; left-headers specially for mail messages. This header setup would |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2904 ;; also work, I think, for RMAIL. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2905 (defun ps-vm-mode-hook () |
10683 | 2906 (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
|
2907 (setq ps-header-lines 3) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2908 (setq ps-left-header |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2909 ;; The left headers will display the message's subject, its |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2910 ;; author, and the name of the folder it was in. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2911 (list 'ps-article-subject 'ps-article-author 'buffer-name))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2912 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2913 ;; 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
|
2914 ;; 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
|
2915 ;; 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
|
2916 ;; 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
|
2917 ;; buffers first. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2918 (defun ps-gnus-print-article-from-summary () |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2919 (interactive) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2920 (if (get-buffer "*Article*") |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2921 (save-excursion |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2922 (set-buffer "*Article*") |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2923 (ps-spool-buffer-with-faces)))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2924 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2925 ;; 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
|
2926 ;; same thing for vm. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2927 (defun ps-vm-print-message-from-summary () |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2928 (interactive) |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2929 (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
|
2930 (save-excursion |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2931 (set-buffer (symbol-value 'vm-mail-buffer)) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2932 (ps-spool-buffer-with-faces)))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2933 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2934 ;; 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
|
2935 ;; prsc. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2936 (defun ps-gnus-summary-setup () |
10683 | 2937 (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
|
2938 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2939 ;; 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
|
2940 ;; placed in ps-left-headers. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2941 (defun ps-info-file () |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2942 (save-excursion |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2943 (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
|
2944 (if (re-search-forward "File:[ \t]+\\([^, \t\n]*\\)" nil t) |
17588
0054114145ca
change all buffer-substring to buffer-substring-no-properties.
Simon Marshall <simon@gnu.org>
parents:
17440
diff
changeset
|
2945 (buffer-substring-no-properties (match-beginning 1) (match-end 1)) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2946 "File ???"))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2947 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2948 ;; 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
|
2949 ;; placed in ps-left-headers. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2950 (defun ps-info-node () |
7257 | 2951 (save-excursion |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2952 (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
|
2953 (if (re-search-forward "Node:[ \t]+\\([^,\t\n]*\\)" nil t) |
17588
0054114145ca
change all buffer-substring to buffer-substring-no-properties.
Simon Marshall <simon@gnu.org>
parents:
17440
diff
changeset
|
2954 (buffer-substring-no-properties (match-beginning 1) (match-end 1)) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2955 "Node ???"))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2956 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2957 (defun ps-info-mode-hook () |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2958 (setq ps-left-header |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2959 ;; 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
|
2960 (list 'ps-info-node 'ps-info-file))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2961 |
11799
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2962 ;; 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
|
2963 ;; 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
|
2964 ;; 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
|
2965 ;; 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
|
2966 ;; modification.) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
2967 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2968 (defun ps-jts-ps-setup () |
10683 | 2969 (global-set-key (ps-prsc) 'ps-spool-buffer-with-faces) ;f22 is prsc |
2970 (global-set-key (ps-s-prsc) 'ps-spool-region-with-faces) | |
2971 (global-set-key (ps-c-prsc) 'ps-despool) | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2972 (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
|
2973 (add-hook 'gnus-summary-mode-hook 'ps-gnus-summary-setup) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2974 (add-hook 'vm-mode-hook 'ps-vm-mode-hook) |
10683 | 2975 (add-hook 'vm-mode-hooks 'ps-vm-mode-hook) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2976 (add-hook 'Info-mode-hook 'ps-info-mode-hook) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2977 (setq ps-spool-duplex t) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2978 (setq ps-print-color-p nil) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2979 (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
|
2980 (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
|
2981 '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
|
2982 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2983 ;; 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
|
2984 ;; 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
|
2985 ;; (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
|
2986 ;; 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
|
2987 ;; without modification.) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2988 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2989 (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
|
2990 (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
|
2991 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
|
2992 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
|
2993 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2994 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
|
2995 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
|
2996 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
|
2997 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2998 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
|
2999 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
|
3000 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
|
3001 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
|
3002 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
|
3003 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
|
3004 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
|
3005 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
|
3006 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
|
3007 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
|
3008 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
|
3009 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
|
3010 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
3011 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
|
3012 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
|
3013 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
|
3014 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
|
3015 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
|
3016 'ps-jack-setup) |
7257 | 3017 |
3018 (provide 'ps-print) | |
10738
e7d5b119b583
(ps-print-version): Add caveat about version number.
Richard M. Stallman <rms@gnu.org>
parents:
10683
diff
changeset
|
3019 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
3020 ;;; ps-print.el ends here |