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: Wed, 9 Dec 2009 11:00:36 +0100 Message-ID: References: <51b0095d0912011303n73abddefjfd37fa9fab055c03@mail.gmail.com> <51b0095d0912050358v4e0ec999k9a4e5826877ea995@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 1NIK1P-0001nV-8D for emacs-orgmode@gnu.org; Wed, 09 Dec 2009 05:43:51 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NIK1J-0001k2-Hz for emacs-orgmode@gnu.org; Wed, 09 Dec 2009 05:43:49 -0500 Received: from [199.232.76.173] (port=39606 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NIK1J-0001jj-4n for emacs-orgmode@gnu.org; Wed, 09 Dec 2009 05:43:45 -0500 Received: from ey-out-1920.google.com ([74.125.78.148]:31157) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NIK1I-0000cx-Jn for emacs-orgmode@gnu.org; Wed, 09 Dec 2009 05:43:44 -0500 Received: by ey-out-1920.google.com with SMTP id 4so890226eyg.34 for ; Wed, 09 Dec 2009 02:43:43 -0800 (PST) In-Reply-To: <51b0095d0912050358v4e0ec999k9a4e5826877ea995@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 Hi Nicolas, I need additional information with respect to this patch: > diff --git a/lisp/org-exp.el b/lisp/org-exp.el > index 4c4d540..75ee548 100644 > --- a/lisp/org-exp.el > +++ b/lisp/org-exp.el > @@ -2423,7 +2423,7 @@ INDENT was the original indentation of the > block." > (concat (car org-export-latex-verbatim- > wrap) > rtn (cdr org-export-latex- > verbatim-wrap))) > '(org-protected t)) > - "#+END_LaTeX\n")) > + "#+END_LaTeX")) > ((eq backend 'ascii) > ;; This is not HTML or LaTeX, so just make it an example. > (setq rtn (org-export-number-lines rtn 'ascii 0 0 num cont > rpllbl fmt)) I have fixed this part, in a different way though. > 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? > @@ -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? Thanks. - Carsten > On Dec 5, 2009, at 12:58 PM, Nicolas Girard wrote: > 2009/12/1 Nicolas Girard : >> Hi, >> title says it all. >> > > Hi, > > attached is a second patch which suppresses some other extra newlines > in the LaTeX export. Let me know if you need any explanation. > > -- > 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