• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/emacs-93/emacs/lisp/

Lines Matching +defs:odd +defs:page

97 ;; (it's easier to pick up one 50-page printout than to find 50 single-page
235 ;; on the page: nil means `portrait' mode, non-nil means `landscape' mode.
241 ;; of the page and the printed header, whatever the orientation is.
253 ;; printing page: nil means `normal' printing, non-nil means `upside-down'
254 ;; printing (that is, the page is rotated by 180 grades). The default value is
261 ;; integer or a cons cell (FROM . TO) designating FROM page to TO page; any
270 ;; The variable `ps-even-or-odd-pages' specifies if it prints even/odd pages.
276 ;; even-page print only even pages.
278 ;; odd-page print only odd pages.
282 ;; odd-sheet print only odd sheets.
286 ;; See `ps-even-or-odd-pages' for more detailed documentation.
335 ;; the top margin is the margin between the top of the page and the printed
337 ;; the bottom margin is the margin between the bottom of the page and the
345 ;; page; the default headers contain the following four items: on the left, the
347 ;; directory; on the right, the page number and date of printing. The default
354 ;; page numbers are toward the outside (cf. `ps-spool-duplex').
389 ;; To print only one header at the top of each page, set
411 ;; Page numbers are printed in `n/m' format, indicating page n of m pages; to
412 ;; omit the total page count and just print the page number, set
417 ;; will show only the buffer name and page number. To show more, set
473 ;; As a footer example, if you want to have a centered page number in the
584 ;; duplex and page size. Valid values are:
586 ;; lpr-switches duplex and page size are configured by `ps-lpr-switches'.
590 ;; setpagedevice duplex and page size are configured by ps-print using the
593 ;; nil duplex and page size are configured by ps-print *not* using
610 ;; The variable `ps-spool-tumble' specifies how the page images on opposite
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
619 ;; this behavior, set variable `ps-banner-page-when-duplexing' to t.
621 ;; When `ps-banner-page-when-duplexing' is non-nil, it prints a blank page as
622 ;; the very first printed page. So, it behaves as the very first character of
625 ;; The default for `ps-banner-page-when-duplexing' is nil (*don't* skip the
626 ;; very first page).
643 ;; page. The default is t.
645 ;; The variable `ps-n-up-filling' specifies how page matrix is filled on each
647 ;; filling example using a 3x4 page matrix:
795 ;; Each rectangle extends all the way across the page.
811 ;; on next page. Visually, valid values are (the character `+' at right of
859 ;; If `ps-n-up-printing' is equal to 1, `ps-print-begin-page-hook' is never
862 ;; `ps-print-begin-page-hook'
863 ;; It is evaluated on each beginning of page, except in the beginning of
864 ;; page that `ps-print-begin-sheet-hook' is evaluated.
868 ;; column that `ps-print-begin-page-hook' is evaluated or that
938 ;; correctly place line and page breaks.
952 ;; You should read the following on the output page:
1131 ;; "special" on page 5 and from page 11 to page 17, we could specify:
1140 ;; 5 (11 . 17)) ; page list
1144 ;; image "~/images/EPS-image2.ps" on page 5 and from page 11 to page 17, we
1154 ;; 5 (11 . 17)) ; page list
1166 ;; 5. Print background texts only for current page (if any)
1167 ;; 6. Print background images only for current page (if any)
1204 ;; Configurable headers with page numbers.
1240 ;; `ps-even-or-odd-pages'
1258 ;; `ps-banner-page-when-duplexing' and `ps-zebra-color'.
1287 ;; Hooks: `ps-print-hook', `ps-print-begin-page-hook' and
1289 ;; Put one header per page over the columns.
1307 ;; Tools for page setup.
1345 ;; Avoid page break inside a paragraph.
1385 ;; prologue code suggestion, for odd/even printing suggestion and for
1394 ;; last page.
1403 ;; header per page over the columns and correct line numbers when printing a
1560 "Horizontal page layout."
1567 "Vertical page layout."
1630 (defgroup ps-print-page nil
1843 ;; All page dimensions are in PostScript points.
1862 (defcustom ps-page-dimensions-database
1883 :group 'ps-print-page)
1888 Should be one of the paper types defined in `ps-page-dimensions-database', for
1892 ps-page-dimensions-database)
1897 :group 'ps-print-page)
1905 :group 'ps-print-page)
1911 :group 'ps-print-page)
1917 :group 'ps-print-page)
1925 designating FROM page to TO page; any invalid element is ignored, that is, an
1936 See also `ps-even-or-odd-pages'."
1944 :group 'ps-print-page)
1946 (defcustom ps-even-or-odd-pages nil
1947 "*Specify if it prints even/odd pages.
1953 `even-page' print only even pages.
1955 `odd-page' print only odd pages.
1958 That is, if `ps-n-up-printing' is 1, it behaves as `even-page';
1962 `odd-sheet' print only odd sheets.
1963 That is, if `ps-n-up-printing' is 1, it behaves as `odd-page';
1964 but for values greater than 1, it'll print only the odd sheet
1970 filtered by `ps-selected-pages' and then by `ps-even-or-odd-pages'. For
1975 Combining with `ps-even-or-odd-pages' and `ps-n-up-printing', we have:
1978 `ps-even-or-odd-pages' PAGES PRINTED
1980 even-page 4, 6, 8, 10, 12, 14, 16, 20
1981 odd-page 1, 7, 9, 13, 15
1983 odd-sheet 1, 7, 9, 13, 15
1986 `ps-even-or-odd-pages' PAGES PRINTED
1988 even-page 4/6, 8/10, 12/14, 16/20
1989 odd-page 1/7, 9/13, 15
1991 odd-sheet 1/4, 8/9, 13/14, 20
1993 So even-page/odd-page are about page parity and even-sheet/odd-sheet are about
1998 (const :tag "Only Even Pages" even-page)
1999 (const :tag "Only Odd Pages" odd-page)
2001 (const :tag "Only Odd Sheets" odd-sheet))
2003 :group 'ps-print-page)
2060 "*Non-nil means a border is drawn around each page."
2066 "*Specify how page matrix is filled on each sheet of paper.
2069 using a 3x4 page matrix:
2132 "*Specify how zebra stripes continue on next page.
2260 PAGES designates the page to print background image.
2261 PAGES may be a number or a cons cell (FROM . TO) designating FROM page to TO
2262 page.
2311 PAGES designates the page to print background text.
2312 PAGES may be a number or a cons cell (FROM . TO) designating FROM page to TO
2313 page.
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
2518 "*Number of lines to display in page header, when generating PostScript."
2524 "*Non-nil means print a footer at the bottom of each page.
2525 By default, the footer displays page number.
2600 "*Number of lines to display in page footer, when generating PostScript."
2606 "*Non-nil means print only one header/footer at the top/bottom of each page.
2638 "*Non-nil means show page numbers as N/M, meaning page N of M.
2639 NOTE: page numbers are displayed as part of headers,
2649 "*Specify who is responsible for setting duplex and page size.
2653 `lpr-switches' duplex and page size are configured by `ps-lpr-switches'.
2657 `setpagedevice' duplex and page size are configured by ps-print using the
2660 nil duplex and page size are configured by ps-print *not* using
2686 start on the right page. Also, if headers are turned on, the headers will be
2687 reversed on duplex printers so that the page numbers fall to the left on
2696 "*Specify how the page images on opposite sides of a sheet are oriented.
3185 "*The items to display (each on a line) on the left part of the page header.
3210 "*The items to display (each on a line) on the right part of the page header.
3240 "*The items to display (each on a line) on the left part of the page footer.
3265 "*The items to display (each on a line) on the right part of the page footer.
3332 (defcustom ps-banner-page-when-duplexing nil
3333 "*Non-nil means the very first page is skipped.
3660 '(30 . ps-banner-page-when-duplexing)
3688 '(23 . ps-even-or-odd-pages)
3702 ;; ps-page-dimensions-database
3986 (defvar ps-page-postscript 0) ; page number
3987 (defvar ps-page-order 0) ; PostScript page counter
3988 (defvar ps-page-sheet 0) ; sheet counter
3989 (defvar ps-page-column 0) ; column counter
3990 (defvar ps-page-printed 0) ; total pages printed
3991 (defvar ps-page-n-up 0) ; n-up counter
3994 (defvar ps-first-page nil)
3995 (defvar ps-last-page nil)
3996 (defvar ps-print-page-p t)
4041 (defmacro ps-page-dimensions-get-width (dims) `(nth 0 ,dims))
4042 (defmacro ps-page-dimensions-get-height (dims) `(nth 1 ,dims))
4043 (defmacro ps-page-dimensions-get-media (dims) `(nth 2 ,dims))
4045 (defvar ps-landscape-page-height nil)
4261 (defvar ps-print-begin-page-hook nil)
4352 point at which page-breaks are placed.
4360 point at which page-breaks are placed.
4392 (print-width (progn (ps-get-page-dimensions)
4443 (page-height (progn (ps-get-page-dimensions)
4448 nb-lpp-max ; maximum nb of lines per page
4449 nb-page-min ; minimum nb of pages
4452 nb-lpp-min ; minimum nb of lines per page
4453 nb-page-max ; maximum nb of pages
4456 nb-lpp ; current nb of lines per page
4457 nb-page ; current nb of pages
4460 nb-lpp-max (floor (/ page-height lh-min))
4461 nb-page-min (ceiling (/ (float nb-lines) nb-lpp-max))
4463 nb-lpp-min (floor (/ page-height lh-max))
4464 nb-page-max (ceiling (/ (float nb-lines) nb-lpp-min))
4465 nb-page nb-page-min)
4471 "nb page / font size\n")
4472 (while (<= nb-page nb-page-max)
4473 (setq nb-lpp (ceiling (/ nb-lines (float nb-page)))
4474 lh (/ page-height nb-lpp)
4476 (insert (format "%7d %s\n" nb-page fs))
4477 (setq nb-page (1+ nb-page)))
4499 (defun ps-get-page-dimensions ()
4500 (let ((page-dimensions (cdr (assq ps-paper-type ps-page-dimensions-database)))
4501 page-width page-height)
4503 ((null page-dimensions)
4505 (mapcar 'car ps-page-dimensions-database)))
4518 (setq page-width (ps-page-dimensions-get-width page-dimensions)
4519 page-height (ps-page-dimensions-get-height page-dimensions))
4524 (setq page-width (prog1 page-height (setq page-height page-width))))
4527 (setq ps-landscape-page-height page-height)
4530 ;; page-width == lm + n * pw + (n - 1) * ic + rm
4531 ;; => pw == (page-width - lm -rm - (n - 1) * ic) / n
4532 (setq ps-print-width (/ (- page-width
4538 page-width == %s
4544 page-width == lm + n * print-width + (n - 1) * ic + rm
4546 page-width
4554 (- page-height ps-bottom-margin ps-top-margin))
4559 page-height == bm + print-height + tm
4583 page-height == bm + print-height + tm - ho - hh
4613 page-height == bm + print-height + tm - fo - fh
4637 page-height == ((floor print-height ((th + ls) * zh)) * ((th + ls) * zh)) - th
4739 (setq ps-first-page (car (car ps-selected-pages))
4740 ps-last-page (cdr (car ps-selected-pages))
4743 (< ps-last-page ps-page-postscript)))))
4746 (defsubst ps-print-page-p ()
4747 (setq ps-print-page-p
4748 (and (cond ((null ps-first-page))
4749 ((<= ps-page-postscript ps-last-page)
4750 (<= ps-first-page ps-page-postscript))
4753 (and (<= ps-first-page ps-page-postscript)
4754 (<= ps-page-postscript ps-last-page)))
4757 (cond ((eq ps-even-or-odd-pages 'even-page)
4758 (= (logand ps-page-postscript 1) 0))
4759 ((eq ps-even-or-odd-pages 'odd-page)
4760 (= (logand ps-page-postscript 1) 1))
4766 (setq ps-print-page-p
4767 (cond ((eq ps-even-or-odd-pages 'even-sheet)
4768 (= (logand ps-page-sheet 1) 0))
4769 ((eq ps-even-or-odd-pages 'odd-sheet)
4770 (= (logand ps-page-sheet 1) 1))
4776 (when ps-print-page-p
4907 (defun ps-background-pages (page-list func)
4908 (if page-list
4915 page-list)
4976 (ps-background-pages (nthcdr 7 text) ; page list
5017 (ps-background-pages (nthcdr 6 image) ; page list
5023 (defun ps-background (page-number)
5026 (and (<= (aref range 0) page-number)
5027 (<= page-number (aref range 1))
5347 "Alist which is the page matrix database used for N-up printing.
5356 PAGE is the page size used (see `ps-paper-type').
5357 MAX is the maximum elements of this page matrix.
5358 LANDSCAPE specifies if page matrix is landscaped, has the following valid
5362 pag the sheet is in portrait mode and page is in landscape mode.
5363 LINES is the number of lines of page matrix.
5364 COLUMNS is the number of columns of page matrix.
5377 ;; find suitable page matrix for a given `ps-paper-type'.
5471 XSTART YSTART are the relative position for the first page in a sheet.")
5505 (setq ps-page-order 0
5506 ps-page-printed 0
5512 (let ((dimensions (cdr (assq ps-paper-type ps-page-dimensions-database)))
5536 "\n%%DocumentMedia: " (ps-page-dimensions-get-media dimensions)
5537 (format " %d" (round (ps-page-dimensions-get-width dimensions)))
5538 (format " %d" (round (ps-page-dimensions-get-height dimensions)))
5547 (ps-page-dimensions-get-media dimensions)
5567 (format "/LandscapePageHeight %s def\n" ps-landscape-page-height)
5744 (and ps-banner-page-when-duplexing
5855 (let (new page)
5857 (setq page (car ps-selected-pages)
5859 (cond ((integerp page)
5860 (and (> page 0)
5861 (setq new (cons (cons page page) new))))
5862 ((consp page)
5863 (and (integerp (car page)) (integerp (cdr page))
5864 (> (car page) 0)
5865 (<= (car page) (cdr page))
5866 (setq new (cons page new))))))
5870 ps-first-page nil
5871 ps-last-page nil))
5893 ps-page-postscript 0
5894 ps-page-sheet 0
5895 ps-page-n-up 0
5896 ps-page-column 0
5898 ps-print-page-p t
5950 ;; initialize page dimensions
5951 (ps-get-page-dimensions)
5958 "Text won't appear on page. Please, check these variables."))))
5961 (defun ps-page-number ()
5963 (1+ (/ (1- ps-page-column) ps-number-of-columns))
5964 ps-page-column))
5967 (defsubst ps-end-page ()
5971 (defsubst ps-next-page ()
5972 (ps-end-page)
5974 (ps-begin-page))
5978 (and ps-print-page-p (> ps-page-sheet 0)
5985 (setq ps-page-sheet (1+ ps-page-sheet))
5987 (setq ps-page-order (1+ ps-page-order))
5990 ps-page-order ps-page-postscript ps-page-order)
5992 ps-page-postscript ps-page-order))
5993 ;; spooling needs to redefine Lines and PageCount on each page
5999 (defun ps-header-page ()
6000 ;; set total line and page number when printing has finished
6002 (if (zerop (mod ps-page-column ps-number-of-columns))
6004 (setq ps-page-postscript (1+ ps-page-postscript))
6005 (when (ps-print-page-p)
6007 (if (zerop (mod ps-page-n-up ps-n-up-printing))
6012 ;; Print only when a new page begins.
6014 (run-hooks 'ps-print-begin-page-hook))
6015 (ps-background ps-page-postscript)
6016 (setq ps-page-n-up (1+ ps-page-n-up))
6017 (and ps-print-page-p
6018 (setq ps-page-printed (1+ ps-page-printed)))))
6022 (setq ps-page-column (1+ ps-page-column)))
6024 (defun ps-begin-page ()
6028 (ps-header-page)
6031 (format "/PageNumber %d def\n" (ps-page-number)))
6055 (ps-mule-begin-page))
6073 (ps-next-page)
6082 (ps-next-page)
6252 ;; \n\ftext\n ==>> next page, but keep line counting!!
6255 (ps-next-page))
6261 ;; do not skip page if previous character is NEWLINE and
6262 ;; it is a beginning of page.
6268 (ps-next-page)))
6681 (let ((ps-print-page-p t)
6682 ps-even-or-odd-pages)
6689 (ps-begin-page)
6691 (ps-end-page)
6711 (let ((ps-print-page-p t))
6714 (let ((pages-per-sheet (mod ps-page-printed ps-n-up-printing))
6716 (total-pages (ps-page-number)))
6719 ;; Back to the PS output buffer to set the last page n-up printing
6724 ;; Back to the PS output buffer to set the page count
6729 ;; Set dummy page
6730 (and ps-spool-duplex (= (mod ps-page-order 2) 1)
6736 (ps-end-page)))
6742 ps-banner-page-when-duplexing)
6743 (1+ ps-page-order)
6744 ps-page-order))
7070 (autoload 'ps-mule-begin-page "ps-mule"
7071 "Initialize multi-byte charset for printing current page.")