;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to
-;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+;; along with GNU Emacs; see the file COPYING. If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
;;; Commentary:
-;; This collection of functions implements the features of calendar.el that
-;; deal with printing the calendar.
-
-;;; TO DO
-;;;
-;;; (*) Add holidays and diary entries to daily calendar.
-;;;
-;;; (*) Add diary entries to weekly calendar functions.
-;;;
-;;; (*) Make calendar styles for A4 paper.
-;;;
-;;; (*) Make daily and monthly styles Filofax paper.
-;;;
-;;; (*) Improve the LaTeX command that produces the boxes in the monthly
-;;; calendar to eliminate slight gap--what causes it?!
+;; This collection of functions implements the creation of LaTeX calendars
+;; based on the user's holiday choices and diary file.
+
+;; TO DO
+;;
+;; (*) Add holidays and diary entries to daily calendar.
+;;
+;; (*) Add diary entries to weekly calendar functions.
+;;
+;; (*) Make calendar styles for A4 paper.
+;;
+;; (*) Make daily and monthly styles Filofax paper.
+;;
+;; (*) Improve the LaTeX command that produces the boxes in the monthly
+;; calendar to eliminate slight gap--what causes it?!
;;; Code:
(require 'calendar)
-(autoload 'list-diary-entries "diary" nil t)
+(autoload 'list-diary-entries "diary-lib" nil t)
(autoload 'calendar-holiday-list "holidays" nil t)
(autoload 'calendar-iso-from-absolute "cal-iso" nil t)
-
-(defun cal-tex-version ()
- (interactive)
- (message "Version 1, October 11, 1995"))
-
;;;
;;; Customizable variables
;;;
(defun cal-tex-cursor-year-landscape (&optional arg)
"Make a buffer with LaTeX commands for the year cursor is on.
-Optional prefix argument specifies numeber of years."
+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-week (&optional arg)
- "One page calendar for week indicated by cursor.
+ "Make a buffer with LaTeX commands for a two-page one-week calendar.
+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")
(run-hooks 'cal-tex-hook)))
(defun cal-tex-cursor-week2 (&optional arg)
- "Make a buffer with LaTeX commands for the week cursor is on.
-The printed output will be on two pages.
+ "Make a buffer with LaTeX commands for a two-page one-week calendar.
+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")
(cal-tex-end-document)
(run-hooks 'cal-tex-hook)))
-(defun cal-tex-cursor-week3 (&optional arg)
- "One page ISO style calendar for the ISO week indicated by cursor.
+(defun cal-tex-cursor-week-iso (&optional arg)
+ "Make a buffer with LaTeX commands for a one page ISO-style weekly calendar.
Optional prefix argument specifies number of weeks.
-Diary entries are included if cal-tex-diary is t.
+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))
(cal-tex-arg height)
(cal-tex-nl))))
-(defun cal-tex-cursor-week4 (&optional arg)
- "One page calendar for week indicated by cursor.
-Week begins on Monday.
-Optional prefix argument specifies number of weeks."
+(defun cal-tex-cursor-week-monday (&optional arg)
+ "Make a buffer with LaTeX commands for a two-page one-week calendar.
+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
(if (/= i n)
(progn
(run-hooks 'cal-tex-week-hook)
- (setq date date7)
+ (setq date (cal-tex-incr-date date 7))
(cal-tex-newpage))))
(cal-tex-end-document)
(run-hooks 'cal-tex-hook)))
(defun cal-tex-weekly4-box (date weekend)
- "make one box for DATE, different if WEEKEND"
+ "Make one box for DATE, different if WEEKEND."
(let* (
(day (extract-calendar-day date))
(month (extract-calendar-month date))
)
(cal-tex-b-framebox "8cm" "l")
(cal-tex-b-parbox "b" "7.5cm")
- (insert (format "{\\Large\\bf %s,} %s/%s/%s\\\\\n"
- dayname month day year))
+ (insert (format "{\\Large\\bf %s,} %s/%s/%s\\\\\n" dayname month day year))
(cal-tex-rule "0pt" "7.5cm" ".5mm")
(cal-tex-nl)
(if (not weekend)
(cal-tex-e-framebox)
(cal-tex-hspace "1cm")))
-(defun cal-tex-cursor-week5 (&optional arg)
+(defun cal-tex-cursor-filofax-2week (&optional arg)
"Two-weeks-at-a-glance Filofax style calendar for week indicated by cursor.
Optional prefix argument specifies number of weeks.
-Diary entries are included if cal-tex-diary is t.
+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))
(cal-tex-end-document)
(run-hooks 'cal-tex-hook)))
-(defun cal-tex-cursor-week6 (&optional arg)
+(defun cal-tex-cursor-filofax-week (&optional arg)
"One-week-at-a-glance Filofax style calendar for week indicated by cursor.
Optional prefix argument specifies number of weeks.
Weeks start on Monday.
-Diary entries are included if cal-tex-diary is t.
+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))