Mercurial > emacs
diff lisp/calendar/cal-tex.el @ 90386:2ecafc6d5db7
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-58
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 239-258)
- Update from CVS
- (Ffield_beginning, find_field): Undo change of 2006-04-23.
- Rcirc patch from Ryan Yeske
- Merge from gnus--rel--5.10
- Clean up lisp/gnus/ChangeLog a bit
* gnus--rel--5.10 (patch 91-98)
- Merge from emacs--devo--0
- Update from CVS
author | Miles Bader <miles@gnu.org> |
---|---|
date | Tue, 02 May 2006 05:51:52 +0000 |
parents | 4b3d39451150 7551592e369e |
children | 95d0cdf160ea |
line wrap: on
line diff
--- a/lisp/calendar/cal-tex.el Fri Apr 21 05:39:14 2006 +0000 +++ b/lisp/calendar/cal-tex.el Tue May 02 05:51:52 2006 +0000 @@ -45,7 +45,7 @@ (require 'calendar) -(autoload 'list-diary-entries "diary-lib" nil t) +(autoload 'diary-list-entries "diary-lib" nil t) (autoload 'calendar-holiday-list "holidays" nil t) (autoload 'calendar-iso-from-absolute "cal-iso" nil t) @@ -121,6 +121,14 @@ :type 'integer :group 'calendar-tex) +(defcustom cal-tex-preamble-extra nil + "A string giving extra LaTeX commands to insert in the calendar preamble. +For example, to include extra packages: +\"\\\\usepackage{foo}\\n\\\\usepackage{bar}\\n\"." + :type 'string + :group 'calendar-tex + :version "22.1") + (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 @@ -240,7 +248,7 @@ "Generate a list of all diary-entries from absolute date D1 to D2." (let ((diary-list-include-blanks nil) (diary-display-hook 'ignore)) - (list-diary-entries + (diary-list-entries (calendar-gregorian-from-absolute d1) (1+ (- d2 d1))))) @@ -253,8 +261,10 @@ (insert "\\documentclass") (if args (insert "[" args "]")) - (insert "{article}\n" - "\\hbadness 20000 + (insert "{article}\n") + (if (stringp cal-tex-preamble-extra) + (insert cal-tex-preamble-extra "\n")) + (insert "\\hbadness 20000 \\hfuzz=1000pt \\vbadness 20000 \\lineskip 0pt @@ -357,6 +367,8 @@ (cal-tex-noindent) (cal-tex-nl) (let ((month-names; don't use default in case user changed it + ;; These are only used to define the command names, not + ;; the names of the months they insert. ["January" "February" "March" "April" "May" "June" "July" "August" "September" "October" "November" "December"])) (calendar-for-loop i from 1 to 12 do