[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
<Ctrl-r>
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
\\
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
noextralines.patch
Description: Text Data
- [Orgmode] [PATCH] Suppress extra newlines around source code in LaTeX export, Nicolas Girard, 2009/12/01
- Re: [Orgmode] [PATCH] Suppress extra newlines around source code in LaTeX export, Carsten Dominik, 2009/12/03
- [Orgmode] Re: [PATCH] Suppress extra newlines around source code in LaTeX export, Nicolas Girard, 2009/12/05
- Re: [Orgmode] Re: [PATCH] Suppress extra newlines around source code in LaTeX export, Carsten Dominik, 2009/12/09
- Re: [Orgmode] Re: [PATCH] Suppress extra newlines around source code in LaTeX export, Nicolas Girard, 2009/12/09
- Re: [Orgmode] Re: [PATCH] Suppress extra newlines around source code in LaTeX export, Nicolas Girard, 2009/12/10
- Re: [Orgmode] Re: [PATCH] Suppress extra newlines around source code in LaTeX export, Carsten Dominik, 2009/12/14
- Re: [Orgmode] Re: [PATCH] Suppress extra newlines around source code in LaTeX export, Nicolas Girard, 2009/12/15
- Re: [Orgmode] Re: [PATCH] Suppress extra newlines around source code in LaTeX export, Carsten Dominik, 2009/12/16
- Re: [Orgmode] Re: [PATCH] Suppress extra newlines around source code in LaTeX export,
Nicolas Girard <=
- Re: [Orgmode] Re: [PATCH] Suppress extra newlines around source code in LaTeX export, Nicolas Girard, 2009/12/09
- Re: [Orgmode] Re: [PATCH] Suppress extra newlines around source code in LaTeX export, Carsten Dominik, 2009/12/10
- Re: [Orgmode] Re: [PATCH] Suppress extra newlines around source code in LaTeX export, Nicolas Girard, 2009/12/10
- Re: [Orgmode] Re: [PATCH] Suppress extra newlines around source code in LaTeX export, Carsten Dominik, 2009/12/10
- Re: [Orgmode] Re: [PATCH] Suppress extra newlines around source code in LaTeX export, Nicolas Girard, 2009/12/10