all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Carsten Dominik <carsten.dominik@gmail.com>
To: Francesco Pizzolante <fpz@missioncriticalit.com>
Cc: mailing-list-org-mode <emacs-orgmode@gnu.org>
Subject: Re: LaTeX export > Avoid \newline command after timestampsX-Draft-From: ("nnimap+mc:INBOX.sncb")
Date: Fri, 19 Mar 2010 18:20:20 +0100	[thread overview]
Message-ID: <BF097CC8-E962-4EEB-8B37-6CA0F042E1BB@gmail.com> (raw)
In-Reply-To: <871vfhspjj.fsf@mundaneum.com>


On Mar 18, 2010, at 2:54 PM, Francesco Pizzolante wrote:

> Hi David,
>
> David Maus wrote:
>> Took me a while to realize the problem with current implementation:  
>> If
>> you already have a blank line between scheduled/deadline line and the
>> content the newline forces extra spacing between scheduled/deadline
>> and the following paragraph.
>
> I'm sorry if I wasn't clear enough.
>
>
>> 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.
>
> Let's go back to examples, I think it will be easier to understand  
> my problem.
>
> 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---
> \subsection{\textbf{STARTED} First}
> \label{sec-1.1}
>
>   \texttt{SCHEDULED:} \textit{2010-03-01 Mon} \texttt{DEADLINE:}  
> \textit{2010-03-19 Fri}\newline
> --8<---------------cut here---------------end--------------->8---
>
> Which gives me an extra vertical space between this heading and the  
> next one.
>
> While I would expect this (with or without the extra blank line in  
> this case,
> as there's no text after):
>
> --8<---------------cut here---------------start------------->8---
> \subsection{\textbf{STARTED} First}
> \label{sec-1.1}
>
>   \texttt{SCHEDULED:} \textit{2010-03-01 Mon} \texttt{DEADLINE:}  
> \textit{2010-03-19 Fri}
>
> --8<---------------cut here---------------end--------------->8---
>
>
> 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---
>
> This gives the following:
>
> --8<---------------cut here---------------start------------->8---
> \subsection{\textbf{STARTED} Second}
> \label{sec-1.2}
>
>   \texttt{SCHEDULED:} \textit{2010-03-01 Mon} \texttt{DEADLINE:}  
> \textit{2010-03-19 Fri}\newline\newline
>   This task is split among all services and communication between the
>   entities.
> --8<---------------cut here---------------end--------------->8---
>
> I also get an extra vertical space between the timestamps and the  
> text which
> is on a new paragraph.
>
> Instead, I was expecting this:
>
> --8<---------------cut here---------------start------------->8---
> \subsection{\textbf{STARTED} Second}
> \label{sec-1.2}
>
>   \texttt{SCHEDULED:} \textit{2010-03-01 Mon} \texttt{DEADLINE:}  
> \textit{2010-03-19 Fri}
>
>   This task is split among all services and communication between the
>   entities.
> --8<---------------cut here---------------end--------------->8---
>
>
> 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---
>
> This gives the following:
>
> --8<---------------cut here---------------start------------->8---
> \subsection{\textbf{DONE} Third}
> \label{sec-1.3}
>
>   \texttt{DEADLINE:} \textit{2010-03-26 Fri}\newline
>
>   This task is split among all services and communication between the
>   entities.
>   Second paragraph.
>
>   fdqsfdq
> --8<---------------cut here---------------end--------------->8---
>
> In this case, again, I get an extra vertical space between the  
> timestamps and
> the text which is also in a new paragraph.
>
> Instead, I would simply expect this:
>
> --8<---------------cut here---------------start------------->8---
> \subsection{\textbf{DONE} Third}
> \label{sec-1.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---
>
>
> As you can see from these 3 examples, it is safer to always generate  
> blank
> lines only instead of \newline commands.
>
> Sorry for the length of this message.

On the contrary, thank you for this long message.  This is exactly  
what nails
the discussion and shows the problems.

I agree with what I think is the conclusion of this discussion:  No  
\newline,
only an empty line to star a new paragraph, in all three example cases.

I have made this change now, thank you both.

- Carsten

      parent reply	other threads:[~2010-03-19 18:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-17 12:43 LaTeX export > Avoid \newline command after timestampsX-Draft-From: ("nnimap+mc:INBOX.sncb") Francesco Pizzolante
2010-03-17 14:35 ` Carsten Dominik
2010-03-17 20:00   ` David Maus
2010-03-18  5:47     ` Carsten Dominik
     [not found]       ` <F8590385-44EE-4081-81FA-FC10AA364CA0-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2010-03-18  9:07         ` Francesco Pizzolante
2010-03-18 11:45           ` David Maus
     [not found]             ` <87y6hpkg4f.wl%dmaus-lYycHbxpNtazQB+pC5nmwQ@public.gmane.org>
2010-03-18 13:54               ` Francesco Pizzolante
2010-03-18 15:41                 ` David Maus
     [not found]                   ` <87wrx9skm4.wl%dmaus-lYycHbxpNtazQB+pC5nmwQ@public.gmane.org>
2010-03-18 16:06                     ` Francesco Pizzolante
2010-03-19 17:20                 ` Carsten Dominik [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BF097CC8-E962-4EEB-8B37-6CA0F042E1BB@gmail.com \
    --to=carsten.dominik@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=fpz@missioncriticalit.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.