Francesco Pizzolante wrote: >Hi David, >> This cleary /is/ problem. Maybe we should catch these two cases >> (patch attached): >> >> ,---- >> | (unless (and (looking-at ".*\n[ \t]*\n") (looking-at ".*\\\\newline[ >> \t]*$")) >> `---- >> >> Insert \newline only if there is no paragraph separator. As far as I >> can see the LaTeX code is already rendered when >> `org-export-latex-keywords' is called so this should work out.
>I tried your patch, but I still get extra \newline commands in the generated
>LaTeX.
Yes, sorry, my brain's logical unit misfired. What I meant was
,----
| (unless (or (looking-at ".*\n[ \t]*\n") (looking-at ".*\\\\newline[ \t]*$"))
`----
Translating to: insert /no/ \newline, if either (a) there is a empty
line beneath this line or (b) there is already a \newline. Using this
the examples give:
1) Heading with no text
--8<---------------cut here---------------start------------->8---
** STARTED First
SCHEDULED: <2010-03-01 Mon> DEADLINE: <2010-03-19 Fri>
--8<---------------cut here---------------end--------------->8---
Gives the following:
--8<---------------cut here---------------start------------->8---
\section{STARTED First}
\label{sec-1}
\texttt{SCHEDULED:} \textit{2010-03-01 Mon} \texttt{DEADLINE:}
\textit{2010-03-19 Fri}
--8<---------------cut here---------------end--------------->8---
No extra vertical space between this heading and the next one.
2) Heading with text and no blank line between heading and text
--8<---------------cut here---------------start------------->8---
** STARTED Second
SCHEDULED: <2010-03-01 Mon> DEADLINE: <2010-03-19 Fri>
This task is split among all services and communication between the
entities.
--8<---------------cut here---------------end--------------->8---
Gives the following:
--8<---------------cut here---------------start------------->8---
\section{STARTED Second}
\label{sec-2}
\texttt{SCHEDULED:} \textit{2010-03-01 Mon} \texttt{DEADLINE:}
\textit{2010-03-19 Fri}\newline
This task is split among all services and communication between the
entities.
--8<---------------cut here---------------end--------------->8---
This would be Carsten's case.
3) Heading with text and blank line between heading and text
--8<---------------cut here---------------start------------->8---
** DONE Third
DEADLINE: <2010-03-26 Fri>
This task is split among all services and communication between the
entities.
Second paragraph.
fdqsfdq
--8<---------------cut here---------------end--------------->8---
Gives the following:
--8<---------------cut here---------------start------------->8---
\section{\textbf{DONE} Third}
\label{sec-3}
\texttt{DEADLINE:} \textit{2010-03-26 Fri}
This task is split among all services and communication between the
entities.
Second paragraph.
fdqsfdq
--8<---------------cut here---------------end--------------->8---
What you expected.
IMO inserting a \newline after the deadline/scheduled line if text follows
immediately (example 2) makes sense.
HTH
-- David
--
OpenPGP... 0x99ADB83B5A4478E6
Jabber.... [email protected]
Email..... [email protected]
latex-newline-2.diff
Description: Binary data
pgpuggBVRVQ5l.pgp
Description: PGP signature
_______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. [email protected] http://lists.gnu.org/mailman/listinfo/emacs-orgmode
