* Do not export single newlines to latex
@ 2014-06-07 17:19 Alexander Baier
2014-06-09 7:42 ` James Harkins
0 siblings, 1 reply; 3+ messages in thread
From: Alexander Baier @ 2014-06-07 17:19 UTC (permalink / raw
To: emacs-orgmode
Hello org-moders!
I am writing a document for which my main export target is latex. To
obtain reasonable diffs wrt version control systems, I use one line
per sentence in addition to =visual-line-mode= as was mentioned in this
post last November http://thread.gmane.org/gmane.emacs.orgmode/78332.
The problem with this is that these newlines get translated to newlines
in latex aka "\\<newline>". I want the export back end to ignore those
single newlines and only insert "\\<newline>" into the latex document
upon encountering two consecutive newlines in my org-mode file.
Do I have to write a filter for this, or is this configurable by some
variable?
Regards,
--
Alexander Baier
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Do not export single newlines to latex
2014-06-07 17:19 Do not export single newlines to latex Alexander Baier
@ 2014-06-09 7:42 ` James Harkins
2014-06-09 11:13 ` Alexander Baier
0 siblings, 1 reply; 3+ messages in thread
From: James Harkins @ 2014-06-09 7:42 UTC (permalink / raw
To: emacs-orgmode
Alexander Baier <alexander.baier <at> mailbox.org> writes:
> I am writing a document for which my main export target is latex. To
> obtain reasonable diffs wrt version control systems, I use one line
> per sentence in addition to =visual-line-mode= as was mentioned in this
> post last November http://thread.gmane.org/gmane.emacs.orgmode/78332.
>
> The problem with this is that these newlines get translated to newlines
> in latex aka "\\<newline>".
I use the LaTeX exporter routinely, and I have never seen this behavior. For
instance,
~~~ org input file
* Headline
The first sentence.
The second sentence.
~~~
~~~ LaTeX export (minus preamble)
\begin{document}
\maketitle
\tableofcontents
\section{Headline}
\label{sec-1}
The first sentence.
The second sentence.
% Emacs 23.3.1 (Org mode 8.2.5f)
\end{document}
~~~
I also checked the customization variables in the org-export-latex group,
and I didn't see anything immediately relevant to newline translation.
So I can think of a couple of possibilities:
- You might have some strange configuration lying around somewhere.
(Additional evidence that you're seeing nonstandard behavior is that none of
the .el files in the org distribution contain the string 'newline', let
alone '<newline>'.)
- Or you might be using a newer org than I'm using, in which case you might
be seeing a regression bug. (As far as I know, a single line break in the
input should definitely not translate into "\\<newline>"!!)
> I want the export back end to ignore those
> single newlines and only insert "\\<newline>" into the latex document
> upon encountering two consecutive newlines in my org-mode file.
Two consecutive line breaks in the input should be copied over directly into
the .tex file. It's then up to LaTeX to interpret this -- per its own
standards -- as a paragraph break. Again, "\\<newline>" would be quite
exceptional.
hjh
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Do not export single newlines to latex
2014-06-09 7:42 ` James Harkins
@ 2014-06-09 11:13 ` Alexander Baier
0 siblings, 0 replies; 3+ messages in thread
From: Alexander Baier @ 2014-06-09 11:13 UTC (permalink / raw
To: James Harkins; +Cc: emacs-orgmode
On 2014-06-09 09:42 James Harkins wrote:
> Alexander Baier <alexander.baier <at> mailbox.org> writes:
>
>> I am writing a document for which my main export target is latex. To
>> obtain reasonable diffs wrt version control systems, I use one line
>> per sentence in addition to =visual-line-mode= as was mentioned in this
>> post last November http://thread.gmane.org/gmane.emacs.orgmode/78332.
>>
>> The problem with this is that these newlines get translated to newlines
>> in latex aka "\\<newline>".
>
> I use the LaTeX exporter routinely, and I have never seen this behavior. For
> instance,
>
> ~~~ org input file
> * Headline
> The first sentence.
> The second sentence.
> ~~~
>
> ~~~ LaTeX export (minus preamble)
> \begin{document}
>
> \maketitle
> \tableofcontents
>
> \section{Headline}
> \label{sec-1}
> The first sentence.
> The second sentence.
> % Emacs 23.3.1 (Org mode 8.2.5f)
> \end{document}
> ~~~
>
> I also checked the customization variables in the org-export-latex group,
> and I didn't see anything immediately relevant to newline translation.
>
> So I can think of a couple of possibilities:
>
> - You might have some strange configuration lying around somewhere.
> (Additional evidence that you're seeing nonstandard behavior is that none of
> the .el files in the org distribution contain the string 'newline', let
> alone '<newline>'.)
>
> - Or you might be using a newer org than I'm using, in which case you might
> be seeing a regression bug. (As far as I know, a single line break in the
> input should definitely not translate into "\\<newline>"!!)
>
>> I want the export back end to ignore those
>> single newlines and only insert "\\<newline>" into the latex document
>> upon encountering two consecutive newlines in my org-mode file.
>
> Two consecutive line breaks in the input should be copied over directly into
> the .tex file. It's then up to LaTeX to interpret this -- per its own
> standards -- as a paragraph break. Again, "\\<newline>" would be quite
> exceptional.
You misunderstood me, maybe I didn't explain this very well. The
document doesn't literally contain "\\<newline>". For me your
example results in the following output.
#+BEGIN_SRC latex
\begin{document}
\maketitle
\section{Head
\label{sec-1}
The first sentence. \\
The second sentence.
% Emacs 24.3.1 (Org mode 8.2.6)
\end{document}
#+END_SRC
Note the "\\" after "The first sentence". That is what I want to get
rid of.
-----
While producing said output I glanced at the org file's header and saw
the following line:
#+OPTIONS: \n:t
After removing that line, everything works as expected. I cannot
remember putting this option there and thus did not think of looking for
a cause in the header of my org file.
Thank you anyway for you response!
Kind regards,
--
Alexander Baier
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-06-09 11:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-07 17:19 Do not export single newlines to latex Alexander Baier
2014-06-09 7:42 ` James Harkins
2014-06-09 11:13 ` Alexander Baier
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.