[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/calendar/cal-tex.el
From: |
Richard M. Stallman |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/calendar/cal-tex.el |
Date: |
Wed, 03 Apr 2002 09:35:33 -0500 |
Index: emacs/lisp/calendar/cal-tex.el
diff -c emacs/lisp/calendar/cal-tex.el:1.21 emacs/lisp/calendar/cal-tex.el:1.22
*** emacs/lisp/calendar/cal-tex.el:1.21 Mon Jul 16 03:46:48 2001
--- emacs/lisp/calendar/cal-tex.el Wed Apr 3 09:35:33 2002
***************
*** 119,124 ****
--- 119,153 ----
:type 'integer
:group 'calendar-tex)
+ (defcustom cal-tex-hook nil
+ "*List of functions called after any LaTeX calendar buffer is generated.
+ You can use this to do postprocessing on the buffer. For example, to change
+ characters with diacritical marks to their LaTeX equivalents, use
+ (add-hook 'cal-tex-hook
+ '(lambda () (iso-iso2tex (point-min) (point-max))))"
+ :type 'hook
+ :group 'calendar-tex)
+
+ (defcustom cal-tex-year-hook nil
+ "*List of functions called after a LaTeX year calendar buffer is generated."
+ :type 'hook
+ :group 'calendar-tex)
+
+ (defcustom cal-tex-month-hook nil
+ "*List of functions called after a LaTeX month calendar buffer is
generated."
+ :type 'hook
+ :group 'calendar-tex)
+
+ (defcustom cal-tex-week-hook nil
+ "*List of functions called after a LaTeX week calendar buffer is generated."
+ :type 'hook
+ :group 'calendar-tex)
+
+ (defcustom cal-tex-daily-hook nil
+ "*List of functions called after a LaTeX daily calendar buffer is
generated."
+ :type 'hook
+ :group 'calendar-tex)
+
;;;
;;; Definitions for LaTeX code
;;;
***************
*** 219,225 ****
Optional ARGS are included."
(set-buffer (get-buffer-create cal-tex-buffer))
(erase-buffer)
! (insert "\\documentstyle")
(if args
(insert "[" args "]"))
(insert "{article}\n"
--- 248,254 ----
Optional ARGS are included."
(set-buffer (get-buffer-create cal-tex-buffer))
(erase-buffer)
! (insert "\\documentclass")
(if args
(insert "[" args "]"))
(insert "{article}\n"
***************
*** 253,266 ****
(defun cal-tex-cursor-year (&optional arg)
"Make a buffer with LaTeX commands for the year cursor is on.
Optional prefix argument specifies number of years."
! (interactive "P")
(cal-tex-year (extract-calendar-year (calendar-cursor-to-date t))
(if arg arg 1)))
(defun cal-tex-cursor-year-landscape (&optional arg)
"Make a buffer with LaTeX commands for the year cursor is on.
Optional prefix argument specifies number of years."
! (interactive "P")
(cal-tex-year (extract-calendar-year (calendar-cursor-to-date t))
(if arg arg 1)
t))
--- 282,295 ----
(defun cal-tex-cursor-year (&optional arg)
"Make a buffer with LaTeX commands for the year cursor is on.
Optional prefix argument specifies number of years."
! (interactive "p")
(cal-tex-year (extract-calendar-year (calendar-cursor-to-date t))
(if arg arg 1)))
(defun cal-tex-cursor-year-landscape (&optional arg)
"Make a buffer with LaTeX commands for the year cursor is on.
Optional prefix argument specifies number of years."
! (interactive "p")
(cal-tex-year (extract-calendar-year (calendar-cursor-to-date t))
(if arg arg 1)
t))
***************
*** 304,310 ****
(defun cal-tex-cursor-filofax-year (&optional arg)
"Make a Filofax one page yearly calendar of year indicated by cursor.
Optional parameter specifies number of years."
! (interactive "P")
(let* ((n (if arg arg 1))
(year (extract-calendar-year (calendar-cursor-to-date t))))
(cal-tex-preamble "twoside")
--- 333,339 ----
(defun cal-tex-cursor-filofax-year (&optional arg)
"Make a Filofax one page yearly calendar of year indicated by cursor.
Optional parameter specifies number of years."
! (interactive "p")
(let* ((n (if arg arg 1))
(year (extract-calendar-year (calendar-cursor-to-date t))))
(cal-tex-preamble "twoside")
***************
*** 325,334 ****
(insert "\n")
(cal-tex-noindent)
(cal-tex-nl)
! (calendar-for-loop i from 1 to 12 do
! (insert (cal-tex-mini-calendar i year
! (calendar-month-name i)
! "1in" ".9in" "tiny" "0.6mm")))
(insert
"\\noindent\\fbox{\\January}\\fbox{\\February}\\fbox{\\March}\\\\
\\noindent\\fbox{\\April}\\fbox{\\May}\\fbox{\\June}\\\\
--- 354,366 ----
(insert "\n")
(cal-tex-noindent)
(cal-tex-nl)
! (let ((month-names; don't use default in case user changed it
! ["January" "February" "March" "April" "May" "June"
! "July" "August" "September" "October" "November" "December"]))
! (calendar-for-loop i from 1 to 12 do
! (insert (cal-tex-mini-calendar i year
! (aref month-names (1- i))
! "1in" ".9in" "tiny" "0.6mm"))))
(insert
"\\noindent\\fbox{\\January}\\fbox{\\February}\\fbox{\\March}\\\\
\\noindent\\fbox{\\April}\\fbox{\\May}\\fbox{\\June}\\\\
***************
*** 353,359 ****
"Make a buffer with LaTeX commands for the month cursor is on.
Optional prefix argument specifies number of months to be produced.
The output is in landscape format, one month to a page."
! (interactive "P")
(let* ((n (if arg arg 1))
(date (calendar-cursor-to-date t))
(month (extract-calendar-month date))
--- 385,391 ----
"Make a buffer with LaTeX commands for the month cursor is on.
Optional prefix argument specifies number of months to be produced.
The output is in landscape format, one month to a page."
! (interactive "p")
(let* ((n (if arg arg 1))
(date (calendar-cursor-to-date t))
(month (extract-calendar-month date))
***************
*** 414,420 ****
year)))
7)))
(insert "\\vspace*{-\\cellwidth}\\hspace*{-2\\cellwidth}"
! "\\lastmonth\\nextmonth"))
(if (/= i n)
(progn
(run-hooks 'cal-tex-month-hook)
--- 446,453 ----
year)))
7)))
(insert "\\vspace*{-\\cellwidth}\\hspace*{-2\\cellwidth}"
! "\\lastmonth\\nextmonth%
! "))
(if (/= i n)
(progn
(run-hooks 'cal-tex-month-hook)
***************
*** 430,436 ****
"Make a buffer with LaTeX commands for the month cursor is on.
Optional prefix argument specifies number of months to be produced.
Calendar is condensed onto one page."
! (interactive "P")
(let* ((date (calendar-cursor-to-date t))
(month (extract-calendar-month date))
(year (extract-calendar-year date))
--- 463,469 ----
"Make a buffer with LaTeX commands for the month cursor is on.
Optional prefix argument specifies number of months to be produced.
Calendar is condensed onto one page."
! (interactive "p")
(let* ((date (calendar-cursor-to-date t))
(month (extract-calendar-month date))
(year (extract-calendar-year date))
***************
*** 470,475 ****
--- 503,517 ----
(setq other-year year)
(cal-tex-insert-days month year diary-list holidays
cal-tex-day-prefix)
+ (if (= (mod (calendar-absolute-from-gregorian
+ (list month
+ (calendar-last-day-of-month month year)
+ year))
+ 7)
+ 6); last day of month was Saturday
+ (progn
+ (cal-tex-hfill)
+ (cal-tex-nl)))
(increment-calendar-month month year 1))
(cal-tex-insert-blank-days-at-end end-month end-year cal-tex-day-prefix)
(cal-tex-end-document)))
***************
*** 491,497 ****
(setq date (list month i year))
(if (memq (calendar-day-of-week date) cal-tex-which-days)
(progn
! (insert (format day-format (calendar-month-name month) i))
(cal-tex-arg (cal-tex-latexify-list diary-list date))
(cal-tex-arg (cal-tex-latexify-list holidays date))
(cal-tex-arg (eval cal-tex-daily-string))
--- 533,539 ----
(setq date (list month i year))
(if (memq (calendar-day-of-week date) cal-tex-which-days)
(progn
! (insert (format day-format (cal-tex-month-name month) i))
(cal-tex-arg (cal-tex-latexify-list diary-list date))
(cal-tex-arg (cal-tex-latexify-list holidays date))
(cal-tex-arg (eval cal-tex-daily-string))
***************
*** 508,523 ****
(calendar-for-loop i from 0 to 6 do
(if (memq i cal-tex-which-days)
(insert (format cal-tex-day-name-format
! (aref calendar-day-name-array
! (mod (+ calendar-week-start-day i) 7)))))
(cal-tex-comment)))
(defun cal-tex-insert-month-header (n month year end-month end-year)
"Create a title for a calendar.
A title is inserted for a calendar with N months starting with
MONTH YEAR and ending with END-MONTH END-YEAR."
! (let ( (month-name (calendar-month-name month))
! (end-month-name (calendar-month-name end-month)))
(if (= 1 n)
(insert (format "\\calmonth{%s}{%s}\n\\vspace*{-0.5cm}"
month-name year) )
--- 550,566 ----
(calendar-for-loop i from 0 to 6 do
(if (memq i cal-tex-which-days)
(insert (format cal-tex-day-name-format
! (cal-tex-LaTeXify-string
! (aref calendar-day-name-array
! (mod (+ calendar-week-start-day i) 7))))))
(cal-tex-comment)))
(defun cal-tex-insert-month-header (n month year end-month end-year)
"Create a title for a calendar.
A title is inserted for a calendar with N months starting with
MONTH YEAR and ending with END-MONTH END-YEAR."
! (let ((month-name (cal-tex-month-name month))
! (end-month-name (cal-tex-month-name end-month)))
(if (= 1 n)
(insert (format "\\calmonth{%s}{%s}\n\\vspace*{-0.5cm}"
month-name year) )
***************
*** 611,617 ****
It applies to the week that point is in.
Optional prefix argument specifies number of weeks.
Holidays are included if `cal-tex-holidays' is t."
! (interactive "P")
(let* ((n (if arg arg 1))
(date (calendar-gregorian-from-absolute
(calendar-dayname-on-or-before
--- 654,660 ----
It applies to the week that point is in.
Optional prefix argument specifies number of weeks.
Holidays are included if `cal-tex-holidays' is t."
! (interactive "p")
(let* ((n (if arg arg 1))
(date (calendar-gregorian-from-absolute
(calendar-dayname-on-or-before
***************
*** 637,643 ****
(cal-tex-vspace "-1.5in")
(cal-tex-b-center)
(cal-tex-Huge-bf (format "\\uppercase{%s}"
! (calendar-month-name month)))
(cal-tex-hspace "2em")
(cal-tex-Huge-bf (number-to-string year))
(cal-tex-nl ".5cm")
--- 680,686 ----
(cal-tex-vspace "-1.5in")
(cal-tex-b-center)
(cal-tex-Huge-bf (format "\\uppercase{%s}"
! (cal-tex-month-name month)))
(cal-tex-hspace "2em")
(cal-tex-Huge-bf (number-to-string year))
(cal-tex-nl ".5cm")
***************
*** 662,668 ****
It applies to the week that point is in.
Optional prefix argument specifies number of weeks.
Holidays are included if `cal-tex-holidays' is t."
! (interactive "P")
(let* ((n (if arg arg 1))
(date (calendar-gregorian-from-absolute
(calendar-dayname-on-or-before
--- 705,711 ----
It applies to the week that point is in.
Optional prefix argument specifies number of weeks.
Holidays are included if `cal-tex-holidays' is t."
! (interactive "p")
(let* ((n (if arg arg 1))
(date (calendar-gregorian-from-absolute
(calendar-dayname-on-or-before
***************
*** 689,695 ****
(cal-tex-vspace "-1.5in")
(cal-tex-b-center)
(cal-tex-Huge-bf (format "\\uppercase{%s}"
! (calendar-month-name month)))
(cal-tex-hspace "2em")
(cal-tex-Huge-bf (number-to-string year))
(cal-tex-nl ".5cm")
--- 732,738 ----
(cal-tex-vspace "-1.5in")
(cal-tex-b-center)
(cal-tex-Huge-bf (format "\\uppercase{%s}"
! (cal-tex-month-name month)))
(cal-tex-hspace "2em")
(cal-tex-Huge-bf (number-to-string year))
(cal-tex-nl ".5cm")
***************
*** 742,748 ****
Optional prefix argument specifies number of weeks.
Diary entries are included if `cal-tex-diary' is t.
Holidays are included if `cal-tex-holidays' is t."
! (interactive "P")
(let* ((n (if arg arg 1))
(date (calendar-gregorian-from-absolute
(calendar-dayname-on-or-before
--- 785,791 ----
Optional prefix argument specifies number of weeks.
Diary entries are included if `cal-tex-diary' is t.
Holidays are included if `cal-tex-holidays' is t."
! (interactive "p")
(let* ((n (if arg arg 1))
(date (calendar-gregorian-from-absolute
(calendar-dayname-on-or-before
***************
*** 788,796 ****
(cal-tex-rule "0pt" "\\textwidth" ".2mm")
(cal-tex-nl)
(cal-tex-b-parbox "t" "\\textwidth")
! (cal-tex-large-bf (calendar-day-name date))
(insert ", ")
! (cal-tex-large-bf (calendar-month-name month))
(insert " ")
(cal-tex-large-bf (number-to-string day))
(if (not (string= "" (cal-tex-latexify-list holidays date)))
--- 831,839 ----
(cal-tex-rule "0pt" "\\textwidth" ".2mm")
(cal-tex-nl)
(cal-tex-b-parbox "t" "\\textwidth")
! (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))
(if (not (string= "" (cal-tex-latexify-list holidays date)))
***************
*** 842,850 ****
(cal-tex-cmd "\\ \\\\[-.2cm]")
(cal-tex-cmd "\\noindent")
(cal-tex-b-parbox "l" "6.8in")
! (cal-tex-large-bf (calendar-day-name date))
(insert ", ")
! (cal-tex-large-bf (calendar-month-name month))
(insert " ")
(cal-tex-large-bf (number-to-string day))
(if (not (string= "" (cal-tex-latexify-list holidays date)))
--- 885,893 ----
(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))
(if (not (string= "" (cal-tex-latexify-list holidays date)))
***************
*** 873,879 ****
It applies to the week that point is in, and starts on Monday.
Optional prefix argument specifies number of weeks.
Holidays are included if `cal-tex-holidays' is t."
! (interactive "P")
(let* ((n (if arg arg 1))
(date (calendar-gregorian-from-absolute
(calendar-dayname-on-or-before
--- 916,922 ----
It applies to the week that point is in, and starts on Monday.
Optional prefix argument specifies number of weeks.
Holidays are included if `cal-tex-holidays' is t."
! (interactive "p")
(let* ((n (if arg arg 1))
(date (calendar-gregorian-from-absolute
(calendar-dayname-on-or-before
***************
*** 911,922 ****
(day (extract-calendar-day date))
(month (extract-calendar-month date))
(year (extract-calendar-year date))
! (dayname (calendar-day-name date))
(date1 (cal-tex-incr-date date))
(day1 (extract-calendar-day date1))
(month1 (extract-calendar-month date1))
(year1 (extract-calendar-year date1))
! (dayname1 (calendar-day-name date1))
)
(cal-tex-b-framebox "8cm" "l")
(cal-tex-b-parbox "b" "7.5cm")
--- 954,965 ----
(day (extract-calendar-day date))
(month (extract-calendar-month date))
(year (extract-calendar-year date))
! (dayname (cal-tex-LaTeXify-string (calendar-day-name date)))
(date1 (cal-tex-incr-date date))
(day1 (extract-calendar-day date1))
(month1 (extract-calendar-month date1))
(year1 (extract-calendar-year date1))
! (dayname1 (cal-tex-LaTeXify-string (calendar-day-name date1)))
)
(cal-tex-b-framebox "8cm" "l")
(cal-tex-b-parbox "b" "7.5cm")
***************
*** 949,955 ****
Optional prefix argument specifies number of weeks.
Diary entries are included if `cal-tex-diary' is t.
Holidays are included if `cal-tex-holidays' is t."
! (interactive "P")
(let* ((n (if arg arg 1))
(date (calendar-gregorian-from-absolute
(calendar-dayname-on-or-before
--- 992,998 ----
Optional prefix argument specifies number of weeks.
Diary entries are included if `cal-tex-diary' is t.
Holidays are included if `cal-tex-holidays' is t."
! (interactive "p")
(let* ((n (if arg arg 1))
(date (calendar-gregorian-from-absolute
(calendar-dayname-on-or-before
***************
*** 1009,1037 ****
(if (= (extract-calendar-month date)
(extract-calendar-month d))
(format "%s %s"
! (calendar-month-name
(extract-calendar-month date))
(extract-calendar-year date))
(if (= (extract-calendar-year date)
(extract-calendar-year d))
(format "%s---%s %s"
! (calendar-month-name
(extract-calendar-month date))
! (calendar-month-name
(extract-calendar-month d))
(extract-calendar-year date))
(format "%s %s---%s %s"
! (calendar-month-name
(extract-calendar-month date))
(extract-calendar-year date)
! (calendar-month-name (extract-calendar-month d))
(extract-calendar-year d))))))
(insert "%\n")
(calendar-for-loop j from 1 to 7 do
(if (= (mod i 2) 1)
(insert "\\rightday")
(insert "\\leftday"))
! (cal-tex-arg (calendar-day-name date))
(cal-tex-arg (int-to-string (extract-calendar-day date)))
(cal-tex-arg (cal-tex-latexify-list diary-list date))
(cal-tex-arg (cal-tex-latexify-list holidays date))
--- 1052,1080 ----
(if (= (extract-calendar-month date)
(extract-calendar-month d))
(format "%s %s"
! (cal-tex-month-name
(extract-calendar-month date))
(extract-calendar-year date))
(if (= (extract-calendar-year date)
(extract-calendar-year d))
(format "%s---%s %s"
! (cal-tex-month-name
(extract-calendar-month date))
! (cal-tex-month-name
(extract-calendar-month d))
(extract-calendar-year date))
(format "%s %s---%s %s"
! (cal-tex-month-name
(extract-calendar-month date))
(extract-calendar-year date)
! (cal-tex-month-name (extract-calendar-month d))
(extract-calendar-year d))))))
(insert "%\n")
(calendar-for-loop j from 1 to 7 do
(if (= (mod i 2) 1)
(insert "\\rightday")
(insert "\\leftday"))
! (cal-tex-arg (cal-tex-LaTeXify-string (calendar-day-name date)))
(cal-tex-arg (int-to-string (extract-calendar-day date)))
(cal-tex-arg (cal-tex-latexify-list diary-list date))
(cal-tex-arg (cal-tex-latexify-list holidays date))
***************
*** 1051,1057 ****
Weeks start on Monday.
Diary entries are included if `cal-tex-diary' is t.
Holidays are included if `cal-tex-holidays' is t."
! (interactive "P")
(let* ((n (if arg arg 1))
(date (calendar-gregorian-from-absolute
(calendar-dayname-on-or-before
--- 1094,1100 ----
Weeks start on Monday.
Diary entries are included if `cal-tex-diary' is t.
Holidays are included if `cal-tex-holidays' is t."
! (interactive "p")
(let* ((n (if arg arg 1))
(date (calendar-gregorian-from-absolute
(calendar-dayname-on-or-before
***************
*** 1118,1144 ****
(if (= (extract-calendar-month date)
(extract-calendar-month d))
(format "%s %s"
! (calendar-month-name
(extract-calendar-month date))
(extract-calendar-year date))
(if (= (extract-calendar-year date)
(extract-calendar-year d))
(format "%s---%s %s"
! (calendar-month-name
(extract-calendar-month date))
! (calendar-month-name
(extract-calendar-month d))
(extract-calendar-year date))
(format "%s %s---%s %s"
! (calendar-month-name
(extract-calendar-month date))
(extract-calendar-year date)
! (calendar-month-name (extract-calendar-month d))
(extract-calendar-year d))))))
(insert "%\n")
(calendar-for-loop j from 1 to 3 do
(insert "\\leftday")
! (cal-tex-arg (calendar-day-name date))
(cal-tex-arg (int-to-string (extract-calendar-day date)))
(cal-tex-arg (cal-tex-latexify-list diary-list date))
(cal-tex-arg (cal-tex-latexify-list holidays date))
--- 1161,1187 ----
(if (= (extract-calendar-month date)
(extract-calendar-month d))
(format "%s %s"
! (cal-tex-month-name
(extract-calendar-month date))
(extract-calendar-year date))
(if (= (extract-calendar-year date)
(extract-calendar-year d))
(format "%s---%s %s"
! (cal-tex-month-name
(extract-calendar-month date))
! (cal-tex-month-name
(extract-calendar-month d))
(extract-calendar-year date))
(format "%s %s---%s %s"
! (cal-tex-month-name
(extract-calendar-month date))
(extract-calendar-year date)
! (cal-tex-month-name (extract-calendar-month d))
(extract-calendar-year d))))))
(insert "%\n")
(calendar-for-loop j from 1 to 3 do
(insert "\\leftday")
! (cal-tex-arg (cal-tex-LaTeXify-string (calendar-day-name date)))
(cal-tex-arg (int-to-string (extract-calendar-day date)))
(cal-tex-arg (cal-tex-latexify-list diary-list date))
(cal-tex-arg (cal-tex-latexify-list holidays date))
***************
*** 1153,1179 ****
(if (= (extract-calendar-month date)
(extract-calendar-month d))
(format "%s %s"
! (calendar-month-name
(extract-calendar-month date))
(extract-calendar-year date))
(if (= (extract-calendar-year date)
(extract-calendar-year d))
(format "%s---%s %s"
! (calendar-month-name
(extract-calendar-month date))
! (calendar-month-name
(extract-calendar-month d))
(extract-calendar-year date))
(format "%s %s---%s %s"
! (calendar-month-name
(extract-calendar-month date))
(extract-calendar-year date)
! (calendar-month-name (extract-calendar-month d))
(extract-calendar-year d))))))
(insert "%\n")
(calendar-for-loop j from 1 to 2 do
(insert "\\rightday")
! (cal-tex-arg (calendar-day-name date))
(cal-tex-arg (int-to-string (extract-calendar-day date)))
(cal-tex-arg (cal-tex-latexify-list diary-list date))
(cal-tex-arg (cal-tex-latexify-list holidays date))
--- 1196,1222 ----
(if (= (extract-calendar-month date)
(extract-calendar-month d))
(format "%s %s"
! (cal-tex-month-name
(extract-calendar-month date))
(extract-calendar-year date))
(if (= (extract-calendar-year date)
(extract-calendar-year d))
(format "%s---%s %s"
! (cal-tex-month-name
(extract-calendar-month date))
! (cal-tex-month-name
(extract-calendar-month d))
(extract-calendar-year date))
(format "%s %s---%s %s"
! (cal-tex-month-name
(extract-calendar-month date))
(extract-calendar-year date)
! (cal-tex-month-name (extract-calendar-month d))
(extract-calendar-year d))))))
(insert "%\n")
(calendar-for-loop j from 1 to 2 do
(insert "\\rightday")
! (cal-tex-arg (cal-tex-LaTeXify-string (calendar-day-name date)))
(cal-tex-arg (int-to-string (extract-calendar-day date)))
(cal-tex-arg (cal-tex-latexify-list diary-list date))
(cal-tex-arg (cal-tex-latexify-list holidays date))
***************
*** 1182,1188 ****
(setq date (cal-tex-incr-date date)))
(calendar-for-loop j from 1 to 2 do
(insert "\\weekend")
! (cal-tex-arg (calendar-day-name date))
(cal-tex-arg (int-to-string (extract-calendar-day date)))
(cal-tex-arg (cal-tex-latexify-list diary-list date))
(cal-tex-arg (cal-tex-latexify-list holidays date))
--- 1225,1231 ----
(setq date (cal-tex-incr-date date)))
(calendar-for-loop j from 1 to 2 do
(insert "\\weekend")
! (cal-tex-arg (cal-tex-LaTeXify-string (calendar-day-name date)))
(cal-tex-arg (int-to-string (extract-calendar-day date)))
(cal-tex-arg (cal-tex-latexify-list diary-list date))
(cal-tex-arg (cal-tex-latexify-list holidays date))
***************
*** 1202,1208 ****
Diary entries are included if `cal-tex-diary' is t.
Holidays are included if `cal-tex-holidays' is t.
Pages are ruled if `cal-tex-rules' is t."
! (interactive "P")
(let* ((n (if arg arg 1))
(date (calendar-gregorian-from-absolute
(calendar-dayname-on-or-before
--- 1245,1251 ----
Diary entries are included if `cal-tex-diary' is t.
Holidays are included if `cal-tex-holidays' is t.
Pages are ruled if `cal-tex-rules' is t."
! (interactive "p")
(let* ((n (if arg arg 1))
(date (calendar-gregorian-from-absolute
(calendar-dayname-on-or-before
***************
*** 1311,1317 ****
(defun cal-tex-cursor-day (&optional arg)
"Make a buffer with LaTeX commands for the day cursor is on.
Optional prefix argument specifies number of days."
! (interactive "P")
(let ((n (if arg arg 1))
(date (calendar-absolute-from-gregorian (calendar-cursor-to-date t))))
(cal-tex-preamble "12pt")
--- 1354,1360 ----
(defun cal-tex-cursor-day (&optional arg)
"Make a buffer with LaTeX commands for the day cursor is on.
Optional prefix argument specifies number of days."
! (interactive "p")
(let ((n (if arg arg 1))
(date (calendar-absolute-from-gregorian (calendar-cursor-to-date t))))
(cal-tex-preamble "12pt")
***************
*** 1333,1339 ****
(defun cal-tex-daily-page (date)
"Make a calendar page for Gregorian DATE on 8.5 by 11 paper."
(let* ((hour)
! (month-name (calendar-month-name (extract-calendar-month date))))
(cal-tex-banner "cal-tex-daily-page")
(cal-tex-b-makebox "4cm" "l")
(cal-tex-b-parbox "b" "3.8cm")
--- 1376,1382 ----
(defun cal-tex-daily-page (date)
"Make a calendar page for Gregorian DATE on 8.5 by 11 paper."
(let* ((hour)
! (month-name (cal-tex-month-name (extract-calendar-month date))))
(cal-tex-banner "cal-tex-daily-page")
(cal-tex-b-makebox "4cm" "l")
(cal-tex-b-parbox "b" "3.8cm")
***************
*** 1348,1354 ****
(cal-tex-e-makebox)
(cal-tex-hfill)
(cal-tex-b-makebox "4cm" "r")
! (cal-tex-bf (calendar-day-name date))
(cal-tex-e-makebox)
(cal-tex-nl)
(cal-tex-hspace ".4cm")
--- 1391,1397 ----
(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")
***************
*** 1420,1437 ****
"address@hidden" colsep "address@hidden" colsep
"address@hidden" colsep "address@hidden"
"\\multicolumn{7}{c}{"
! (calendar-month-name month)
" "
(int-to-string year)
"}\\\\[1mm]\n")))
(calendar-for-loop i from 0 to 6 do
! (setq str (concat str
! (substring (aref calendar-day-name-array
! (mod (+ calendar-week-start-day i)
7))
! 0 2)
! (if (/= i 6)
! " & "
! "\\\\[0.7mm]\n"))))
(calendar-for-loop i from 1 to blank-days do
(setq str (concat str " & ")))
(calendar-for-loop i from 1 to last do
--- 1463,1482 ----
"address@hidden" colsep "address@hidden" colsep
"address@hidden" colsep "address@hidden"
"\\multicolumn{7}{c}{"
! (cal-tex-month-name month)
" "
(int-to-string year)
"}\\\\[1mm]\n")))
(calendar-for-loop i from 0 to 6 do
! (setq str
! (concat str
! (cal-tex-LaTeXify-string
! (substring (aref calendar-day-name-array
! (mod (+ calendar-week-start-day i) 7))
! 0 2))
! (if (/= i 6)
! " & "
! "\\\\[0.7mm]\n"))))
(calendar-for-loop i from 1 to blank-days do
(setq str (concat str " & ")))
(calendar-for-loop i from 1 to last do
***************
*** 1453,1459 ****
(+ (if n n 1) (calendar-absolute-from-gregorian date))))
(defun cal-tex-latexify-list (date-list date &optional separator
final-separator)
! "Return string with concatenated, LaTeXified entries in DATE_LIST for DATE.
Use double backslash as a separator unless optional SEPARATOR is given.
If resulting string is not empty, put separator at end if optional
FINAL-SEPARATOR is t."
--- 1498,1504 ----
(+ (if n n 1) (calendar-absolute-from-gregorian date))))
(defun cal-tex-latexify-list (date-list date &optional separator
final-separator)
! "Return string with concatenated, LaTeXified entries in DATE-LIST for DATE.
Use double backslash as a separator unless optional SEPARATOR is given.
If resulting string is not empty, put separator at end if optional
FINAL-SEPARATOR is t."
***************
*** 1573,1578 ****
--- 1618,1627 ----
(setq tail (substring tail 1))
(setq head (concat head (if pair (cdr pair) ch)))))
head)))
+
+ (defun cal-tex-month-name (month)
+ "The name of MONTH, LaTeXified."
+ (cal-tex-LaTeXify-string (calendar-month-name month)))
(defun cal-tex-hfill () "Insert hfill." (insert "\\hfill"))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/calendar/cal-tex.el,
Richard M. Stallman <=