From f0d58188ca0d1146cab64d3bdfd23cacf8a8872b Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Fri, 27 Aug 2010 09:29:25 +0200 Subject: [PATCH] Revert "Bug: possible bug in latex export [7.01trans (release_6.36.735.g15ca.dirty)]" This reverts commit bb0a1f190be361ce1d717d79d411b88406d74c33. --- lisp/org-latex.el | 29 +++++++---------------------- 1 file changed, 7 insertions(+), 22 deletions(-) diff --git a/lisp/org-latex.el b/lisp/org-latex.el index 4f27f425a..f2b9d55f3 100644 --- a/lisp/org-latex.el +++ b/lisp/org-latex.el @@ -952,28 +952,13 @@ Return a list reflecting the document structure." (defun org-export-latex-parse-subcontent (level odd) "Extract the subcontent of a section at LEVEL. If ODD Is non-nil, assume subcontent only contains odd sections." - - (let (nstars new-level) - ;; In the search, we should not assume there will be exactly - ;; LEVEL+1 stars in the next heading, as there may be more than - ;; that number of stars. hence the regexp should be \\*{N,} - ;; rather than just \\*{N} (i.e. no upper bound, but N is minimum - ;; number of stars to expect.) - ;; We then have to check how many stars were found, rather than - ;; assuming there were exactly N. - (when (org-re-search-forward-unprotected - (concat "^\\(\\(?:\\*\\)\\{" - (number-to-string (+ (if odd 4 2) level)) - ",\\}\\) \\(.*\\)$") - nil t) - (setq nstars (1- (- (match-end 1) (match-beginning 1)))) - (setq new-level (if odd - (/ (+ 3 nstars) 2);; not entirely sure why +3! - nstars))) - (if nstars - (org-export-latex-parse-global new-level odd) - nil) ; subcontent is nil - )) + (if (not (org-re-search-forward-unprotected + (concat "^\\(\\(?:\\*\\)\\{" + (number-to-string (+ (if odd 4 2) level)) + "\\}\\) \\(.*\\)$") + nil t)) + nil ; subcontent is nil + (org-export-latex-parse-global (+ (if odd 2 1) level) odd))) ;;; Rendering functions: (defun org-export-latex-global (content)