Function: cal-tex-week-hours
cal-tex-week-hours is a byte-compiled function defined in
cal-tex.el.gz.
Signature
(cal-tex-week-hours THEDATE HOLIDAYS HEIGHT)
Documentation
Insert hourly entries for THEDATE with HOLIDAYS, with line height HEIGHT.
Uses the 24-hour clock if cal-tex-24 is non-nil. Note that the hours
shown are hard-coded to 8-12, 13-17.
Source Code
;; Defined in /usr/src/emacs/lisp/calendar/cal-tex.el.gz
;; TODO respect cal-tex-daily-start,end?
;; Using different numbers of hours will probably break some layouts.
(defun cal-tex-week-hours (thedate holidays height)
"Insert hourly entries for THEDATE with HOLIDAYS, with line height HEIGHT.
Uses the 24-hour clock if `cal-tex-24' is non-nil. Note that the hours
shown are hard-coded to 8-12, 13-17."
(with-suppressed-warnings ((lexical date))
(defvar date)) ;For `cal-tex-daily-string'.
(let* ((date thedate)
(month (calendar-extract-month date))
(day (calendar-extract-day date))
;; (year (calendar-extract-year date))
morning afternoon s)
(cal-tex-comment "begin cal-tex-week-hours")
(cal-tex-cmd "\\ \\\\[-.2cm]")
(cal-tex-cmd "\\noindent")
(cal-tex-b-parbox "l" "6.8in")
(cal-tex-large-bf (cal-tex-LaTeXify-string (calendar-day-name date)))
(insert ", ")
(cal-tex-large-bf (cal-tex-month-name month))
(insert "\\ ")
(cal-tex-large-bf (number-to-string day))
(unless (string-equal "" (setq s (cal-tex-latexify-list
holidays date "; ")))
(insert ": ")
(cal-tex-large-bf s))
(cal-tex-hfill)
(insert " " (eval cal-tex-daily-string t))
(cal-tex-e-parbox)
(cal-tex-nl "-.3cm")
(cal-tex-rule "0pt" "6.8in" ".2mm")
(cal-tex-nl "-.1cm")
(dotimes (i 5)
(setq morning (+ i 8) ; 8-12 incl
afternoon (if cal-tex-24
(+ i 13) ; 13-17 incl
(1+ i))) ; 1-5 incl
(cal-tex-cmd "\\hourbox" (number-to-string morning))
(cal-tex-arg height)
(cal-tex-hspace ".4cm")
(cal-tex-cmd "\\hourbox" (number-to-string afternoon))
(cal-tex-arg height)
(cal-tex-nl))))