emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Francesco Pizzolante <fpz-djc/iPCCuDYQheJpep6IedvLeJWuRmrY@public.gmane.org>
To: mailing-list-org-mode <emacs-orgmode-mXXj517/zsQ@public.gmane.org>
Subject: LaTeX export of headings to lists
Date: Fri, 27 May 2011 08:30:45 +0200	[thread overview]
Message-ID: <87r57k7izu.fsf@somewhere.org> (raw)

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

                 reply	other threads:[~2011-05-27  6:30 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r57k7izu.fsf@somewhere.org \
    --to=fpz-djc/ipccudyqhejpep6iedvlejwurmry@public.gmane.org \
    --cc=emacs-orgmode-mXXj517/zsQ@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).