annotate etc/auctex/style/foils.el @ 118:7d55a9ba150c r20-1b11

Import from CVS: tag r20-1b11
author cvs
date Mon, 13 Aug 2007 09:24:17 +0200
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
118
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
1 ;;; foils.el - Special code for FoilTeX.
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
2
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
3 ;; $Id: foils.el,v 1.1 1997/04/05 17:56:45 steve Exp $
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
4
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
5 ;;; Code:
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
6
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
7 (require 'latex)
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
8
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
9 (TeX-add-style-hook "foils"
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
10 (function
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
11 (lambda ()
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
12 (add-hook 'LaTeX-document-style-hook 'LaTeX-style-foils)
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
13 (setq LaTeX-default-style "foils")
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
14 (setq LaTeX-default-options '("landscape"))
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
15 (TeX-add-symbols
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
16 '("foilhead" [ "Rubric-body separation" ] "Foil rubric")))))
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
17
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
18 (defun LaTeX-style-foils nil
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
19 "Prompt for and insert foiltex options."
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
20 (require 'timezone)
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
21 (let* ((date (timezone-parse-date (current-time-string)))
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
22 (year (string-to-int (aref date 0)))
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
23 (month (string-to-int (aref date 1)))
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
24 (day (string-to-int (aref date 2)))
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
25 (title (read-input "Title: ")))
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
26 (save-excursion
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
27 (goto-char (point-max))
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
28 (re-search-backward ".begin.document.")
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
29 (insert TeX-esc "title"
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
30 TeX-grop title TeX-grcl "\n")
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
31 (insert TeX-esc "author"
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
32 TeX-grop (user-full-name) TeX-grcl "\n")
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
33 (insert TeX-esc "date" TeX-grop
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
34 (format "%d-%02d-%02d" year month day)
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
35 TeX-grcl "\n")
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
36 (insert "" TeX-esc "\nMyLogo" TeX-grop TeX-grcl "\n")
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
37 (insert "%" TeX-esc "Restriction" TeX-grop TeX-grcl "\n")
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
38 (insert "%" TeX-esc "rightfooter" TeX-grop TeX-grcl "\n")
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
39 (insert "%" TeX-esc "leftheader" TeX-grop TeX-grcl "\n")
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
40 (insert "%" TeX-esc "rightheader" TeX-grop TeX-grcl "\n\n")
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
41 (re-search-forward ".begin.document.")
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
42 (end-of-line)
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
43 (newline-and-indent)
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
44 (insert "" TeX-esc "maketitle\n\n"))
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
45 (forward-line -1)))
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
46
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents:
diff changeset
47 ;;; foils.el ends here