[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] #+LaTeX_CLASS regex too restrictive?

From: Richard Lewis
Subject: [O] #+LaTeX_CLASS regex too restrictive?
Date: Sat, 29 Oct 2011 12:19:09 +0100
User-agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Goj┼Ź) APEL/10.8 Emacs/23.3 (i486-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)

Hi there,

I updated my org-mode repository last night and found today that my
LaTeX export wasn't working anymore because it couldn't find the LaTeX
class: "No definition for class `%s' in `org-export-latex-classes'".

The class name I'm using includes "/" characters. However, the regex
for matching #+LaTeX_CLASS allows only alphabetic characters or
"-". The following change fixed this for me, but perhaps it's now a
little too inclusive?

diff --git a/lisp/org-latex.el b/lisp/org-latex.el
index 649e4a7..e9502ae 100644
--- a/lisp/org-latex.el
+++ b/lisp/org-latex.el
@@ -1346,7 +1346,7 @@ LEVEL indicates the default depth for export."
                (goto-char (point-min))
-               (and (re-search-forward "^#\\+LaTeX_CLASS:[ 
\t]*\\([-a-zA-Z]+\\)" nil t)
+               (and (re-search-forward "^#\\+LaTeX_CLASS:[ \t]*\\(.+\\)$" nil 
                     (match-string 1))))
            (plist-get org-export-latex-options-plist :latex-class)

Richard Lewis
ISMS, Computing
Goldsmiths, University of London
Tel: +44 (0)20 7078 5134
Skype: richardjlewis
JID: address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]