/[emacs]/emacs/lisp/calendar/cal-tex.el
ViewVC logotype

Diff of /emacs/lisp/calendar/cal-tex.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.22 by rms, Wed Apr 3 14:35:33 2002 UTC revision 1.22.2.1 by miles, Fri Apr 4 06:20:15 2003 UTC
# Line 48  Line 48 
48  (autoload 'calendar-iso-from-absolute "cal-iso" nil t)  (autoload 'calendar-iso-from-absolute "cal-iso" nil t)
49    
50  ;;;  ;;;
51  ;;; Customizable variables  ;;; Customizable variables
52  ;;;  ;;;
53    
54  (defcustom cal-tex-which-days '(0 1 2 3 4 5 6)  (defcustom cal-tex-which-days '(0 1 2 3 4 5 6)
# Line 153  characters with diacritical marks to the Line 153  characters with diacritical marks to the
153  ;;;  ;;;
154    
155  (defvar  cal-tex-day-prefix "\\caldate{%s}{%s}"  (defvar  cal-tex-day-prefix "\\caldate{%s}{%s}"
156    "The initial LaTeX code for a day.      "The initial LaTeX code for a day.
157  The holidays, diary entries, bottom string, and the text follow.")  The holidays, diary entries, bottom string, and the text follow.")
158    
159  (defvar cal-tex-day-name-format "\\myday{%s}%%"  (defvar cal-tex-day-name-format "\\myday{%s}%%"
160    "The format for LaTeX code for a day name.  The names are taken from    "The format for LaTeX code for a day name.  The names are taken from
161  calendar-day-name-array.")  calendar-day-name-array.")
# Line 164  calendar-day-name-array.") Line 164  calendar-day-name-array.")
164  "\\def\\calmonth#1#2%  "\\def\\calmonth#1#2%
165  {\\begin{center}%  {\\begin{center}%
166  \\Huge\\bf\\uppercase{#1} #2 \\\\[1cm]%  \\Huge\\bf\\uppercase{#1} #2 \\\\[1cm]%
167  \\end{center}}%  \\end{center}}%
168  \\vspace*{-1.5cm}%  \\vspace*{-1.5cm}%
169  %  %
170  "  "
# Line 174  calendar-day-name-array.") Line 174  calendar-day-name-array.")
174  "\\def\\calmonth#1#2#3#4%  "\\def\\calmonth#1#2#3#4%
175  {\\begin{center}%  {\\begin{center}%
176  \\Huge\\bf #1 #2---#3 #4\\\\[1cm]%  \\Huge\\bf #1 #2---#3 #4\\\\[1cm]%
177  \\end{center}}%  \\end{center}}%
178  \\vspace*{-1.5cm}%  \\vspace*{-1.5cm}%
179  %  %
180  "  "
# Line 517  Calendar is condensed onto one page." Line 517  Calendar is condensed onto one page."
517        (cal-tex-end-document)))        (cal-tex-end-document)))
518    (run-hooks 'cal-tex-hook))    (run-hooks 'cal-tex-hook))
519    
520  (defun cal-tex-insert-days (month year diary-list holidays day-format)  (defun cal-tex-insert-days (month year diary-list holidays day-format)
521    "Insert LaTeX commands for a range of days in monthly calendars.    "Insert LaTeX commands for a range of days in monthly calendars.
522  LaTeX commands are inserted for the days of the MONTH in YEAR.  LaTeX commands are inserted for the days of the MONTH in YEAR.
523  Diary entries on DIARY-LIST are included. Holidays on HOLIDAYS are included.  Diary entries on DIARY-LIST are included. Holidays on HOLIDAYS are included.
# Line 532  Each day is formatted using format DAY-F Line 532  Each day is formatted using format DAY-F
532      (calendar-for-loop i from 1 to last do      (calendar-for-loop i from 1 to last do
533         (setq date (list month i year))         (setq date (list month i year))
534         (if (memq (calendar-day-of-week date) cal-tex-which-days)         (if (memq (calendar-day-of-week date) cal-tex-which-days)
535             (progn             (progn
536               (insert (format day-format (cal-tex-month-name month) i))               (insert (format day-format (cal-tex-month-name month) i))
537               (cal-tex-arg (cal-tex-latexify-list diary-list date))               (cal-tex-arg (cal-tex-latexify-list diary-list date))
538               (cal-tex-arg (cal-tex-latexify-list holidays date))               (cal-tex-arg (cal-tex-latexify-list holidays date))
# Line 549  Each day is formatted using format DAY-F Line 549  Each day is formatted using format DAY-F
549    "Insert the names of the days at top of a monthly calendar."    "Insert the names of the days at top of a monthly calendar."
550    (calendar-for-loop i from 0 to 6 do    (calendar-for-loop i from 0 to 6 do
551       (if (memq i cal-tex-which-days)       (if (memq i cal-tex-which-days)
552           (insert (format cal-tex-day-name-format           (insert (format cal-tex-day-name-format
553                           (cal-tex-LaTeXify-string                           (cal-tex-LaTeXify-string
554                            (aref calendar-day-name-array                            (aref calendar-day-name-array
555                                  (mod (+ calendar-week-start-day i) 7))))))                                  (mod (+ calendar-week-start-day i) 7))))))
556       (cal-tex-comment)))       (cal-tex-comment)))
557    
558  (defun cal-tex-insert-month-header (n month year end-month end-year)  (defun cal-tex-insert-month-header (n month year end-month end-year)
559    "Create a title for a calendar.    "Create a title for a calendar.
560  A title is inserted for a calendar with N months starting with  A title is inserted for a calendar with N months starting with
561  MONTH YEAR and ending with END-MONTH END-YEAR."  MONTH YEAR and ending with END-MONTH END-YEAR."
562    (let ((month-name (cal-tex-month-name  month))    (let ((month-name (cal-tex-month-name  month))
563           (end-month-name (cal-tex-month-name  end-month)))           (end-month-name (cal-tex-month-name  end-month)))
564      (if (= 1 n)      (if (= 1 n)
565          (insert (format "\\calmonth{%s}{%s}\n\\vspace*{-0.5cm}"          (insert (format "\\calmonth{%s}{%s}\n\\vspace*{-0.5cm}"
566                  month-name year) )                        month-name year) )
567          (insert (format "\\calmonth{%s}{%s}{%s}{%s}\n\\vspace*{-0.5cm}"          (insert (format "\\calmonth{%s}{%s}{%s}{%s}\n\\vspace*{-0.5cm}"
568                  month-name year end-month-name end-year))))                  month-name year end-month-name end-year))))
569    (cal-tex-comment))    (cal-tex-comment))
# Line 579  blank, no days are inserted." Line 579  blank, no days are inserted."
579                 (- (calendar-day-of-week (list month 1 year))                 (- (calendar-day-of-week (list month 1 year))
580                    calendar-week-start-day)                    calendar-week-start-day)
581                 7)))                 7)))
582          (calendar-for-loop i from 0 to (1- blank-days) do          (calendar-for-loop i from 0 to (1- blank-days) do
583              (if (memq i cal-tex-which-days)              (if (memq i cal-tex-which-days)
584                  (insert (format day-format " " " ") "{}{}{}{}%\n"))))))                  (insert (format day-format " " " ") "{}{}{}{}%\n"))))))
585    
# Line 594  The entry is formatted using DAY-FORMAT. Line 594  The entry is formatted using DAY-FORMAT.
594                 (- (calendar-day-of-week (list month last-day year))                 (- (calendar-day-of-week (list month last-day year))
595                    calendar-week-start-day)                    calendar-week-start-day)
596                 7)))                 7)))
597          (calendar-for-loop i from (1+ blank-days) to 6 do          (calendar-for-loop i from (1+ blank-days) to 6 do
598             (if (memq i cal-tex-which-days)             (if (memq i cal-tex-which-days)
599                 (insert (format day-format "" "") "{}{}{}{}%\n"))))))                 (insert (format day-format "" "") "{}{}{}{}%\n"))))))
600    
# Line 631  in the calendar starting in MONTH YEAR." Line 631  in the calendar starting in MONTH YEAR."
631    
632  (defun cal-tex-number-weeks (month year n)  (defun cal-tex-number-weeks (month year n)
633    "Determine the number of weeks in a range of dates.    "Determine the number of weeks in a range of dates.
634  Compute the number of  weeks in the calendar starting with MONTH and YEAR,  Compute the number of  weeks in the calendar starting with MONTH and YEAR,
635  and lasting N months, including only the days in WHICH-DAYS. As it stands,  and lasting N months, including only the days in WHICH-DAYS. As it stands,
636  this is only an upper bound."  this is only an upper bound."
637    (let ((d (list month 1 year)))    (let ((d (list month 1 year)))
638      (increment-calendar-month month year (1- n))      (increment-calendar-month month year (1- n))
# Line 687  Holidays are included if `cal-tex-holida Line 687  Holidays are included if `cal-tex-holida
687         (cal-tex-e-center)         (cal-tex-e-center)
688         (cal-tex-hspace "-.2in")         (cal-tex-hspace "-.2in")
689         (cal-tex-b-parbox "l" "7in")         (cal-tex-b-parbox "l" "7in")
690         (calendar-for-loop j from 1 to 7 do         (calendar-for-loop j from 1 to 7 do
691            (cal-tex-week-hours date holidays "3.1")            (cal-tex-week-hours date holidays "3.1")
692            (setq date (cal-tex-incr-date date)))            (setq date (cal-tex-incr-date date)))
693         (cal-tex-e-parbox)         (cal-tex-e-parbox)
# Line 739  Holidays are included if `cal-tex-holida Line 739  Holidays are included if `cal-tex-holida
739         (cal-tex-e-center)         (cal-tex-e-center)
740         (cal-tex-hspace "-.2in")         (cal-tex-hspace "-.2in")
741         (cal-tex-b-parbox "l" "\\textwidth")         (cal-tex-b-parbox "l" "\\textwidth")
742         (calendar-for-loop j from 1 to 3 do         (calendar-for-loop j from 1 to 3 do
743            (cal-tex-week-hours date holidays "5")            (cal-tex-week-hours date holidays "5")
744            (setq date (cal-tex-incr-date date)))            (setq date (cal-tex-incr-date date)))
745         (cal-tex-e-parbox)         (cal-tex-e-parbox)
# Line 767  Holidays are included if `cal-tex-holida Line 767  Holidays are included if `cal-tex-holida
767         (insert "}")         (insert "}")
768         (cal-tex-nl)         (cal-tex-nl)
769         (cal-tex-b-parbox "l" "\\textwidth")         (cal-tex-b-parbox "l" "\\textwidth")
770         (calendar-for-loop j from 4 to 7 do         (calendar-for-loop j from 4 to 7 do
771                            (cal-tex-week-hours date holidays "5")                            (cal-tex-week-hours date holidays "5")
772                            (setq date (cal-tex-incr-date date)))                            (setq date (cal-tex-incr-date date)))
773         (cal-tex-e-parbox)         (cal-tex-e-parbox)
# Line 825  Holidays are included if `cal-tex-holida Line 825  Holidays are included if `cal-tex-holida
825         (cal-tex-nl ".5cm")         (cal-tex-nl ".5cm")
826         (cal-tex-e-center)         (cal-tex-e-center)
827         (cal-tex-b-parbox "l" "\\textwidth")         (cal-tex-b-parbox "l" "\\textwidth")
828         (calendar-for-loop j from 1 to 7 do         (calendar-for-loop j from 1 to 7 do
829            (cal-tex-b-parbox "t" "\\textwidth")            (cal-tex-b-parbox "t" "\\textwidth")
830            (cal-tex-b-parbox "t" "\\textwidth")            (cal-tex-b-parbox "t" "\\textwidth")
831            (cal-tex-rule "0pt" "\\textwidth" ".2mm")            (cal-tex-rule "0pt" "\\textwidth" ".2mm")
# Line 870  Holidays are included if `cal-tex-holida Line 870  Holidays are included if `cal-tex-holida
870      (cal-tex-end-document)      (cal-tex-end-document)
871      (run-hooks 'cal-tex-hook)))      (run-hooks 'cal-tex-hook)))
872    
873  (defvar cal-tex-LaTeX-hourbox  (defvar cal-tex-LaTeX-hourbox
874    "\\newcommand{\\hourbox}[2]%    "\\newcommand{\\hourbox}[2]%
875  {\\makebox[2em]{\\rule{0cm}{#2ex}#1}\\rule{3in}{.15mm}}\n"  {\\makebox[2em]{\\rule{0cm}{#2ex}#1}\\rule{3in}{.15mm}}\n"
876    "One hour and a line on the right.")    "One hour and a line on the right.")
877    
878  (defun cal-tex-week-hours (date holidays height)  (defun cal-tex-week-hours (date holidays height)
879    "Insert hourly entries for DATE with HOLIDAYS, with line height HEIGHT."    "Insert hourly entries for DATE with HOLIDAYS, with line height HEIGHT."
880    (let ((month (extract-calendar-month date))    (let ((month (extract-calendar-month date))
881          (day   (extract-calendar-day date))          (day   (extract-calendar-day date))
882          (year  (extract-calendar-year date))          (year  (extract-calendar-year date))
# Line 971  Holidays are included if `cal-tex-holida Line 971  Holidays are included if `cal-tex-holida
971            (calendar-for-loop i from 8 to 12 do            (calendar-for-loop i from 8 to 12 do
972               (insert (format "{\\large\\sf %d}\\\\\n" i)))               (insert (format "{\\large\\sf %d}\\\\\n" i)))
973            (calendar-for-loop i from 1 to 5 do            (calendar-for-loop i from 1 to 5 do
974               (insert (format "{\\large\\sf %d}\\\\\n"               (insert (format "{\\large\\sf %d}\\\\\n"
975                               (if cal-tex-24 (+ i 12) i))))))                               (if cal-tex-24 (+ i 12) i))))))
976      (cal-tex-nl ".5cm")      (cal-tex-nl ".5cm")
977      (if weekend      (if weekend
978          (progn          (progn
979            (cal-tex-vspace "1cm")            (cal-tex-vspace "1cm")
980            (insert "\\ \\vfill")            (insert "\\ \\vfill")
981            (insert (format "{\\Large\\bf %s,} %s/%s/%s\\\\\n"            (insert (format "{\\Large\\bf %s,} %s/%s/%s\\\\\n"
982                            dayname1 month1 day1 year1))                            dayname1 month1 day1 year1))
983            (cal-tex-rule "0pt" "7.5cm" ".5mm")            (cal-tex-rule "0pt" "7.5cm" ".5mm")
984            (cal-tex-nl "1.5cm")            (cal-tex-nl "1.5cm")
# Line 1070  Holidays are included if `cal-tex-holida Line 1070  Holidays are included if `cal-tex-holida
1070                        (cal-tex-month-name (extract-calendar-month d))                        (cal-tex-month-name (extract-calendar-month d))
1071                        (extract-calendar-year d))))))                        (extract-calendar-year d))))))
1072         (insert "%\n")         (insert "%\n")
1073         (calendar-for-loop j from 1 to 7 do         (calendar-for-loop j from 1 to 7 do
1074            (if (= (mod i 2) 1)            (if (= (mod i 2) 1)
1075                (insert "\\rightday")                (insert "\\rightday")
1076              (insert "\\leftday"))              (insert "\\leftday"))
# Line 1091  Holidays are included if `cal-tex-holida Line 1091  Holidays are included if `cal-tex-holida
1091  (defun cal-tex-cursor-filofax-week (&optional arg)  (defun cal-tex-cursor-filofax-week (&optional arg)
1092    "One-week-at-a-glance Filofax style calendar for week indicated by cursor.    "One-week-at-a-glance Filofax style calendar for week indicated by cursor.
1093  Optional prefix argument specifies number of weeks.  Optional prefix argument specifies number of weeks.
1094  Weeks start on Monday.  Weeks start on Monday.
1095  Diary entries are included if `cal-tex-diary' is t.  Diary entries are included if `cal-tex-diary' is t.
1096  Holidays are included if `cal-tex-holidays' is t."  Holidays are included if `cal-tex-holidays' is t."
1097    (interactive "p")    (interactive "p")
# Line 1179  Holidays are included if `cal-tex-holida Line 1179  Holidays are included if `cal-tex-holida
1179                        (cal-tex-month-name (extract-calendar-month d))                        (cal-tex-month-name (extract-calendar-month d))
1180                        (extract-calendar-year d))))))                        (extract-calendar-year d))))))
1181         (insert "%\n")         (insert "%\n")
1182         (calendar-for-loop j from 1 to 3 do         (calendar-for-loop j from 1 to 3 do
1183            (insert "\\leftday")            (insert "\\leftday")
1184            (cal-tex-arg (cal-tex-LaTeXify-string (calendar-day-name date)))            (cal-tex-arg (cal-tex-LaTeXify-string (calendar-day-name date)))
1185            (cal-tex-arg (int-to-string (extract-calendar-day date)))            (cal-tex-arg (int-to-string (extract-calendar-day date)))
# Line 1214  Holidays are included if `cal-tex-holida Line 1214  Holidays are included if `cal-tex-holida
1214                        (cal-tex-month-name (extract-calendar-month d))                        (cal-tex-month-name (extract-calendar-month d))
1215                        (extract-calendar-year d))))))                        (extract-calendar-year d))))))
1216         (insert "%\n")         (insert "%\n")
1217         (calendar-for-loop j from 1 to 2 do         (calendar-for-loop j from 1 to 2 do
1218            (insert "\\rightday")            (insert "\\rightday")
1219            (cal-tex-arg (cal-tex-LaTeXify-string (calendar-day-name date)))            (cal-tex-arg (cal-tex-LaTeXify-string (calendar-day-name date)))
1220            (cal-tex-arg (int-to-string (extract-calendar-day date)))            (cal-tex-arg (int-to-string (extract-calendar-day date)))
# Line 1223  Holidays are included if `cal-tex-holida Line 1223  Holidays are included if `cal-tex-holida
1223            (cal-tex-arg (eval cal-tex-daily-string))            (cal-tex-arg (eval cal-tex-daily-string))
1224            (insert "%\n")            (insert "%\n")
1225            (setq date (cal-tex-incr-date date)))            (setq date (cal-tex-incr-date date)))
1226         (calendar-for-loop j from 1 to 2 do         (calendar-for-loop j from 1 to 2 do
1227            (insert "\\weekend")            (insert "\\weekend")
1228            (cal-tex-arg (cal-tex-LaTeXify-string (calendar-day-name date)))            (cal-tex-arg (cal-tex-LaTeXify-string (calendar-day-name date)))
1229            (cal-tex-arg (int-to-string (extract-calendar-day date)))            (cal-tex-arg (int-to-string (extract-calendar-day date)))
# Line 1241  Holidays are included if `cal-tex-holida Line 1241  Holidays are included if `cal-tex-holida
1241    
1242  (defun cal-tex-cursor-filofax-daily (&optional arg)  (defun cal-tex-cursor-filofax-daily (&optional arg)
1243    "Day-per-page Filofax style calendar for week indicated by cursor.    "Day-per-page Filofax style calendar for week indicated by cursor.
1244  Optional prefix argument specifies number of weeks.  Weeks start on Monday.  Optional prefix argument specifies number of weeks.  Weeks start on Monday.
1245  Diary entries are included if `cal-tex-diary' is t.  Diary entries are included if `cal-tex-diary' is t.
1246  Holidays are included if `cal-tex-holidays' is t.  Holidays are included if `cal-tex-holidays' is t.
1247  Pages are ruled if `cal-tex-rules' is t."  Pages are ruled if `cal-tex-rules' is t."
# Line 1309  Pages are ruled if `cal-tex-rules' is t. Line 1309  Pages are ruled if `cal-tex-rules' is t.
1309      (cal-tex-b-document)      (cal-tex-b-document)
1310      (cal-tex-cmd "\\pagestyle{empty}")      (cal-tex-cmd "\\pagestyle{empty}")
1311      (calendar-for-loop i from 1 to n do      (calendar-for-loop i from 1 to n do
1312         (calendar-for-loop j from 1 to 5 do         (calendar-for-loop j from 1 to 5 do
1313            (let ((odd (/= 0 (% j 2))))            (let ((odd (/= 0 (% j 2))))
1314              (insert (if odd "\\righthead" "\\lefthead"))              (insert (if odd "\\righthead" "\\lefthead"))
1315              (cal-tex-arg (calendar-date-string date))              (cal-tex-arg (calendar-date-string date))
# Line 1325  Pages are ruled if `cal-tex-rules' is t. Line 1325  Pages are ruled if `cal-tex-rules' is t.
1325            (cal-tex-newpage)            (cal-tex-newpage)
1326            (setq date (cal-tex-incr-date date)))            (setq date (cal-tex-incr-date date)))
1327         (insert "%\n")         (insert "%\n")
1328         (calendar-for-loop j from 1 to 2 do         (calendar-for-loop j from 1 to 2 do
1329            (insert "\\lefthead")            (insert "\\lefthead")
1330            (cal-tex-arg (calendar-date-string date))            (cal-tex-arg (calendar-date-string date))
1331            (insert "\\weekend")            (insert "\\weekend")
# Line 1436  Optional prefix argument specifies numbe Line 1436  Optional prefix argument specifies numbe
1436      (cal-tex-hfill)      (cal-tex-hfill)
1437      (insert "}")      (insert "}")
1438      (cal-tex-banner "end of cal-tex-daily-page")))      (cal-tex-banner "end of cal-tex-daily-page")))
1439        
1440  ;;;  ;;;
1441  ;;;  Mini calendars  ;;;  Mini calendars
1442  ;;;  ;;;
# Line 1471  COLSEP gives the column separation; 1mm Line 1471  COLSEP gives the column separation; 1mm
1471        (setq str        (setq str
1472              (concat str              (concat str
1473                      (cal-tex-LaTeXify-string                      (cal-tex-LaTeXify-string
1474                       (substring (aref calendar-day-name-array                       (substring (aref calendar-day-name-array
1475                                        (mod (+ calendar-week-start-day i) 7))                                        (mod (+ calendar-week-start-day i) 7))
1476                                  0 2))                                  0 2))
1477                      (if (/= i 6)                      (if (/= i 6)
# Line 1538  FINAL-SEPARATOR is t." Line 1538  FINAL-SEPARATOR is t."
1538    
1539  (defun cal-tex-end-document ()  (defun cal-tex-end-document ()
1540    "Finish the LaTeX document.    "Finish the LaTeX document.
1541  Insert the trailer to LaTeX document, pop to LaTeX buffer, add  Insert the trailer to LaTeX document, pop to LaTeX buffer, add
1542  informative header, and run HOOK."  informative header, and run HOOK."
1543    (cal-tex-e-document)    (cal-tex-e-document)
1544    (latex-mode)    (latex-mode)
1545    (pop-to-buffer cal-tex-buffer)    (pop-to-buffer cal-tex-buffer)
1546    (goto-char (point-min))        (goto-char (point-min))
1547    (cal-tex-comment "       This buffer was produced by cal-tex.el.")    (cal-tex-comment "       This buffer was produced by cal-tex.el.")
1548    (cal-tex-comment "       To print a calendar, type")    (cal-tex-comment "       To print a calendar, type")
1549    (cal-tex-comment "          M-x tex-buffer RET")    (cal-tex-comment "          M-x tex-buffer RET")
# Line 1552  informative header, and run HOOK." Line 1552  informative header, and run HOOK."
1552    
1553  (defun cal-tex-insert-preamble (weeks landscape size &optional append)  (defun cal-tex-insert-preamble (weeks landscape size &optional append)
1554    "Initialize the output buffer.    "Initialize the output buffer.
1555  Select the output buffer, and insert the preamble for a calendar of  Select the output buffer, and insert the preamble for a calendar of
1556  WEEKS weeks.  Insert code for landscape mode if LANDSCAPE is true.  WEEKS weeks.  Insert code for landscape mode if LANDSCAPE is true.
1557  Use pointsize SIZE.  Optional argument APPEND, if t, means add to end of  Use pointsize SIZE.  Optional argument APPEND, if t, means add to end of
1558  without erasing current contents."  without erasing current contents."
1559    (let ((width "18cm")    (let ((width "18cm")
# Line 1565  without erasing current contents." Line 1565  without erasing current contents."
1565      (if (not append)      (if (not append)
1566          (progn          (progn
1567            (cal-tex-preamble size)            (cal-tex-preamble size)
1568            (if (not landscape)            (if (not landscape)
1569              (progn              (progn
1570                (cal-tex-cmd "\\oddsidemargin -1.75cm")                (cal-tex-cmd "\\oddsidemargin -1.75cm")
1571                (cal-tex-cmd "\\def\\holidaymult{.06}"))                (cal-tex-cmd "\\def\\holidaymult{.06}"))
# Line 1583  without erasing current contents." Line 1583  without erasing current contents."
1583                      (/ 1.1 (length cal-tex-which-days))))                      (/ 1.1 (length cal-tex-which-days))))
1584      (cal-tex-cmd "\\setlength{\\cellheight}" height)      (cal-tex-cmd "\\setlength{\\cellheight}" height)
1585      (insert (format "\\setlength{\\cellheight}{%f\\cellheight}\n"      (insert (format "\\setlength{\\cellheight}{%f\\cellheight}\n"
1586                      (/ 1.0 weeks)))                                    (/ 1.0 weeks)))
1587      (cal-tex-cmd "\\ \\par")      (cal-tex-cmd "\\ \\par")
1588      (cal-tex-vspace "-3cm")))      (cal-tex-vspace "-3cm")))
1589    
1590  (defvar cal-tex-LaTeX-subst-list  (defvar cal-tex-LaTeX-subst-list
1591    '(("\"". "``")    '(("\"". "``")
1592      ("\"". "''");; Quote changes meaning when list is reversed.      ("\"". "''");; Quote changes meaning when list is reversed.
1593      ("@" . "\\verb|@|")      ("@" . "\\verb|@|")
1594      ("&" . "\\&")      ("&" . "\\&")
1595      ("%" . "\\%")      ("%" . "\\%")
1596      ("$" . "\\$")      ("$" . "\\$")
1597      ("#" . "\\#")      ("#" . "\\#")
1598      ("_" . "\\_")      ("_" . "\\_")
# Line 1658  without erasing current contents." Line 1658  without erasing current contents."
1658  (defun cal-tex-nl (&optional skip comment)  (defun cal-tex-nl (&optional skip comment)
1659    "End a line with \\.  If SKIP, then add that much spacing.    "End a line with \\.  If SKIP, then add that much spacing.
1660     Add COMMENT if present"     Add COMMENT if present"
1661    (insert "\\\\")          (insert "\\\\")
1662    (if skip    (if skip
1663        (insert "[" skip "]"))        (insert "[" skip "]"))
1664    (cal-tex-comment comment))    (cal-tex-comment comment))
1665        
1666  (defun cal-tex-arg (&optional text)  (defun cal-tex-arg (&optional text)
1667    "Insert optional TEXT surrounded by braces."    "Insert optional TEXT surrounded by braces."
1668    (insert "{")    (insert "{")

Legend:
Removed from v.1.22  
changed lines
  Added in v.1.22.2.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26