summaryrefslogtreecommitdiff
path: root/tw/home/files/emacs-packages/org-latex-classes.el
blob: 90d13341d759a0868d95532a1381f8d530282005 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
;;; org-latex-classes.el --- LaTeX documentclass definitions for org-mode.
;;; Commentary:
;;; Code:
(require 'ox-latex)

(defun tw/latex-section-commands (name)
  "Create a pair of section commands like (\"\\NAME{%s}\" . \"\\NAME*{%s}\")."
  (cons (format "\\%s{%%s}" name) (format "\\%s*{%%s}" name)))

(defconst tw/latex-part (tw/latex-section-commands "part"))
(defconst tw/latex-chapter (tw/latex-section-commands "chapter"))
(defconst tw/latex-section-and-below
  (mapcar #'tw/latex-section-commands
          '("section" "subsection" "subsubsection" "paragraph" "subparagraph")))

(setq org-latex-classes
      `(("paperlike" "\\documentclass{paperlike}"
         . ,tw/latex-section-and-below)

        ("examtext" "\\documentclass{examtext}"
         . ,tw/latex-section-and-below)

        ("minutes" "\\documentclass{minutes}"
         . ,tw/latex-section-and-below)

        ("mapreport" "\\documentclass{mapreport}"
         ,tw/latex-chapter . ,tw/latex-section-and-below)

        ("pt3report" "\\documentclass{pt3report}"
         ,tw/latex-chapter . ,tw/latex-section-and-below)

        ("article" "\\documentclass{article}"
         . ,tw/latex-section-and-below)

        ("scrartcl" "\\documentclass{scrartcl}"
         . ,tw/latex-section-and-below)

        ("report" "\\documentclass{report}"
         ,tw/latex-part ,tw/latex-chapter . ,tw/latex-section-and-below)

        ("report-noparts" "\\documentclass{report}"
         ,tw/latex-chapter . ,tw/latex-section-and-below)

        ("book" "\\documentclass{book}"
         ,tw/latex-part ,tw/latex-chapter . ,tw/latex-section-and-below)

        ("book-noparts" "\\documentclass{book}"
         ,tw/latex-chapter . ,tw/latex-section-and-below)

        ("checklist" "\\documentclass{checklist}"
         . ,tw/latex-section-and-below)))

(provide 'org-latex-classes)
;;; org-latex-classes.el ends here