forked from mirrors/org-mode
LaTeX export: Fix export problems when exporting a region
Dan Griswold writes: > Hi there, > > Well, I think this a bug. > > Given this org input file: > > ,---- > | * Things > | ** A Heading > | - some > | - stuff > | - in > | - a > | - list > | ** Another heading > | - another > | - list > `---- > > then if I select the level one heading (titled "Things") > with C-c @, and export to LaTeX using C-c C-e l, I get this > output: > > ,---- > | % Created 2009-07-29 Wed 20:24 > | \documentclass[12pt]{article} > | \usepackage[utf8]{inputenc} > | \usepackage[T1]{fontenc} > | \usepackage{graphicx} > | \usepackage{longtable} > | \usepackage{hyperref} > | > | > | \title{Things} > | \author{Daniel M. Griswold} > | \date{July 29, 2009} > | > | \begin{document} > | > | \maketitle > | > | ** A Heading > | \begin{itemize} > | \item some > | \item stuff > | \item in > | \item a > | \item list > | \end{itemize} > | ** Another heading > | \begin{itemize} > | \item another > | \item list > | \end{itemize} > | > | \end{document} > `---- > > Note that the top level headings ("A Heading" and "Another > Heading") are not exported as \section, but with the > asterisks they have in the org file: > > ,---- > | ** A Heading > | \begin{itemize} > | > | ... snip ... > | > | \end{itemize} > | ** Another heading > `---- > > Exporting the whole file does what it's supposed to do: > export the headlines as \section and \subsection. This commit fixes the issue.
This commit is contained in:
parent
00658851ec
commit
8eba33958f
|
@ -1,5 +1,8 @@
|
||||||
2009-08-05 Carsten Dominik <carsten.dominik@gmail.com>
|
2009-08-05 Carsten Dominik <carsten.dominik@gmail.com>
|
||||||
|
|
||||||
|
* org-latex.el (org-export-latex-first-lines): Fix bug with
|
||||||
|
finding the end of the first lines.
|
||||||
|
|
||||||
* org.el (org-create-formula-image): Remove the -E option for
|
* org.el (org-create-formula-image): Remove the -E option for
|
||||||
dvipng.
|
dvipng.
|
||||||
|
|
||||||
|
|
|
@ -961,10 +961,9 @@ If END is non-nil, it is the end of the region."
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(goto-char (or beg (point-min)))
|
(goto-char (or beg (point-min)))
|
||||||
(let* ((pt (point))
|
(let* ((pt (point))
|
||||||
(end (or end
|
(end (if (re-search-forward "^\\*+ " end t)
|
||||||
(if (re-search-forward "^\\*+ " end t)
|
(goto-char (match-beginning 0))
|
||||||
(goto-char (match-beginning 0))
|
(goto-char end))))
|
||||||
(goto-char (point-max))))))
|
|
||||||
(prog1
|
(prog1
|
||||||
(org-export-latex-content
|
(org-export-latex-content
|
||||||
(org-export-preprocess-string
|
(org-export-preprocess-string
|
||||||
|
|
Loading…
Reference in New Issue