Mercurial > emacs
comparison lisp/calendar/cal-tex.el @ 88155:d7ddb3e565de
sync with trunk
author | Henrik Enberg <henrik.enberg@telia.com> |
---|---|
date | Mon, 16 Jan 2006 00:03:54 +0000 |
parents | 0d8b17d428b5 |
children |
comparison
equal
deleted
inserted
replaced
88154:8ce476d3ba36 | 88155:d7ddb3e565de |
---|---|
1 ;;; cal-tex.el --- calendar functions for printing calendars with LaTeX | 1 ;;; cal-tex.el --- calendar functions for printing calendars with LaTeX |
2 | 2 |
3 ;; Copyright (C) 1995 Free Software Foundation, Inc. | 3 ;; Copyright (C) 1995, 2001, 2002, 2003, 2004, 2005 |
4 ;; Free Software Foundation, Inc. | |
4 | 5 |
5 ;; Author: Steve Fisk <fisk@bowdoin.edu> | 6 ;; Author: Steve Fisk <fisk@bowdoin.edu> |
6 ;; Edward M. Reingold <reingold@cs.uiuc.edu> | 7 ;; Edward M. Reingold <reingold@cs.uiuc.edu> |
8 ;; Maintainer: Glenn Morris <rgm@gnu.org> | |
7 ;; Keywords: calendar | 9 ;; Keywords: calendar |
8 ;; Human-Keywords: Calendar, LaTeX | 10 ;; Human-Keywords: Calendar, LaTeX |
9 | 11 |
10 ;; This file is part of GNU Emacs. | 12 ;; This file is part of GNU Emacs. |
11 | 13 |
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 21 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
20 ;; GNU General Public License for more details. | 22 ;; GNU General Public License for more details. |
21 | 23 |
22 ;; You should have received a copy of the GNU General Public License | 24 ;; You should have received a copy of the GNU General Public License |
23 ;; along with GNU Emacs; see the file COPYING. If not, write to the | 25 ;; along with GNU Emacs; see the file COPYING. If not, write to the |
24 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 26 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
25 ;; Boston, MA 02111-1307, USA. | 27 ;; Boston, MA 02110-1301, USA. |
26 | 28 |
27 ;;; Commentary: | 29 ;;; Commentary: |
28 | 30 |
29 ;; This collection of functions implements the creation of LaTeX calendars | 31 ;; This collection of functions implements the creation of LaTeX calendars |
30 ;; based on the user's holiday choices and diary file. | 32 ;; based on the user's holiday choices and diary file. |
156 "The initial LaTeX code for a day. | 158 "The initial LaTeX code for a day. |
157 The holidays, diary entries, bottom string, and the text follow.") | 159 The holidays, diary entries, bottom string, and the text follow.") |
158 | 160 |
159 (defvar cal-tex-day-name-format "\\myday{%s}%%" | 161 (defvar cal-tex-day-name-format "\\myday{%s}%%" |
160 "The format for LaTeX code for a day name. The names are taken from | 162 "The format for LaTeX code for a day name. The names are taken from |
161 calendar-day-name-array.") | 163 `calendar-day-name-array'.") |
162 | 164 |
163 (defvar cal-tex-cal-one-month | 165 (defvar cal-tex-cal-one-month |
164 "\\def\\calmonth#1#2% | 166 "\\def\\calmonth#1#2% |
165 {\\begin{center}% | 167 {\\begin{center}% |
166 \\Huge\\bf\\uppercase{#1} #2 \\\\[1cm]% | 168 \\Huge\\bf\\uppercase{#1} #2 \\\\[1cm]% |
646 7))) | 648 7))) |
647 | 649 |
648 ;;; | 650 ;;; |
649 ;;; Weekly calendars | 651 ;;; Weekly calendars |
650 ;;; | 652 ;;; |
653 | |
654 (defvar cal-tex-LaTeX-hourbox | |
655 "\\newcommand{\\hourbox}[2]% | |
656 {\\makebox[2em]{\\rule{0cm}{#2ex}#1}\\rule{3in}{.15mm}}\n" | |
657 "One hour and a line on the right.") | |
651 | 658 |
652 (defun cal-tex-cursor-week (&optional arg) | 659 (defun cal-tex-cursor-week (&optional arg) |
653 "Make a buffer with LaTeX commands for a two-page one-week calendar. | 660 "Make a buffer with LaTeX commands for a two-page one-week calendar. |
654 It applies to the week that point is in. | 661 It applies to the week that point is in. |
655 Optional prefix argument specifies number of weeks. | 662 Optional prefix argument specifies number of weeks. |
867 (progn | 874 (progn |
868 (run-hooks 'cal-tex-week-hook) | 875 (run-hooks 'cal-tex-week-hook) |
869 (cal-tex-newpage)))) | 876 (cal-tex-newpage)))) |
870 (cal-tex-end-document) | 877 (cal-tex-end-document) |
871 (run-hooks 'cal-tex-hook))) | 878 (run-hooks 'cal-tex-hook))) |
872 | |
873 (defvar cal-tex-LaTeX-hourbox | |
874 "\\newcommand{\\hourbox}[2]% | |
875 {\\makebox[2em]{\\rule{0cm}{#2ex}#1}\\rule{3in}{.15mm}}\n" | |
876 "One hour and a line on the right.") | |
877 | 879 |
878 (defun cal-tex-week-hours (date holidays height) | 880 (defun cal-tex-week-hours (date holidays height) |
879 "Insert hourly entries for DATE with HOLIDAYS, with line height HEIGHT." | 881 "Insert hourly entries for DATE with HOLIDAYS, with line height HEIGHT." |
880 (let ((month (extract-calendar-month date)) | 882 (let ((month (extract-calendar-month date)) |
881 (day (extract-calendar-day date)) | 883 (day (extract-calendar-day date)) |
1779 "Insert STRING in large bf size." | 1781 "Insert STRING in large bf size." |
1780 (insert "{\\large\\bf " string "}")) | 1782 (insert "{\\large\\bf " string "}")) |
1781 | 1783 |
1782 (provide 'cal-tex) | 1784 (provide 'cal-tex) |
1783 | 1785 |
1786 ;;; arch-tag: ca8168a4-5a00-4508-a565-17e3bccce6d0 | |
1784 ;;; cal-tex.el ends here | 1787 ;;; cal-tex.el ends here |