Function: cal-tex-insert-preamble
cal-tex-insert-preamble is a byte-compiled function defined in
cal-tex.el.gz.
Signature
(cal-tex-insert-preamble WEEKS &optional CLASS-OPTIONS APPEND)
Documentation
Initialize the output LaTeX calendar buffer, cal-tex-buffer.
Select the output buffer, and insert the preamble for a calendar of WEEKS weeks. Pass string CLASS-OPTIONS as options for the article document class. If it contains "landscape", use the geometry package to produce landscape format. Optional argument APPEND, if non-nil, means add to end of buffer without erasing current contents.
Source Code
;; Defined in /usr/src/emacs/lisp/calendar/cal-tex.el.gz
(defun cal-tex-insert-preamble (weeks &optional class-options append)
"Initialize the output LaTeX calendar buffer, `cal-tex-buffer'.
Select the output buffer, and insert the preamble for a calendar
of WEEKS weeks. Pass string CLASS-OPTIONS as options for the
article document class. If it contains \"landscape\", use the
geometry package to produce landscape format. Optional argument
APPEND, if non-nil, means add to end of buffer without erasing
current contents."
(let ((landscape (and class-options
(string-match "\\<landscape\\>" class-options)))
(width "18cm")
(height "24cm"))
(when landscape
(let ((swap width))
(setq width height height swap)))
(unless append
(cal-tex-preamble class-options)
(if (not landscape)
(progn
(cal-tex-cmd "\\oddsidemargin -1.75cm")
(cal-tex-cmd "\\def\\holidaymult" ".06"))
(cal-tex-cmd "\\textwidth 9.5in")
(cal-tex-cmd "\\textheight 7in")
(cal-tex-comment)
(cal-tex-cmd "\\def\\holidaymult" ".08"))
(cal-tex-cmd cal-tex-caldate)
(cal-tex-cmd cal-tex-myday)
(cal-tex-b-document)
(cal-tex-cmd "\\pagestyle" "empty"))
(cal-tex-cmd "\\setlength{\\cellwidth}" width)
(insert (format "\\setlength{\\cellwidth}{%f\\cellwidth}\n"
(/ 1.1 (length cal-tex-which-days))))
(cal-tex-cmd "\\setlength{\\cellheight}" height)
(insert (format "\\setlength{\\cellheight}{%f\\cellheight}\n"
(/ 1.0 weeks)))
(cal-tex-cmd "\\ \\par")
(cal-tex-vspace "-3cm")))