• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/emacs-92/emacs/lisp/

Lines Matching +defs:header +defs:text

1 ;;; ps-print.el --- print text from the buffer as PostScript
50 ;; buffer's bold and italic text attributes are preserved in the printer
238 ;; In landscape mode, the text is NOT scaled: you may print 70 lines in
241 ;; of the page and the printed header, whatever the orientation is.
298 ;; | lm | text | ic | text | ic | text | rm |
304 ;; If (ic < 0), the text of adjacent columns can overlap.
311 ;; `ps-bottom-margin' `ps-top-margin' `ps-header-offset' `ps-footer-offset'
317 ;; | header | | | | header | | |
322 ;; | text | or | text | or | text | or | text |
332 ;; If `ps-print-header' is nil, `ps-header-offset' is not relevant.
336 ;; header, whatever the orientation is;
357 ;; To turn them off completely, set `ps-print-header' to nil.
358 ;; To turn off the header's gaudy framing box,
359 ;; set `ps-print-header-frame' to nil.
361 ;; The variable `ps-header-frame-alist' specifies header frame properties
389 ;; To print only one header at the top of each page, set
390 ;; `ps-print-only-one-header' to t.
392 ;; To switch headers, set `ps-switch-header' to:
403 ;; The font family and size of text in the header are determined by the
404 ;; variables `ps-header-font-family', `ps-header-font-size' and
405 ;; `ps-header-title-font-size' (see below).
407 ;; The variable `ps-header-line-pad' determines the portion of a header title
408 ;; line height to insert between the header frame and the text it contains,
415 ;; The amount of information in the header can be changed by changing the
416 ;; number of lines. To show less, set `ps-header-lines' to 1, and the header
418 ;; `ps-header-lines' to 3, and the header will show the time of printing below
421 ;; To change the content of the headers, change the variables `ps-left-header'
422 ;; and `ps-right-header'.
423 ;; These variables are lists, specifying top-to-bottom the text to display on
424 ;; the left or right side of the header. Each element of the list should be a
428 ;; Symbols in the header format lists can either represent functions or
430 ;; header. Variables should contain strings to display in the header. In
434 ;; Here's an example: say we want the left header to display the text
449 ;; and a literal for "Curly". Here's how `ps-left-header' should be set:
451 ;; (setq ps-left-header (list 'moe-func 'larry-var "(Curly)"))
470 ;; The variables `ps-print-only-one-header' and `ps-switch-header' also control
471 ;; the footer (The same way that control header).
476 ;; (setq ps-print-header nil
489 ;; It is possible to add PostScript prologue header comments besides that
490 ;; ps-print generates by setting the variable `ps-print-prologue-header'.
492 ;; `ps-print-prologue-header' may be a string or a symbol function which
494 ;; header section which is used to define some document characteristic through
497 ;; By default `ps-print-prologue-header' is nil.
500 ;; insert more requirements put them first in `ps-print-prologue-header' using
504 ;; (setq ps-print-prologue-header
617 ;; Some printer system prints a header page and forces the first page be
618 ;; printed on header page back, when using duplex. If your printer system has
781 ;; Zebra stripes are a kind of background that appear "underneath" the text and
782 ;; can make the text easier to read. They look like this:
884 ;; ordinary text. If its value does not correspond to a known font family, an
889 ;; ordinary text, when generating PostScript. Its value is a float or a cons
894 ;; Similarly, the variable `ps-header-font-family' determines which font family
895 ;; is to be used for text in the header.
897 ;; The variable `ps-header-font-size' determines the font size, in points, for
898 ;; text in the header (similar to `ps-font-size').
900 ;; The variable `ps-header-title-font-size' determines the font size, in
901 ;; points, for the top line of text in the header (similar to `ps-font-size').
904 ;; ordinary text, when generating PostScript (similar to `ps-font-size'). The
908 ;; points, for ordinary text, when generating PostScript (similar to
1100 ;; strikeout - like underline, but the line is in middle of text.
1101 ;; overline - like underline, but the line is over the text.
1102 ;; shadow - text will have a shadow.
1103 ;; box - text will be surrounded by a box.
1121 ;; possible to define the following text attributes: font name, font size,
1127 ;; See documentation for `ps-print-background-text' and
1130 ;; For example, if we wish to print text "preliminary" on all pages and text
1133 ;; (setq ps-print-background-text
1168 ;; 7. Print header
1169 ;; 8. Print buffer text (with faces, if specified) and line number
1229 ;; `ps-header-frame-alist'.
1245 ;; `ps-restore-selected-pages', `ps-switch-header',
1274 ;; PostScript prologue header comment insertion.
1275 ;; Skip invisible text better.
1284 ;; Skip invisible text.
1289 ;; Put one header per page over the columns.
1304 ;; Font family and float size for text and header.
1403 ;; header per page over the columns and correct line numbers when printing a
1703 (defcustom ps-print-prologue-header nil
1704 "*PostScript prologue header comments besides that ps-print generates.
1706 `ps-print-prologue-header' may be a string or a symbol function which returns a
1707 string. Note that this string is inserted on PostScript prologue header
1712 more requirements put them first in `ps-print-prologue-header' using the
1716 (setq ps-print-prologue-header
2288 (defcustom ps-print-background-text nil
2295 STRING is the text to be printed on background.
2297 X and Y are positions on paper to put the text.
2298 If X and Y are nil, the text is positioned at lower left corner.
2300 FONT is a font name to be used on printing the text.
2305 GRAY is the text gray factor (should be very light like 0.8).
2308 ROTATION is the text rotation angle; if nil, the angle is given by the diagonal
2311 PAGES designates the page to print background text.
2314 If PAGES is nil, print background text on all pages.
2320 For example, if you wish to print text \"Preliminary\" on all pages do:
2344 ;; | lm | text | ic | text | ic | text | rm |
2371 ;; | header |
2375 ;; | text |
2392 (defcustom ps-header-offset (/ (* 72 1.0) 2.54) ; 1.0 cm
2393 "*Vertical space in points (1/72 inch) between the main text and the header."
2398 (defcustom ps-header-line-pad 0.15
2399 "*Portion of a header title line height to insert.
2400 The insertion is done between the header frame and the text it contains,
2407 "*Vertical space in points (1/72 inch) between the main text and the footer."
2414 The insertion is done between the footer frame and the text it contains,
2422 (defcustom ps-print-header t
2423 "*Non-nil means print a header at the top of each page.
2424 By default, the header displays the buffer name, page number, and, if the
2426 changing variables `ps-left-header' and `ps-right-header'."
2431 (defcustom ps-print-header-frame t
2432 "*Non-nil means draw a gaudy frame around the header."
2437 (defcustom ps-header-frame-alist
2443 "*Specify header frame properties alist.
2517 (defcustom ps-header-lines 2
2518 "*Number of lines to display in page header, when generating PostScript."
2549 See also `ps-header-frame-alist' for documentation."
2605 (defcustom ps-print-only-one-header nil
2606 "*Non-nil means print only one header/footer at the top/bottom of each page.
2608 only one header/footer over all columns or one header/footer per column.
2609 See also `ps-print-header' and `ps-print-footer'."
2614 (defcustom ps-switch-header 'duplex
2628 See also `ps-print-header' and `ps-print-footer'."
2640 see variable `ps-print-header'."
2866 "*Font family name for ordinary text, when generating PostScript."
2872 "*Font size, in points, for ordinary text, when generating PostScript."
2882 (defcustom ps-header-font-family 'Helvetica
2883 "*Font family name for text in the header, when generating PostScript."
2888 (defcustom ps-header-font-size '(10 . 12)
2889 "*Font size, in points, for text in the header, when generating PostScript."
2899 (defcustom ps-header-title-font-size '(12 . 14)
2900 "*Font size, in points, for the top line of text in header, in PostScript."
2911 "*Font family name for text in the footer, when generating PostScript."
2917 "*Font size, in points, for text in the footer, when generating PostScript."
2970 "*Specify how buffer's text color is printed.
2994 ps-print, that is, if there is a face in a text that doesn't have a foreground
3037 ps-print, that is, if there is a face in a text that doesn't have a background
3183 (defcustom ps-left-header
3184 (list 'ps-get-buffer-name 'ps-header-dirpart)
3185 "*The items to display (each on a line) on the left part of the page header.
3207 (defcustom ps-right-header
3210 "*The items to display (each on a line) on the right part of the page header.
3213 See the variable `ps-left-header' for a description of the format of this
3239 (list 'ps-get-buffer-name 'ps-header-dirpart)
3300 "*Contains the header line identifying the output as PostScript.
3356 "*Specify line spacing, in points, for ordinary text.
3372 "*Specify paragraph spacing, in points, for ordinary text.
3629 '(25 . ps-print-background-text)
3633 '(29 . ps-print-prologue-header)
3642 '(30 . ps-print-only-one-header)
3643 '(30 . ps-switch-header)
3644 '(30 . ps-print-header)
3645 '(30 . ps-header-lines)
3646 '(30 . ps-header-offset)
3647 '(30 . ps-header-line-pad)
3648 '(30 . ps-print-header-frame)
3649 '(30 . ps-header-frame-alist)
3661 '(30 . ps-left-header)
3662 '(30 . ps-right-header)
3674 '(26 . ps-header-font-family)
3675 '(26 . ps-header-font-size)
3676 '(26 . ps-header-title-font-size)
3890 (or (ps-x-find-coding-system 'raw-text-unix)
3891 (ps-x-copy-coding-system 'no-conversion-unix 'raw-text-unix)))
4003 (defvar ps-background-text-count 0)
4031 (defvar ps-header-pad 0
4032 "Vertical and horizontal space between the header frame and the text.
4036 "Vertical and horizontal space between the footer frame and the text.
4054 (defvar ps-header-font-size-internal nil)
4055 (defvar ps-header-title-font-size-internal nil)
4163 underline - put a line under text.
4164 strikeout - like underline, but the line is in middle of text.
4165 overline - like underline, but the line is over the text.
4166 shadow - text will have a shadow.
4167 box - text will be surrounded by a box.
4308 lines printed), and to indicate in the header that the printout is of a partial
4334 "Font family name for text of `font-type', when generating PostScript."
4351 y-dimension, of the lines of text it has printed, and thus affects the
4359 y-dimension, of the lines of text it has printed, and thus affects the
4372 x-dimension, of the text it has printed, and thus affects the point at
4383 (ps-header-font-size-internal
4384 (or ps-header-font-size-internal
4385 (ps-get-font-size 'ps-header-font-size)))
4386 (ps-header-title-font-size-internal
4387 (or ps-header-title-font-size-internal
4388 (ps-get-font-size 'ps-header-title-font-size)))
4391 (icw (ps-avg-char-width 'ps-font-for-text)) ; initial character width
4425 The correspondence is based on having NB-LINES lines of text,
4430 (ps-header-font-size-internal
4431 (or ps-header-font-size-internal
4432 (ps-get-font-size 'ps-header-font-size)))
4433 (ps-header-title-font-size-internal
4434 (or ps-header-title-font-size-internal
4435 (ps-get-font-size 'ps-header-title-font-size)))
4442 (ilh (ps-line-height 'ps-font-for-text)) ; initial line height
4510 (ps-select-font ps-font-family 'ps-font-for-text
4512 (ps-select-font ps-header-font-family 'ps-font-for-header
4513 ps-header-font-size-internal
4514 ps-header-title-font-size-internal)
4529 ;; | lm | text | ic | text | ic | text | rm |
4543 | lm | text | ic | text | ic | text | rm |
4564 ;; If headers are turned on, deduct the height of the header from the print
4566 (if ps-print-header
4567 (setq ps-header-pad (* ps-header-line-pad
4568 (ps-title-line-height 'ps-font-for-header))
4570 ps-header-offset
4571 ps-header-pad
4572 (ps-title-line-height 'ps-font-for-header)
4573 (* (ps-line-height 'ps-font-for-header)
4574 (1- ps-header-lines))
4575 ps-header-pad)))
4577 (error "Bad vertical layout (header):
4580 ps-header-offset == %s
4581 ps-header-pad == %s
4582 header-height == %s
4587 ps-header-offset
4588 ps-header-pad
4589 (+ ps-header-pad
4590 (ps-title-line-height 'ps-font-for-header)
4591 (* (ps-line-height 'ps-font-for-header)
4592 (1- ps-header-lines))
4593 ps-header-pad)
4626 (let* ((line-height (ps-line-height 'ps-font-for-text))
4635 font-text-height == %s
4641 (ps-line-height 'ps-font-for-text)
4816 ;; These functions are used in `ps-mule' to get charset of header and footer.
4817 ;; To avoid unnecessary calls to functions in `ps-left-header',
4818 ;; `ps-right-header', `ps-left-footer' and `ps-right-footer'.
4845 (defun ps-header-footer-string ()
4846 (and ps-print-header
4847 (setq ps-lh-cache (ps-generate-string-list ps-left-header)
4848 ps-rh-cache (ps-generate-string-list ps-right-header)))
4856 (defun ps-generate-header-line (fonttag &optional content)
4862 (ps-output (ps-mule-encode-header-string content fonttag)))
4867 (ps-output-string (ps-mule-encode-header-string (funcall content)
4873 (ps-output-string (ps-mule-encode-header-string (symbol-value content)
4881 (defun ps-generate-header (name fonttag0 fonttag1 contents)
4883 (and contents (> ps-header-lines 0)
4885 (ps-generate-header-line fonttag0 (car contents))
4886 (while (and (< count ps-header-lines)
4888 (ps-generate-header-line fonttag1 (car contents))
4960 (defun ps-background-text ()
4962 #'(lambda (text)
4963 (setq ps-background-text-count (1+ ps-background-text-count))
4964 (ps-output (format "/ShowBackText-%d{\n" ps-background-text-count))
4965 (ps-output-string (nth 0 text)) ; text
4968 (ps-float-format (nth 4 text) 200.0) ; font size
4969 (format "/%s " (or (nth 3 text) "Times-Roman")) ; font name
4970 (ps-float-format (nth 6 text)
4972 (ps-float-format (nth 5 text) 0.85) ; gray
4973 (ps-float-format (nth 1 text) "0") ; x position
4974 (ps-float-format (nth 2 text) "0") ; y position
4976 (ps-background-pages (nthcdr 7 text) ; page list
4978 ps-background-text-count)))
4979 ps-print-background-text))
5507 ps-background-text-count 0
5529 (append (ps-fonts 'ps-font-for-text)
5530 (list (ps-font 'ps-font-for-header 'normal)
5531 (ps-font 'ps-font-for-header 'bold)
5544 (ps-insert-string ps-print-prologue-header)
5581 (format "/HeaderOffset %s def\n" ps-header-offset)
5582 (format "/HeaderPad %s def\n" ps-header-pad)
5588 (ps-output-boolean "SwitchHeader " (if (eq ps-switch-header 'duplex)
5590 ps-switch-header))
5591 (ps-output-boolean "PrintOnlyOneHeader" ps-print-only-one-header)
5592 (ps-output-boolean "PrintHeader " ps-print-header)
5593 (ps-output-boolean "PrintHeaderFrame " ps-print-header-frame)
5594 (ps-output-frame-properties "HeaderFrameProperties" ps-header-frame-alist)
5599 (let ((line-height (ps-line-height 'ps-font-for-text)))
5660 (ps-background-text)
5676 (append (ps-fonts 'ps-font-for-text)
5677 (list (ps-font 'ps-font-for-header 'normal)
5678 (ps-font 'ps-font-for-header 'bold)
5684 ps-header-title-font-size-internal
5685 (ps-font 'ps-font-for-header 'bold))
5687 ps-header-font-size-internal
5688 (ps-font 'ps-font-for-header 'normal))
5711 (let ((font (ps-font-alist 'ps-font-for-text))
5717 (ps-font 'ps-font-for-text (car (car font)))))
5778 (defun ps-header-dirpart ()
5905 ps-header-font-size-internal (ps-get-font-size 'ps-header-font-size)
5906 ps-header-title-font-size-internal
5907 (ps-get-font-size 'ps-header-title-font-size)
5962 (if ps-print-only-one-header
5982 (defun ps-header-sheet ()
5999 (defun ps-header-page ()
6010 (ps-header-sheet)
6028 (ps-header-page)
6033 (when ps-print-header
6034 (ps-generate-header "HeaderLinesLeft" "/h0" "/h1"
6035 (or ps-lh-cache ps-left-header))
6036 (ps-generate-header "HeaderLinesRight" "/h0" "/h1"
6037 (or ps-rh-cache ps-right-header))
6038 (ps-output (format "%d SetHeaderLines\n" ps-header-lines))
6043 (ps-generate-header "FooterLinesLeft" "/H0" "/H0"
6045 (ps-generate-header "FooterLinesRight" "/H0" "/H0"
6068 (lh (+ (ps-line-height 'ps-font-for-text)
6080 (let ((lh (+ (ps-line-height 'ps-font-for-text) ps-line-spacing-internal)))
6096 (ps-avg-char-width 'ps-font-for-text)))
6106 (ps-avg-char-width 'ps-font-for-text)))
6116 (ps-space-width 'ps-font-for-text)))
6320 (char-width (ps-avg-char-width 'ps-font-for-text))
6415 ((null face) ; print text with null face
6417 ((eq face 'emacs--invisible--face)) ; skip invisible text!!!
6418 (t ; otherwise, text has a valid face
6430 (ps-font-number 'ps-font-for-text
6594 ;; a face text property.
6596 (cond ((let ((prop (get-text-property from 'invisible)))
6598 ;; really makes the text invisible.
6604 ((get-text-property from 'face))
6607 (face-priority -1)) ; text-property
6732 (ps-header-sheet)
6763 (let ((coding-system-for-write 'raw-text-unix))
6770 (let* ((coding-system-for-write 'raw-text-unix)
6856 (setq ps-header-lines 3
6857 ps-left-header
6920 (setq ps-header-lines 3
6921 ps-left-header
6930 (setq ps-header-lines 3
6931 ps-left-header
6976 (setq ps-left-header
7021 ps-header-offset (/ (* 72 1.0) 2.54) ; 1.0 cm
7022 ps-header-line-pad .15
7023 ps-print-header t
7024 ps-print-header-frame t
7025 ps-header-lines 2
7031 ps-header-font-family 'Helvetica
7032 ps-header-font-size 6
7033 ps-header-title-font-size 8)
7073 (autoload 'ps-mule-encode-header-string "ps-mule"
7074 "Generate PostScript code for plotting characters in header STRING.