emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* LaTeX export of headings to lists
@ 2011-05-27  6:30 Francesco Pizzolante
  0 siblings, 0 replies; only message in thread
From: Francesco Pizzolante @ 2011-05-27  6:30 UTC (permalink / raw)
  To: mailing-list-org-mode

Hi,

When exporting headings to LaTeX lists, I can see extra vertical blank spaces
if the headings directly starts with a sub-heading or a list. It does not
happen if you have text in your heading (before the sub-heading or the list).

Here's my ECM:

--8<---------------cut here---------------start------------->8---
#+OPTIONS:   H:2 num:t toc:nil

* Level 1

** Level 2

*** Level 3

**** A

- A1
- A2
- A3

**** B

- B1
- B2
- B3
--8<---------------cut here---------------end--------------->8---

When exporting this example to LaTeX, you can see that there's extra space
between:

- Level 3 and A
- A and A1
- B and B1

This happens beacause the LaTeX export adds and extra line break (\\) after
each \item in addition to the newline (\n). I thus propose the following patch
which fixes the problem:

--8<---------------cut here---------------start------------->8---
index 764a48d..706bb4a 100644
--- a/lisp/org-latex.el
+++ b/lisp/org-latex.el
@@ -1234,7 +1234,7 @@ numbered sections and lower levels as unnumbered sections."
                 (delete-region (point-at-bol 0) (point))
               (insert (format "\\begin{%s}\n"
                               (symbol-name org-export-latex-low-levels))))
-            (insert (format "\n\\item %s\\\\\n%s%%"
+            (insert (format "\n\\item %s\n%s%%"
                             heading
                             (if label (format "\\label{%s}" label) "")))
             (insert (org-export-latex-content content))
--8<---------------cut here---------------end--------------->8---

If you don't see any problem with this fix, could you apply it?

Thanks a lot,
 Francesco Pizzolante

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2011-05-27  6:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-27  6:30 LaTeX export of headings to lists Francesco Pizzolante

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).