Function: cal-tex-daily-page

cal-tex-daily-page is a byte-compiled function defined in cal-tex.el.gz.

Signature

(cal-tex-daily-page THEDATE)

Documentation

Make a calendar page for Gregorian THEDATE on 8.5 by 11 paper.

Uses the 24-hour clock if cal-tex-24 is non-nil. Produces hourly sections for the period specified by cal-tex-daily-start and cal-tex-daily-end.

Source Code

;; Defined in /usr/src/emacs/lisp/calendar/cal-tex.el.gz
(defun cal-tex-daily-page (thedate)
  "Make a calendar page for Gregorian THEDATE on 8.5 by 11 paper.
Uses the 24-hour clock if `cal-tex-24' is non-nil.  Produces
hourly sections for the period specified by `cal-tex-daily-start'
and `cal-tex-daily-end'."
  (with-suppressed-warnings ((lexical date))
    (defvar date))                      ;For `cal-tex-daily-string'.
  (let* ((date thedate)
         (month-name (cal-tex-month-name (calendar-extract-month date)))
         (i (1- cal-tex-daily-start))
         hour)
    (cal-tex-banner "cal-tex-daily-page")
    (cal-tex-b-makebox "4cm" "l")
    (cal-tex-b-parbox "b" "3.8cm")
    (cal-tex-rule "0mm" "0mm" "2cm")
    (cal-tex-Huge (number-to-string (calendar-extract-day date)))
    (cal-tex-nl ".5cm")
    (cal-tex-bf month-name )
    (cal-tex-e-parbox)
    (cal-tex-hspace "1cm")
    (cal-tex-scriptsize (eval cal-tex-daily-string t))
    (cal-tex-hspace "3.5cm")
    (cal-tex-e-makebox)
    (cal-tex-hfill)
    (cal-tex-b-makebox "4cm" "r")
    (cal-tex-bf (cal-tex-LaTeXify-string (calendar-day-name date)))
    (cal-tex-e-makebox)
    (cal-tex-nl)
    (cal-tex-hspace ".4cm")
    (cal-tex-rule "0mm" "16.1cm" "1mm")
    (cal-tex-nl ".1cm")
    (while (<= (setq i (1+ i)) cal-tex-daily-end)
      (cal-tex-cmd "\\noindent")
      (setq hour (if cal-tex-24
                     i
                   (mod i 12)))
      (if (zerop hour) (setq hour 12))
      (cal-tex-b-makebox "1cm" "c")
      (cal-tex-arg (number-to-string hour))
      (cal-tex-e-makebox)
      (cal-tex-rule "0mm" "15.5cm" ".2mm")
      (cal-tex-nl ".2cm")
      (cal-tex-b-makebox "1cm" "c")
      (cal-tex-arg "$\\diamond$" )
      (cal-tex-e-makebox)
      (cal-tex-rule "0mm" "15.5cm" ".2mm")
      (cal-tex-nl ".2cm"))
    (cal-tex-hfill)
    (insert (cal-tex-mini-calendar
             (calendar-extract-month (cal-tex-previous-month date))
             (calendar-extract-year (cal-tex-previous-month date))
             "lastmonth" "1.1in" "1in"))
    (insert (cal-tex-mini-calendar
             (calendar-extract-month date)
             (calendar-extract-year date)
             "thismonth" "1.1in" "1in"))
    (insert (cal-tex-mini-calendar
             (calendar-extract-month (cal-tex-next-month date))
             (calendar-extract-year (cal-tex-next-month date))
             "nextmonth" "1.1in" "1in"))
    (insert "\\hbox to \\textwidth{")
    (cal-tex-hfill)
    (insert "\\lastmonth")
    (cal-tex-hfill)
    (insert "\\thismonth")
    (cal-tex-hfill)
    (insert "\\nextmonth")
    (cal-tex-hfill)
    (insert "}")
    (cal-tex-banner "end of cal-tex-daily-page")))