Ver código fonte

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.
Carsten Dominik 15 anos atrás
pai
commit
ff38550278
2 arquivos alterados com 4 adições e 1 exclusões
  1. 3 0
      lisp/ChangeLog
  2. 1 1
      lisp/org-latex.el

+ 3 - 0
lisp/ChangeLog

@@ -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.
 

+ 1 - 1
lisp/org-latex.el

@@ -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)