aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl Heuer1997-09-24 16:28:34 +0000
committerKarl Heuer1997-09-24 16:28:34 +0000
commitff3f9a42bcd550eee4346057b4f55b0c72b1c1ee (patch)
tree0c6fec7c85089fe23adb9253861f8c6936712988
parent686481e7867fbb086b4a45de30679edec4b844fe (diff)
downloademacs-ff3f9a42bcd550eee4346057b4f55b0c72b1c1ee.tar.gz
emacs-ff3f9a42bcd550eee4346057b4f55b0c72b1c1ee.zip
(cal-tex-cursor-filofax-daily): New function.
Delete from "to do" list.
-rw-r--r--lisp/calendar/cal-tex.el100
1 files changed, 99 insertions, 1 deletions
diff --git a/lisp/calendar/cal-tex.el b/lisp/calendar/cal-tex.el
index 172f5d5ff84..14cb64cfce5 100644
--- a/lisp/calendar/cal-tex.el
+++ b/lisp/calendar/cal-tex.el
@@ -37,7 +37,7 @@
37;; 37;;
38;; (*) Make calendar styles for A4 paper. 38;; (*) Make calendar styles for A4 paper.
39;; 39;;
40;; (*) Make daily and monthly styles Filofax paper. 40;; (*) Make monthly styles Filofax paper.
41 41
42;;; Code: 42;;; Code:
43 43
@@ -1199,6 +1199,104 @@ Holidays are included if `cal-tex-holidays' is t."
1199 (cal-tex-newpage)))) 1199 (cal-tex-newpage))))
1200 (cal-tex-end-document) 1200 (cal-tex-end-document)
1201 (run-hooks 'cal-tex-hook))) 1201 (run-hooks 'cal-tex-hook)))
1202
1203(defun cal-tex-cursor-filofax-daily (&optional arg)
1204 "Day-per-page Filofax style calendar for week indicated by cursor.
1205Optional prefix argument specifies number of weeks. Weeks start on Monday.
1206Diary entries are included if `cal-tex-diary' is t.
1207Holidays are included if `cal-tex-holidays' is t."
1208 (interactive "P")
1209 (let* ((n (if arg arg 1))
1210 (date (calendar-gregorian-from-absolute
1211 (calendar-dayname-on-or-before
1212 1
1213 (calendar-absolute-from-gregorian
1214 (calendar-cursor-to-date t)))))
1215 (month (extract-calendar-month date))
1216 (year (extract-calendar-year date))
1217 (day (extract-calendar-day date))
1218 (holidays (if cal-tex-holidays
1219 (cal-tex-list-holidays
1220 (calendar-absolute-from-gregorian date)
1221 (+ (* 7 n)
1222 (calendar-absolute-from-gregorian date)))))
1223 (diary-list (if cal-tex-diary
1224 (cal-tex-list-diary-entries
1225 (calendar-absolute-from-gregorian
1226 (list month 1 year))
1227 (+ (* 7 n)
1228 (calendar-absolute-from-gregorian date))))))
1229 (cal-tex-preamble "twoside")
1230 (cal-tex-cmd "\\textwidth 3.25in")
1231 (cal-tex-cmd "\\textheight 6.5in")
1232 (cal-tex-cmd "\\oddsidemargin 1.75in")
1233 (cal-tex-cmd "\\evensidemargin 1.5in")
1234 (cal-tex-cmd "\\topmargin 0pt")
1235 (cal-tex-cmd "\\headheight -0.875in")
1236 (cal-tex-cmd "\\headsep 0.125in")
1237 (cal-tex-cmd "\\footskip .125in")
1238 (insert "\\def\\righthead#1{\\hfill {\\normalsize \\bf #1}\\\\[-6pt]}
1239\\long\\def\\rightday#1#2#3{%
1240 \\rule{\\textwidth}{0.3pt}\\\\%
1241 \\hbox to \\textwidth{%
1242 \\vbox to 1.85in{%
1243 \\vspace*{2pt}%
1244 \\hbox to \\textwidth{\\hfill \\small #3 \\hfill}%
1245 \\hbox to \\textwidth{\\vbox {\\raggedleft \\em #2}}%
1246 \\hbox to \\textwidth{\\vbox to 0pt {\\noindent \\footnotesize #1}}}}}
1247\\long\\def\\weekend#1#2#3{%
1248 \\rule{\\textwidth}{0.3pt}\\\\%
1249 \\hbox to \\textwidth{%
1250 \\vbox to 2in{%
1251 \\vspace*{2pt}%
1252 \\hbox to \\textwidth{\\hfill \\small #3 \\hfill}%
1253 \\hbox to \\textwidth{\\vbox {\\noindent \\em #2}}%
1254 \\hbox to \\textwidth{\\vbox to 0pt {\\noindent \\footnotesize #1}}}}}
1255\\def\\lefthead#1{\\noindent {\\normalsize \\bf #1}\\hfill\\\\[-6pt]}
1256\\long\\def\\leftday#1#2#3{%
1257 \\rule{\\textwidth}{0.3pt}\\\\%
1258 \\hbox to \\textwidth{%
1259 \\vbox to 1.85in{%
1260 \\vspace*{2pt}%
1261 \\hbox to \\textwidth{\\hfill \\small #3 \\hfill}%
1262 \\hbox to \\textwidth{\\vbox {\\noindent \\em #2}}%
1263 \\hbox to \\textwidth{\\vbox to 0pt {\\noindent \\footnotesize #1}}}}}
1264")
1265 (cal-tex-b-document)
1266 (cal-tex-cmd "\\pagestyle{empty}")
1267 (calendar-for-loop i from 1 to n do
1268 (calendar-for-loop j from 1 to 5 do
1269 (insert (if (oddp j) "\\righthead" "\\lefthead"))
1270 (cal-tex-arg (calendar-date-string date))
1271 (insert "%\n")
1272 (insert (if (oddp j) "\\rightday" "\\leftday"))
1273 (cal-tex-arg (cal-tex-latexify-list diary-list date))
1274 (cal-tex-arg (cal-tex-latexify-list holidays date))
1275 (cal-tex-arg (eval cal-tex-daily-string))
1276 (insert "%\n")
1277 (insert "\\vfill\\noindent\\rule{\\textwidth}{0.3pt}\\\\%\n")
1278 (cal-tex-newpage)
1279 (setq date (cal-tex-incr-date date)))
1280 (insert "%\n")
1281 (calendar-for-loop j from 1 to 2 do
1282 (insert "\\lefthead")
1283 (cal-tex-arg (calendar-date-string date))
1284 (insert "\\weekend")
1285 (cal-tex-arg (cal-tex-latexify-list diary-list date))
1286 (cal-tex-arg (cal-tex-latexify-list holidays date))
1287 (cal-tex-arg (eval cal-tex-daily-string))
1288 (insert "%\n")
1289 (insert "\\vfill")
1290 (setq date (cal-tex-incr-date date)))
1291 (insert "\\noindent\\rule{\\textwidth}{0.3pt}\\\\%\n")
1292 (if (/= i n)
1293 (progn
1294 (run-hooks 'cal-tex-week-hook)
1295 (cal-tex-newpage))))
1296 (cal-tex-end-document)
1297 (run-hooks 'cal-tex-hook)))
1298
1299
1202;;; 1300;;;
1203;;; Daily calendars 1301;;; Daily calendars
1204;;; 1302;;;