Allow a dash in the name of a latex document class setup.

A line like    #+LATEX_CLASS: auto-report
will now work.

Report by Nicolas Girad.
This commit is contained in:
Carsten Dominik 2010-04-23 20:57:47 +02:00
parent 98026d21e3
commit ff38550278
2 changed files with 4 additions and 1 deletions

View file

@ -1,5 +1,8 @@
2010-04-23 Carsten Dominik <carsten.dominik@gmail.com>
* org-latex.el (org-export-latex-set-initial-vars): Allow "-"
in latex class definitions
* org.el (org-shiftup-hook, org-shiftdown-hook)
(org-shiftleft-hook, org-shiftright-hook): New hooks.

View file

@ -1086,7 +1086,7 @@ LEVEL indicates the default depth for export."
(save-restriction
(widen)
(goto-char (point-min))
(and (re-search-forward "^#\\+LaTeX_CLASS:[ \t]*\\([a-zA-Z]+\\)" nil t)
(and (re-search-forward "^#\\+LaTeX_CLASS:[ \t]*\\(-[a-zA-Z]+\\)" nil t)
(match-string 1))))
(plist-get org-export-latex-options-plist :latex-class)
org-export-latex-default-class)