;;; org-latex.el --- LaTeX exporter for org-mode
;;
-;; Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+;; Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
;;
;; Emacs Lisp Archive Entry
;; Filename: org-latex.el
-;; Version: 6.33c
+;; Version: 6.33x
;; Author: Bastien Guerry <bzg AT altern DOT org>
;; Maintainer: Carsten Dominik <carsten.dominik AT gmail DOT com>
;; Keywords: org, wp, tex
:group 'org-export-latex
:type 'boolean)
-(defcustom org-export-latex-packages-alist nil
- "Alist of packages to be inserted in the header.
-Each cell is of the format \( \"option\" . \"package\" \)."
- :group 'org-export-latex
- :type '(repeat
- (list
- (string :tag "option")
- (string :tag "package"))))
-
(defcustom org-export-latex-low-levels 'itemize
"How to convert sections below the current level of sectioning.
This is specified by the `org-export-headline-levels' option or the
"Convert fontification to LaTeX."
(goto-char (point-min))
(while (re-search-forward org-emph-re nil t)
- ;; The match goes one char after the *string*
+ ;; The match goes one char after the *string*, except at the end of a line
(let ((emph (assoc (match-string 3)
org-export-latex-emphasis-alist))
(beg (match-beginning 0))
(if (caddr emph)
(setq rpl (org-export-latex-protect-string rpl))
(save-match-data
- (if (string-match "\\`.\\(\\\\[a-z]+{\\)\\(.*\\)\\(}\\).\\'" rpl)
+ (if (string-match "\\`.\\(\\\\[a-z]+{\\)\\(.*\\)\\(}\\).?\\'" rpl)
(progn
(add-text-properties (match-beginning 1) (match-end 1)
'(org-protected t) rpl)
(save-excursion
(if (not (re-search-forward (concat "^" (regexp-quote foot-prefix))
nil t))
- (replace-match "$^{\\1}$")
+ (replace-match (org-export-latex-protect-string
+ (concat "$^{" (match-string 1) "}$")))
(replace-match "")
(let ((end (save-excursion
(if (re-search-forward "^$\\|^#.*$\\|\\[[0-9]+\\]" nil t)