diff options
author | Carsten Dominik <carsten.dominik@gmail.com> | 2010-12-15 12:37:45 +0100 |
---|---|---|
committer | Carsten Dominik <carsten.dominik@gmail.com> | 2010-12-15 12:37:45 +0100 |
commit | 8eee473f3760a3ccbdeea98e4de71d6a2464f9df (patch) | |
tree | 967da4ee15cad2ab3be54f49a38a5134c36396ea | |
parent | eb0d35dd185043933a0415222adc51906579dc67 (diff) | |
download | org-mode-8eee473f3760a3ccbdeea98e4de71d6a2464f9df.tar.gz |
Anchor outline regexp during LaTeX tree export
* lisp/org-latex.el (org-export-latex-first-lines): Anchor outline
regexp during LaTeX tree export
Jörg Hagmann writes:
> - If you export the (new) minimal example below to latex (C-cC-e l), it works.
> - If you only export a tree (Subtree in the example; C-cC-e 1 l), the first table ends at the horizontal line and everything between it and the next node (Subsubtree) is eliminated. The second (identical) table is exported correctly.
> - If you remove the asterisk(s) in the first table, it works.
>
> This problem crept in in the last days or weeks before 7.4.
>
> It may not be a problem for most of you, but I happen to have a number of files where columns are automatically displayed as tables preceding the first subnode (#+BEGIN: columnview ...). An alternative would be to display %ITEM in column-view without the asterisks.
>
> Emacs 23.2.1 on OS X 10.6.5
> Org-mode version 7.4 (release_7.4.24.g48b11.dirty)
>
> Thanks, Jörg
>
> -------New minimal example------------
> * Subtree
>
>
> | One | Two | Three |
> |--------+------+-------|
> | * Test | text | text |
> | ** One | text | text |
>
>
> Some text
>
> ** Subsubtree
>
> | One | Two | Three |
> |--------+------+-------|
> | * Test | text | text |
> | ** One | text | text |
-rw-r--r-- | lisp/org-latex.el | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/org-latex.el b/lisp/org-latex.el index a29c9f3..a261171 100644 --- a/lisp/org-latex.el +++ b/lisp/org-latex.el @@ -1325,7 +1325,8 @@ If END is non-nil, it is the end of the region." (save-excursion (goto-char (or beg (point-min))) (let* ((pt (point)) - (end (if (re-search-forward (org-get-limited-outline-regexp) end t) + (end (if (re-search-forward + (concat "^" (org-get-limited-outline-regexp)) end t) (goto-char (match-beginning 0)) (goto-char (or end (point-max)))))) (prog1 |