aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2006-05-01 03:29:19 +0000
committerGlenn Morris2006-05-01 03:29:19 +0000
commit89aab5d47c1ee4b0851c90ef179bf5b350baa8cd (patch)
treeb1eb037ecf8317cfb5d408287b1ac3d267b5215b
parent1dc51c0019cd76097f7e885dedf538f0c3b4dcfb (diff)
downloademacs-89aab5d47c1ee4b0851c90ef179bf5b350baa8cd.tar.gz
emacs-89aab5d47c1ee4b0851c90ef179bf5b350baa8cd.zip
(cal-tex-preamble-extra): New variable.
(cal-tex-preamble): Use cal-tex-preamble-extra. (cal-tex-list-diary-entries): Refer to `diary-list-entries' rather than alias `list-diary-entries'.
-rw-r--r--lisp/calendar/cal-tex.el20
1 files changed, 16 insertions, 4 deletions
diff --git a/lisp/calendar/cal-tex.el b/lisp/calendar/cal-tex.el
index a67d90c832e..1fd85513230 100644
--- a/lisp/calendar/cal-tex.el
+++ b/lisp/calendar/cal-tex.el
@@ -45,7 +45,7 @@
45 45
46(require 'calendar) 46(require 'calendar)
47 47
48(autoload 'list-diary-entries "diary-lib" nil t) 48(autoload 'diary-list-entries "diary-lib" nil t)
49(autoload 'calendar-holiday-list "holidays" nil t) 49(autoload 'calendar-holiday-list "holidays" nil t)
50(autoload 'calendar-iso-from-absolute "cal-iso" nil t) 50(autoload 'calendar-iso-from-absolute "cal-iso" nil t)
51 51
@@ -121,6 +121,14 @@ will put the Hebrew date at the bottom of each day."
121 :type 'integer 121 :type 'integer
122 :group 'calendar-tex) 122 :group 'calendar-tex)
123 123
124(defcustom cal-tex-preamble-extra nil
125 "A string giving extra LaTeX commands to insert in the calendar preamble.
126For example, to include extra packages:
127\"\\\\usepackage{foo}\\n\\\\usepackage{bar}\\n\"."
128 :type 'string
129 :group 'calendar-tex
130 :version "22.1")
131
124(defcustom cal-tex-hook nil 132(defcustom cal-tex-hook nil
125 "*List of functions called after any LaTeX calendar buffer is generated. 133 "*List of functions called after any LaTeX calendar buffer is generated.
126You can use this to do postprocessing on the buffer. For example, to change 134You can use this to do postprocessing on the buffer. For example, to change
@@ -240,7 +248,7 @@ This definition is the heart of the calendar!")
240 "Generate a list of all diary-entries from absolute date D1 to D2." 248 "Generate a list of all diary-entries from absolute date D1 to D2."
241 (let ((diary-list-include-blanks nil) 249 (let ((diary-list-include-blanks nil)
242 (diary-display-hook 'ignore)) 250 (diary-display-hook 'ignore))
243 (list-diary-entries 251 (diary-list-entries
244 (calendar-gregorian-from-absolute d1) 252 (calendar-gregorian-from-absolute d1)
245 (1+ (- d2 d1))))) 253 (1+ (- d2 d1)))))
246 254
@@ -253,8 +261,10 @@ Optional ARGS are included."
253 (insert "\\documentclass") 261 (insert "\\documentclass")
254 (if args 262 (if args
255 (insert "[" args "]")) 263 (insert "[" args "]"))
256 (insert "{article}\n" 264 (insert "{article}\n")
257 "\\hbadness 20000 265 (if (stringp cal-tex-preamble-extra)
266 (insert cal-tex-preamble-extra "\n"))
267 (insert "\\hbadness 20000
258\\hfuzz=1000pt 268\\hfuzz=1000pt
259\\vbadness 20000 269\\vbadness 20000
260\\lineskip 0pt 270\\lineskip 0pt
@@ -357,6 +367,8 @@ Optional parameter specifies number of years."
357 (cal-tex-noindent) 367 (cal-tex-noindent)
358 (cal-tex-nl) 368 (cal-tex-nl)
359 (let ((month-names; don't use default in case user changed it 369 (let ((month-names; don't use default in case user changed it
370 ;; These are only used to define the command names, not
371 ;; the names of the months they insert.
360 ["January" "February" "March" "April" "May" "June" 372 ["January" "February" "March" "April" "May" "June"
361 "July" "August" "September" "October" "November" "December"])) 373 "July" "August" "September" "October" "November" "December"]))
362 (calendar-for-loop i from 1 to 12 do 374 (calendar-for-loop i from 1 to 12 do