From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Re: [PATCH] Suppress extra newlines around source code in LaTeX export Date: Thu, 10 Dec 2009 09:08:14 +0100 Message-ID: References: <51b0095d0912011303n73abddefjfd37fa9fab055c03@mail.gmail.com> <51b0095d0912050358v4e0ec999k9a4e5826877ea995@mail.gmail.com> <51b0095d0912091450h6be7087bv2c68f9bd0b857a64@mail.gmail.com> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NIehg-0005YT-CY for emacs-orgmode@gnu.org; Thu, 10 Dec 2009 03:48:52 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NIeha-0005Qz-Sd for emacs-orgmode@gnu.org; Thu, 10 Dec 2009 03:48:51 -0500 Received: from [199.232.76.173] (port=35853 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NIeha-0005Qg-KM for emacs-orgmode@gnu.org; Thu, 10 Dec 2009 03:48:46 -0500 Received: from mail-ew0-f224.google.com ([209.85.219.224]:42884) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NIeha-0000qy-56 for emacs-orgmode@gnu.org; Thu, 10 Dec 2009 03:48:46 -0500 Received: by ewy24 with SMTP id 24so8984965ewy.26 for ; Thu, 10 Dec 2009 00:48:45 -0800 (PST) In-Reply-To: <51b0095d0912091450h6be7087bv2c68f9bd0b857a64@mail.gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Nicolas Girard Cc: emacs-orgmode On Dec 9, 2009, at 11:50 PM, Nicolas Girard wrote: > 2009/12/9 Carsten Dominik : >> Hi Nicolas, >> >> I need additional information with respect to this patch: >> > >>> diff --git a/lisp/org-latex.el b/lisp/org-latex.el >>> index ce697a3..18c2183 100644 >>> --- a/lisp/org-latex.el >>> +++ b/lisp/org-latex.el >>> @@ -877,7 +877,7 @@ If NUM, export sections as numerical 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\n" >>> + (insert (format "\\item %s\n%s" >>> heading >>> (if label (format "\\label{%s}" label) >>> ""))) >>> (insert (org-export-latex-content content)) >> >> Why would you like to remove the "\\" as well? When itemize lists >> are used >> to format headlines, I think there should be a line break after the >> end of >> the original headline. Otherwise the text below the headline will >> flow into >> the headline. Or am I missing something here? > > I think you're right ; I may have been abused by what Adobe Reader > displayed when performing my tests, as I just discovered that, for > whatever reason, it doesn't always reload the pdf file when using > > > Using this test document > > #=========== > * Level 1 > > ** Level 2 > > *** Level 3 > > **** Level 4 > Text > #=========== > > the current code produces > > %========== > \begin{itemize} > > \item Level 4\\ > \label{sec-1.1.1.1} > > Text > %========== > > There's an extra space produced by the \label{} because there's no '%' > at the end of it ; another solution is to move the \label before the > \\ I prefer to write \label{...}% if you can agree to that. > There's also an extra newline before "Text". > Please find attached my second proposal to fix this. > > >> >> >>> @@ -997,7 +997,7 @@ OPT-PLIST is the options plist for current >>> buffer." >>> (org-export-apply-macros-in-string org-export-latex-append- >>> header) >>> ;; insert the title >>> (format >>> - "\n\n\\title{%s}\n" >>> + "\n\\title{%s}\n" >>> ;; convert the title >>> (org-export-latex-content >>> title '(lists tables fixed-width keywords))) >> >> What is the problem with additional empty lines before \\title >> command. >> Does that really change anything in the output? > > It's not really a problem, it just seems to me like, the less extra > '\n' you see in the output of a LaTeX code generator, the more > confident you can be. > > -- > Nicolas > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode - Carsten