[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] Re: [PATCH] Suppress extra newlines around source code in

From: Nicolas Girard
Subject: Re: [Orgmode] Re: [PATCH] Suppress extra newlines around source code in LaTeX export
Date: Wed, 9 Dec 2009 23:50:49 +0100

2009/12/9 Carsten Dominik <address@hidden>:
> 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

the current code produces


\item Level 4\\


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
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.


Attachment: noextralines.patch
Description: Text Data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]