* LaTeX export of lists
@ 2010-11-27 22:02 Thomas S. Dye
2010-11-28 6:40 ` Richard Lawrence
0 siblings, 1 reply; 24+ messages in thread
From: Thomas S. Dye @ 2010-11-27 22:02 UTC (permalink / raw
To: emacs mailing list
Aloha all,
Is there an easy way to keep text following a list with the list, i.e,
without a blank line following the list, during export?
* List
1. First item
2. Second item
Following text.
Gets exported as:
\section{List}
\label{sec-1}
\begin{enumerate}
\item First item
\item Second item
\end{enumerate}
Following text.
I don't want a blank line between \end{enumerate} and "Following text."
I looked through the documentation and browsed the list archive to no
avail, but I might have missed what I was looking for.
All the best,
Tom
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: LaTeX export of lists
2010-11-27 22:02 Thomas S. Dye
@ 2010-11-28 6:40 ` Richard Lawrence
0 siblings, 0 replies; 24+ messages in thread
From: Richard Lawrence @ 2010-11-28 6:40 UTC (permalink / raw
To: emacs-orgmode
Hi Tom,
> Is there an easy way to keep text following a list with the list, i.e,
> without a blank line following the list, during export?
>
> * List
> 1. First item
> 2. Second item
> Following text.
>
> Gets exported as:
>
> \section{List}
> \label{sec-1}
>
> \begin{enumerate}
> \item First item
> \item Second item
> \end{enumerate}
>
> Following text.
>
> I don't want a blank line between \end{enumerate} and "Following text."
Is this because you don't want to start a new paragraph in LaTeX? I
have used \noindent on the occasions when I have run into this issue.
* List
1. First item
2. Second item
\noindent
Following text
Not necessarily pretty, but it works, if you're just looking to prevent
indentation.
Best,
Richard
^ permalink raw reply [flat|nested] 24+ messages in thread
* LaTeX export of lists
@ 2010-11-28 14:33 Thomas S. Dye
2010-11-28 15:05 ` Nicolas Goaziou
0 siblings, 1 reply; 24+ messages in thread
From: Thomas S. Dye @ 2010-11-28 14:33 UTC (permalink / raw
To: tsd; +Cc: emacs mailing list
Aloha all,
The solution to my earlier query is this:
* List
1. First item
2. Second item Following text.
This works for lists set in a paragraph, but won't work for lists set
out by themselves. Richard's \noindent will work in these situations,
but I'm wondering why the empty line is there in the first place?
All the best,
Tom
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: LaTeX export of lists
2010-11-28 14:33 LaTeX export of lists Thomas S. Dye
@ 2010-11-28 15:05 ` Nicolas Goaziou
2010-11-28 15:54 ` [patch] " Nicolas Goaziou
2010-11-28 18:40 ` Thomas S. Dye
0 siblings, 2 replies; 24+ messages in thread
From: Nicolas Goaziou @ 2010-11-28 15:05 UTC (permalink / raw
To: Thomas S. Dye; +Cc: emacs mailing list
Hello,
>>>>> Thomas S Dye writes:
> * List
> 1. First item
> 2. Second item Following text.
This is completely different from your first example. Here "Following
text" is inside the list, whereas before, it was outside.
> This works for lists set in a paragraph, but won't work for lists
> set out by themselves. Richard's \noindent will work in these
> situations, but I'm wondering why the empty line is there in the
> first place?
I don't know, I am going to investigate this.
Regards,
-- Nicolas
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [patch] LaTeX export of lists
2010-11-28 15:05 ` Nicolas Goaziou
@ 2010-11-28 15:54 ` Nicolas Goaziou
2010-11-28 19:02 ` Thomas S. Dye
2010-11-28 18:40 ` Thomas S. Dye
1 sibling, 1 reply; 24+ messages in thread
From: Nicolas Goaziou @ 2010-11-28 15:54 UTC (permalink / raw
To: Thomas S. Dye; +Cc: emacs mailing list
[-- Attachment #1: Type: text/plain, Size: 101 bytes --]
Thomas,
Could you please test this patch and tell me if it breaks something?
Regards,
-- Nicolas
[-- Attachment #2: 0001-Exporting-lists-to-LaTeX-respects-blank-lines.patch --]
[-- Type: text/plain, Size: 1548 bytes --]
From 8fdd9ff682306cc5161f0b230d43493abff1d5e2 Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou <n.goaziou@gmail.com>
Date: Sun, 28 Nov 2010 16:51:14 +0100
Subject: [PATCH] Exporting lists to LaTeX respects blank lines
* lisp/org-latex.el (org-export-latex-lists): do not add an
unnecessary newline character after a list.
* lisp/org-list.el (org-list-bottom-point-with-indent): ensure bottom
point is just after a non blank line.
---
lisp/org-latex.el | 2 +-
lisp/org-list.el | 6 +++++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/lisp/org-latex.el b/lisp/org-latex.el
index 91bf380..1a0aaf7 100644
--- a/lisp/org-latex.el
+++ b/lisp/org-latex.el
@@ -2383,7 +2383,7 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER."
"\n"
(match-string 1 res))
t t res)))
- (insert res "\n"))))
+ (insert res))))
(defconst org-latex-entities
'("\\!"
diff --git a/lisp/org-list.el b/lisp/org-list.el
index 2290b4a..07a15e4 100644
--- a/lisp/org-list.el
+++ b/lisp/org-list.el
@@ -518,7 +518,11 @@ List ending is determined by the indentation of text. See
(setq ind-ref ind)
(forward-line 1))
((<= ind ind-ref)
- (throw 'exit (point-at-bol)))
+ (throw 'exit (progn
+ ;; Ensure bottom is just after a
+ ;; non-blank line.
+ (skip-chars-backward " \r\t\n")
+ (min (point-max) (1+ (point-at-eol))))))
((looking-at "#\\+begin_")
(re-search-forward "[ \t]*#\\+end_")
(forward-line 1))
--
1.7.3.2
[-- Attachment #3: Type: text/plain, Size: 201 bytes --]
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply related [flat|nested] 24+ messages in thread
* Re: LaTeX export of lists
2010-11-28 15:05 ` Nicolas Goaziou
2010-11-28 15:54 ` [patch] " Nicolas Goaziou
@ 2010-11-28 18:40 ` Thomas S. Dye
2010-11-29 8:43 ` Sébastien Mengin
1 sibling, 1 reply; 24+ messages in thread
From: Thomas S. Dye @ 2010-11-28 18:40 UTC (permalink / raw
To: Nicolas Goaziou; +Cc: emacs mailing list
Aloha Nicolas,
On Nov 28, 2010, at 5:05 AM, Nicolas Goaziou wrote:
> Hello,
>
>>>>>> Thomas S Dye writes:
>
>> * List
>> 1. First item
>> 2. Second item Following text.
>
> This is completely different from your first example. Here "Following
> text" is inside the list, whereas before, it was outside.
>
>> This works for lists set in a paragraph, but won't work for lists
>> set out by themselves. Richard's \noindent will work in these
>> situations, but I'm wondering why the empty line is there in the
>> first place?
>
> I don't know, I am going to investigate this.
Thanks for looking into this. The desired org-mode example and
exported result is this:
* List
1. First item
2. Second item
Following text
\section{List}
\label{sec-1}
\begin{enumerate}
\item First item
\item Second item
\end{enumerate}
Following text
This way, the decision to typeset the list in-paragraph or displayed
with following non-indented text can be made by the LaTeX class file.
This means that
* List
1. First item
2. Second item
Following text
should export as:
\section{List}
\label{sec-1}
\begin{enumerate}
\item First item
\item Second item
\end{enumerate}
Following text
All the best,
Tom
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [patch] LaTeX export of lists
2010-11-28 15:54 ` [patch] " Nicolas Goaziou
@ 2010-11-28 19:02 ` Thomas S. Dye
2010-11-28 21:15 ` Nicolas Goaziou
0 siblings, 1 reply; 24+ messages in thread
From: Thomas S. Dye @ 2010-11-28 19:02 UTC (permalink / raw
To: Nicolas Goaziou; +Cc: emacs mailing list
Aloha Nicolas,
On Nov 28, 2010, at 5:54 AM, Nicolas Goaziou wrote:
> Thomas,
>
> Could you please test this patch and tell me if it breaks something?
>
> Regards,
>
> -- Nicolas
>
> <0001-Exporting-lists-to-LaTeX-respects-blank-lines.patch>
This works perfectly for me. Thanks!
All the best,
Tom
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [patch] LaTeX export of lists
2010-11-28 19:02 ` Thomas S. Dye
@ 2010-11-28 21:15 ` Nicolas Goaziou
2010-11-29 8:42 ` Sébastien Mengin
0 siblings, 1 reply; 24+ messages in thread
From: Nicolas Goaziou @ 2010-11-28 21:15 UTC (permalink / raw
To: Thomas S. Dye; +Cc: emacs mailing list
> This works perfectly for me. Thanks!
It is available on master branch now.
Thanks for pointing out this little annoyance.
Regards,
-- Nicolas
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: Re: [patch] LaTeX export of lists
2010-11-28 21:15 ` Nicolas Goaziou
@ 2010-11-29 8:42 ` Sébastien Mengin
2010-11-29 12:17 ` Nicolas Goaziou
0 siblings, 1 reply; 24+ messages in thread
From: Sébastien Mengin @ 2010-11-29 8:42 UTC (permalink / raw
To: Nicolas Goaziou; +Cc: emacs mailing list
Le dim. 28/11/10 (10:15:34 +0100), Nicolas Goaziou a écrit :
>
> > This works perfectly for me. Thanks!
>
> It is available on master branch now.
>
> Thanks for pointing out this little annoyance.
Sorry I come too late but I would not like this kind of "annoyance"
avoided ;)
In Thomas' case, it is perfectly understandable, true.
But in general, I find it a lot better to leave a blank line between the
end of a list and the following paragraph in the LaTeX code -- easier to
read, I think.
Can your patch be set as an option or so, instead of the default
behaviour?
Thanks anyway,
--
Sébastien Mengin
Édition et logiciels libres
< Mise en page avec LaTeX >
http://edilibre.net
tél. : 06 84 88 49 17
jid. : sebastien-mengin@jabber.org
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: LaTeX export of lists
2010-11-28 18:40 ` Thomas S. Dye
@ 2010-11-29 8:43 ` Sébastien Mengin
0 siblings, 0 replies; 24+ messages in thread
From: Sébastien Mengin @ 2010-11-29 8:43 UTC (permalink / raw
To: Thomas S. Dye; +Cc: emacs mailing list, Nicolas Goaziou
Hi,
Forget my previous post, I didn't see this last one by Thomas.
Seems sensible, indeed.
Cheers,
S.
Le dim. 28/11/10 (08:40:58 -1000), Thomas S. Dye a écrit :
> Aloha Nicolas,
> On Nov 28, 2010, at 5:05 AM, Nicolas Goaziou wrote:
>
> >Hello,
> >
> >>>>>>Thomas S Dye writes:
> >
> >>* List
> >> 1. First item
> >> 2. Second item Following text.
> >
> >This is completely different from your first example. Here "Following
> >text" is inside the list, whereas before, it was outside.
> >
> >>This works for lists set in a paragraph, but won't work for lists
> >>set out by themselves. Richard's \noindent will work in these
> >>situations, but I'm wondering why the empty line is there in the
> >>first place?
> >
> >I don't know, I am going to investigate this.
>
> Thanks for looking into this. The desired org-mode example and
> exported result is this:
>
> * List
> 1. First item
> 2. Second item
> Following text
>
> \section{List}
> \label{sec-1}
>
> \begin{enumerate}
> \item First item
> \item Second item
> \end{enumerate}
> Following text
>
> This way, the decision to typeset the list in-paragraph or displayed
> with following non-indented text can be made by the LaTeX class
> file.
>
> This means that
>
> * List
> 1. First item
> 2. Second item
>
> Following text
>
> should export as:
>
> \section{List}
> \label{sec-1}
>
> \begin{enumerate}
> \item First item
> \item Second item
> \end{enumerate}
>
> Following text
>
> All the best,
> Tom
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
--
Sébastien Mengin
Édition et logiciels libres
< Mise en page avec LaTeX >
http://edilibre.net
tél. : 06 84 88 49 17
jid. : sebastien-mengin@jabber.org
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: Re: [patch] LaTeX export of lists
2010-11-29 8:42 ` Sébastien Mengin
@ 2010-11-29 12:17 ` Nicolas Goaziou
0 siblings, 0 replies; 24+ messages in thread
From: Nicolas Goaziou @ 2010-11-29 12:17 UTC (permalink / raw
To: Sébastien Mengin; +Cc: emacs mailing list
Hello,
>>>>> Sébastien Mengin writes:
> Sorry I come too late but I would not like this kind of "annoyance"
> avoided ;)
> In Thomas' case, it is perfectly understandable, true.
> But in general, I find it a lot better to leave a blank line between
> the end of a list and the following paragraph in the LaTeX code --
> easier to read, I think.
> Can your patch be set as an option or so, instead of the default
> behaviour?
You just need to leave a blank line between your list and the next
paragraph. I don't see why an option should be needed here.
Or am I wrong?
Regards,
-- Nicolas
^ permalink raw reply [flat|nested] 24+ messages in thread
* LaTeX export of lists
@ 2011-07-24 16:16 Thomas S. Dye
2011-07-24 16:44 ` Nick Dokos
2011-07-24 18:13 ` Nicolas Goaziou
0 siblings, 2 replies; 24+ messages in thread
From: Thomas S. Dye @ 2011-07-24 16:16 UTC (permalink / raw
To: Org-mode
Aloha all,
LaTeX export of lists appears to be inserting an extraneous blank line.
This snippet from the Org-mode document:
first-order cultural history sequence for Hawai`i can be expressed
with model (\ref{eq:first-order}), which states that
1. the pre-colonization period began at a time too old for the
\rc\space method to date;
is exported to LaTeX as:
first-order cultural history sequence for Hawai`i can be expressed
with model \ref{eq:first-order}, which states that
\begin{enumerate}
\item the pre-colonization period began at a time too old for the
\rc\ method to date;
The blank line before \begin{enumerate} is interpreted by LaTeX as a
paragraph break, which I don't want here because I'm setting the
enumerated list within the paragraph and not displayed separately.
IIRC, this represents an old behavior that was corrected a while back.
I'm not sure when the blank line snuck back in.
I'm using Org-mode version 7.6 (release_7.6.102.g05c6).
All the best,
Tom
--
Thomas S. Dye
http://www.tsdye.com
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: LaTeX export of lists
2011-07-24 16:16 Thomas S. Dye
@ 2011-07-24 16:44 ` Nick Dokos
2011-07-24 18:13 ` Nicolas Goaziou
1 sibling, 0 replies; 24+ messages in thread
From: Nick Dokos @ 2011-07-24 16:44 UTC (permalink / raw
To: Thomas S. Dye; +Cc: nicholas.dokos, Org-mode
Thomas S. Dye <tsd@tsdye.com> wrote:
> Aloha all,
>
> LaTeX export of lists appears to be inserting an extraneous blank line.
>
> This snippet from the Org-mode document:
>
> first-order cultural history sequence for Hawai`i can be expressed
> with model (\ref{eq:first-order}), which states that
> 1. the pre-colonization period began at a time too old for the
> \rc\space method to date;
>
> is exported to LaTeX as:
>
> first-order cultural history sequence for Hawai`i can be expressed
> with model \ref{eq:first-order}, which states that
>
> \begin{enumerate}
> \item the pre-colonization period began at a time too old for the
> \rc\ method to date;
>
> The blank line before \begin{enumerate} is interpreted by LaTeX as a
> paragraph break, which I don't want here because I'm setting the
> enumerated list within the paragraph and not displayed separately.
>
> IIRC, this represents an old behavior that was corrected a while back.
> I'm not sure when the blank line snuck back in.
>
> I'm using Org-mode version 7.6 (release_7.6.102.g05c6).
>
> All the best,
> Tom
>
Bisected it to this commit:
,----
| 69e02a73de7423bafa4df473cb746865c305b7ae is the first bad commit
| commit 69e02a73de7423bafa4df473cb746865c305b7ae
| Author: Nicolas Goaziou <n.goaziou@gmail.com>
| Date: Sun Jan 2 13:52:16 2011 +0100
|
| Modified export engines for lists
|
| * lisp/org-exp.el (org-export-mark-lists): new function, replacing
| org-export-mark-list-ending. It adds information as text properties
| to every list, before changes done by exporter destruct them.
|
| * lisp/org-html.el (org-export-as-html): delegate list handling to
| external function org-html-export-list-line.
| (org-html-export-list-line): new function.
|
| * lisp/org-latex.el (org-export-latex-lists): small modification.
|
| :040000 040000 5c6d7691e72af31680c5560171cc46bea56112ea 4de9fe5e7c954b31ab23a9e84ba28fa818c368c8 M lisp
`----
Nick
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: LaTeX export of lists
2011-07-24 16:16 Thomas S. Dye
2011-07-24 16:44 ` Nick Dokos
@ 2011-07-24 18:13 ` Nicolas Goaziou
2011-07-24 19:18 ` Thomas S. Dye
1 sibling, 1 reply; 24+ messages in thread
From: Nicolas Goaziou @ 2011-07-24 18:13 UTC (permalink / raw
To: Thomas S. Dye; +Cc: Org-mode
Hello,
tsd@tsdye.com (Thomas S. Dye) writes:
> LaTeX export of lists appears to be inserting an extraneous blank line.
>
> This snippet from the Org-mode document:
>
> first-order cultural history sequence for Hawai`i can be expressed
> with model (\ref{eq:first-order}), which states that
> 1. the pre-colonization period began at a time too old for the
> \rc\space method to date;
>
> is exported to LaTeX as:
>
> first-order cultural history sequence for Hawai`i can be expressed
> with model \ref{eq:first-order}, which states that
>
> \begin{enumerate}
> \item the pre-colonization period began at a time too old for the
> \rc\ method to date;
>
> The blank line before \begin{enumerate} is interpreted by LaTeX as a
> paragraph break, which I don't want here because I'm setting the
> enumerated list within the paragraph and not displayed separately.
>
> IIRC, this represents an old behavior that was corrected a while back.
> I'm not sure when the blank line snuck back in.
I pushed a patch bringing back the old behaviour.
That raises an interesting question: can a list belong to a paragraph in
Org? According to paragraph-related regexps, it can't, for now. And your
request is more a "LaTeXism" than an "Orgism" (!).
Anyway, it should be fine now.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: LaTeX export of lists
2011-07-24 18:13 ` Nicolas Goaziou
@ 2011-07-24 19:18 ` Thomas S. Dye
2011-07-25 8:45 ` Nicolas Goaziou
0 siblings, 1 reply; 24+ messages in thread
From: Thomas S. Dye @ 2011-07-24 19:18 UTC (permalink / raw
To: Nicolas Goaziou; +Cc: Org-mode
Nicolas Goaziou <n.goaziou@gmail.com> writes:
> Hello,
>
> tsd@tsdye.com (Thomas S. Dye) writes:
>
>> LaTeX export of lists appears to be inserting an extraneous blank line.
>>
>> This snippet from the Org-mode document:
>>
>> first-order cultural history sequence for Hawai`i can be expressed
>> with model (\ref{eq:first-order}), which states that
>> 1. the pre-colonization period began at a time too old for the
>> \rc\space method to date;
>>
>> is exported to LaTeX as:
>>
>> first-order cultural history sequence for Hawai`i can be expressed
>> with model \ref{eq:first-order}, which states that
>>
>> \begin{enumerate}
>> \item the pre-colonization period began at a time too old for the
>> \rc\ method to date;
>>
>> The blank line before \begin{enumerate} is interpreted by LaTeX as a
>> paragraph break, which I don't want here because I'm setting the
>> enumerated list within the paragraph and not displayed separately.
>>
>> IIRC, this represents an old behavior that was corrected a while back.
>> I'm not sure when the blank line snuck back in.
>
> I pushed a patch bringing back the old behaviour.
>
> That raises an interesting question: can a list belong to a paragraph in
> Org? According to paragraph-related regexps, it can't, for now. And your
> request is more a "LaTeXism" than an "Orgism" (!).
>
> Anyway, it should be fine now.
>
> Regards,
Aloha Nicolas,
Thanks very much! The old LaTeXism behavior is back in my example.
I probably don't understand your question fully, but it seems obvious to
me that a list can either belong to a paragraph or it can be separate.
I'm not certain why Org-mode would want to choose one over the other.
I tend to see the question as having to do with how someone working in
Org-mode indicates that a paragraph break is wanted. I do this with a
blank line, as I do in LaTeX, and this seems to work.
All the best,
Tom
--
T.S. Dye & Colleagues, Archaeologists
735 Bishop St, Suite 315, Honolulu, HI 96813
Tel: 808-529-0866, Fax: 808-529-0884
http://www.tsdye.com
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: LaTeX export of lists
2011-07-24 19:18 ` Thomas S. Dye
@ 2011-07-25 8:45 ` Nicolas Goaziou
2011-07-25 16:15 ` Thomas S. Dye
0 siblings, 1 reply; 24+ messages in thread
From: Nicolas Goaziou @ 2011-07-25 8:45 UTC (permalink / raw
To: Thomas S. Dye; +Cc: Org-mode
Hello,
tsd@tsdye.com (Thomas S. Dye) writes:
> Nicolas Goaziou <n.goaziou@gmail.com> writes:
>> That raises an interesting question: can a list belong to a paragraph in
>> Org? According to paragraph-related regexps, it can't, for now. And your
>> request is more a "LaTeXism" than an "Orgism" (!).
> I probably don't understand your question fully, but it seems obvious to
> me that a list can either belong to a paragraph or it can be separate.
> I'm not certain why Org-mode would want to choose one over the other.
It isn't obvious. For example, in HTML, a list within a paragraph
doesn't even make sense[1].
There's no harm in it, but you're basically faking Org and its LaTeX
exporter, as lists and paragraphs are two distinct entities[2].
Regards,
Footnotes:
[1] You can't have <ul> within <p>, according to
http://www.w3.org/TR/html401/struct/text.html#h-9.3.1
[2] If you try to `mark-paragraph' in your file, it won't mark both
the text and the list in one go.
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: LaTeX export of lists
2011-07-25 8:45 ` Nicolas Goaziou
@ 2011-07-25 16:15 ` Thomas S. Dye
2011-08-24 15:11 ` Eric S Fraga
0 siblings, 1 reply; 24+ messages in thread
From: Thomas S. Dye @ 2011-07-25 16:15 UTC (permalink / raw
To: Nicolas Goaziou; +Cc: Org-mode
Nicolas Goaziou <n.goaziou@gmail.com> writes:
> Hello,
>
> tsd@tsdye.com (Thomas S. Dye) writes:
>
>> Nicolas Goaziou <n.goaziou@gmail.com> writes:
>>> That raises an interesting question: can a list belong to a paragraph in
>>> Org? According to paragraph-related regexps, it can't, for now. And your
>>> request is more a "LaTeXism" than an "Orgism" (!).
>
>> I probably don't understand your question fully, but it seems obvious to
>> me that a list can either belong to a paragraph or it can be separate.
>> I'm not certain why Org-mode would want to choose one over the other.
>
> It isn't obvious. For example, in HTML, a list within a paragraph
> doesn't even make sense[1].
>
> There's no harm in it, but you're basically faking Org and its LaTeX
> exporter, as lists and paragraphs are two distinct entities[2].
>
> Regards,
>
>
> Footnotes:
>
> [1] You can't have <ul> within <p>, according to
> http://www.w3.org/TR/html401/struct/text.html#h-9.3.1
>
> [2] If you try to `mark-paragraph' in your file, it won't mark both
> the text and the list in one go.
Aloha Nicolas,
Interesting observations. Thanks.
The relation seems obvious to me because my model comes from printed
works, which commonly include enumerated lists typeset within
paragraphs.
Perhaps given the limitation of the HTML spec and the structure of
paragraphs in Org-mode it will always be necessary to have the LaTeX
exporter take care of setting lists inside paragraphs.
Thanks again for your help with this.
All the best,
Tom
--
T.S. Dye & Colleagues, Archaeologists
735 Bishop St, Suite 315, Honolulu, HI 96813
Tel: 808-529-0866, Fax: 808-529-0884
http://www.tsdye.com
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: LaTeX export of lists
2011-07-25 16:15 ` Thomas S. Dye
@ 2011-08-24 15:11 ` Eric S Fraga
2011-08-24 15:53 ` Nicolas Goaziou
` (2 more replies)
0 siblings, 3 replies; 24+ messages in thread
From: Eric S Fraga @ 2011-08-24 15:11 UTC (permalink / raw
To: Thomas S. Dye; +Cc: Org-mode, Nicolas Goaziou
tsd@tsdye.com (Thomas S. Dye) writes:
> Nicolas Goaziou <n.goaziou@gmail.com> writes:
>
>> Hello,
>>
>> tsd@tsdye.com (Thomas S. Dye) writes:
>>
>>> Nicolas Goaziou <n.goaziou@gmail.com> writes:
>>>> That raises an interesting question: can a list belong to a paragraph in
>>>> Org? According to paragraph-related regexps, it can't, for now. And your
>>>> request is more a "LaTeXism" than an "Orgism" (!).
>>
>>> I probably don't understand your question fully, but it seems obvious to
>>> me that a list can either belong to a paragraph or it can be separate.
>>> I'm not certain why Org-mode would want to choose one over the other.
>>
>> It isn't obvious. For example, in HTML, a list within a paragraph
>> doesn't even make sense[1].
>>
>> There's no harm in it, but you're basically faking Org and its LaTeX
>> exporter, as lists and paragraphs are two distinct entities[2].
[...]
>
> Aloha Nicolas,
>
> Interesting observations. Thanks.
>
> The relation seems obvious to me because my model comes from printed
> works, which commonly include enumerated lists typeset within
> paragraphs.
>
> Perhaps given the limitation of the HTML spec and the structure of
> paragraphs in Org-mode it will always be necessary to have the LaTeX
> exporter take care of setting lists inside paragraphs.
>
> Thanks again for your help with this.
>
> All the best,
> Tom
Latex does have the concept of lists within paragraphs in that
paragraph boundaries are defined by blank lines. So, if you have a
begin{itemize}...end{itemize} with no blank lines before and after, the
list implicitly is part of the enclosing paragraph.
whether lists exported from org should automatically be within
paragraphs or not is unclear. I personally prefer having them outside
but that's because, in latex, I tend to have 0 paragraph separation with
indented first lines. If I want a list to look like it's embedded
within a paragraph, I put a \nonindent on the "paragraph" following the
list.
--
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
: using Org-mode version 7.7 (release_7.7.175.g8478)
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: LaTeX export of lists
2011-08-24 15:11 ` Eric S Fraga
@ 2011-08-24 15:53 ` Nicolas Goaziou
2011-08-24 17:39 ` Thomas S. Dye
2011-08-24 16:40 ` Achim Gratz
2011-08-24 17:08 ` Thomas S. Dye
2 siblings, 1 reply; 24+ messages in thread
From: Nicolas Goaziou @ 2011-08-24 15:53 UTC (permalink / raw
To: Thomas S. Dye; +Cc: Org-mode
Hello,
Eric S Fraga <e.fraga@ucl.ac.uk> writes:
> Latex does have the concept of lists within paragraphs in that
> paragraph boundaries are defined by blank lines. So, if you have a
> begin{itemize}...end{itemize} with no blank lines before and after, the
> list implicitly is part of the enclosing paragraph.
That's why I talked about "LaTeXism".
> whether lists exported from org should automatically be within
> paragraphs or not is unclear.
For the record:
From Org view, lists and paragraphs are distinct elements. More
accurately, lists can hold paragraphs, but not the opposite.
From LaTeX view, it's true that a list can belong to a paragraph. But,
again, such a thing is impossible in HTML, in OpenDocument, where "the
list is a paragraph-level element"[1], and in DocBook.
So this is consistent with most of the exporters encountered in
Org. Now, to provide compatibility with LaTeX, Org export system has to
respect blank lines (or the absence thereof) in the buffer.
Regards,
[1] http://docs.oasis-open.org/office/v1.1/OS/OpenDocument-v1.1-html/OpenDocument-v1.1.html#4.3.Lists|outline
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: LaTeX export of lists
2011-08-24 15:11 ` Eric S Fraga
2011-08-24 15:53 ` Nicolas Goaziou
@ 2011-08-24 16:40 ` Achim Gratz
2011-08-24 17:08 ` Thomas S. Dye
2 siblings, 0 replies; 24+ messages in thread
From: Achim Gratz @ 2011-08-24 16:40 UTC (permalink / raw
To: emacs-orgmode
Eric S Fraga <e.fraga@ucl.ac.uk> writes:
> Latex does have the concept of lists within paragraphs in that
> paragraph boundaries are defined by blank lines. So, if you have a
> begin{itemize}...end{itemize} with no blank lines before and after, the
> list implicitly is part of the enclosing paragraph.
It can probably be argued that LaTeX merely agnostic of the issue, but
has a way to infer where \parskip\indent should go. This distinction
may seem to be a too fine one to make, but as far as the formatting
machinery of TeX is concerned, it becomes all vmode and hmode boxes
anyway.
Importantly however, in the HTML4 document model paragraphs cannot
contain any blocklevel elements and that includes lists and paragraphs
themselves. The visual result could be faked much in the same way that
LaTeX does by having two different classes for the <P> element, but this
adds another level of complexity that all export backends need to deal
with when the construct should be portable.
Regards,
Achim.
--
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+
SD adaptation for Waldorf Blofeld V1.15B11:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: LaTeX export of lists
2011-08-24 15:11 ` Eric S Fraga
2011-08-24 15:53 ` Nicolas Goaziou
2011-08-24 16:40 ` Achim Gratz
@ 2011-08-24 17:08 ` Thomas S. Dye
2 siblings, 0 replies; 24+ messages in thread
From: Thomas S. Dye @ 2011-08-24 17:08 UTC (permalink / raw
To: Nicolas Goaziou; +Cc: Org-mode
Eric S Fraga <e.fraga@ucl.ac.uk> writes:
> tsd@tsdye.com (Thomas S. Dye) writes:
>
>> Nicolas Goaziou <n.goaziou@gmail.com> writes:
>>
>>> Hello,
>>>
>>> tsd@tsdye.com (Thomas S. Dye) writes:
>>>
>>>> Nicolas Goaziou <n.goaziou@gmail.com> writes:
>>>>> That raises an interesting question: can a list belong to a paragraph in
>>>>> Org? According to paragraph-related regexps, it can't, for now. And your
>>>>> request is more a "LaTeXism" than an "Orgism" (!).
>>>
>>>> I probably don't understand your question fully, but it seems obvious to
>>>> me that a list can either belong to a paragraph or it can be separate.
>>>> I'm not certain why Org-mode would want to choose one over the other.
>>>
>>> It isn't obvious. For example, in HTML, a list within a paragraph
>>> doesn't even make sense[1].
>>>
>>> There's no harm in it, but you're basically faking Org and its LaTeX
>>> exporter, as lists and paragraphs are two distinct entities[2].
>
> [...]
>
>>
>> Aloha Nicolas,
>>
>> Interesting observations. Thanks.
>>
>> The relation seems obvious to me because my model comes from printed
>> works, which commonly include enumerated lists typeset within
>> paragraphs.
>>
>> Perhaps given the limitation of the HTML spec and the structure of
>> paragraphs in Org-mode it will always be necessary to have the LaTeX
>> exporter take care of setting lists inside paragraphs.
>>
>> Thanks again for your help with this.
>>
>> All the best,
>> Tom
>
> Latex does have the concept of lists within paragraphs in that
> paragraph boundaries are defined by blank lines. So, if you have a
> begin{itemize}...end{itemize} with no blank lines before and after, the
> list implicitly is part of the enclosing paragraph.
>
> whether lists exported from org should automatically be within
> paragraphs or not is unclear. I personally prefer having them outside
> but that's because, in latex, I tend to have 0 paragraph separation with
> indented first lines. If I want a list to look like it's embedded
> within a paragraph, I put a \nonindent on the "paragraph" following the
> list.
Hi Eric,
I'm thinking of enumerated lists inside paragraphs, of the kind (i)
found frequently in print, and (ii) made possible in LaTeX with the
paralist package's =inparaxxxx= commands. Here the list can either end
the paragraph, or not. If Org-mode's lists are going to serve this
purpose, then there will need to be some way to indicate that the list
is to be part of the paragraph.
LaTeX uses blank lines (which is how I typically get paragraph breaks in
Org-mode, though perhaps this isn't the only way to do so?) and a year
or so ago the presence/absence of a blank line following an Org-mode
list was used to trigger whether or not the following text would be set
as a continuation of the paragraph or set as a new paragraph. A blank
line feels natural to me because I've written in LaTeX for a long time,
but I'd be happy with some other solution if the blank line turns out to
be too difficult to maintain in the Org-mode code.
IIUC, you are describing the case where a displayed (not set within a
paragraph) list is followed immediately by flush left text. I agree
that it is useful to be able to do this, but it wasn't what I had in
mind.
All the best,
Tom
--
Thomas S. Dye
http://www.tsdye.com
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: LaTeX export of lists
2011-08-24 15:53 ` Nicolas Goaziou
@ 2011-08-24 17:39 ` Thomas S. Dye
2011-08-24 18:59 ` Nicolas Goaziou
0 siblings, 1 reply; 24+ messages in thread
From: Thomas S. Dye @ 2011-08-24 17:39 UTC (permalink / raw
To: Nicolas Goaziou; +Cc: Org-mode
Nicolas Goaziou <n.goaziou@gmail.com> writes:
> Hello,
>
> Eric S Fraga <e.fraga@ucl.ac.uk> writes:
>
>> Latex does have the concept of lists within paragraphs in that
>> paragraph boundaries are defined by blank lines. So, if you have a
>> begin{itemize}...end{itemize} with no blank lines before and after, the
>> list implicitly is part of the enclosing paragraph.
>
> That's why I talked about "LaTeXism".
>
>> whether lists exported from org should automatically be within
>> paragraphs or not is unclear.
>
> For the record:
>
> From Org view, lists and paragraphs are distinct elements. More
> accurately, lists can hold paragraphs, but not the opposite.
>
> From LaTeX view, it's true that a list can belong to a paragraph. But,
> again, such a thing is impossible in HTML, in OpenDocument, where "the
> list is a paragraph-level element"[1], and in DocBook.
>
> So this is consistent with most of the exporters encountered in
> Org. Now, to provide compatibility with LaTeX, Org export system has to
> respect blank lines (or the absence thereof) in the buffer.
>
Aloha Nicolas,
I've just browsed the Document Structure chapter of the Org-mode manual:
paragraphs aren't mentioned!
I've always indicated paragraph breaks in Org-mode with a blank line,
but I realize that this might just be a holdover from my long use of
LaTeX. Are there other ways to indicate a paragraph break in Org-mode?
As for lists within paragraphs being a Latexism, I would say that the
other specs you cite appear to lack a structured way to accomplish
something that is, in fact, quite common in printed text. There is
nothing wrong with leaving a common print structure like this
unstructured, but I find it very convenient to use a structured
approach, as provided by the paralist package in LaTeX.
I'm not trying to be pedantic here and hold out for the presence or
absence of blank lines to indicate a paragraph break in Org-mode. For
the use case of lists set within a paragraph some other mechanism might
be more appropriate.
But this circles back to the more general question of how paragraphs are
indicated in Org-mode. Is it the blank line alone, or the blank line and
other mechanisms?
All the best,
Tom
>
> Regards,
>
> [1] http://docs.oasis-open.org/office/v1.1/OS/OpenDocument-v1.1-html/OpenDocument-v1.1.html#4.3.Lists|outline
--
T.S. Dye & Colleagues, Archaeologists
735 Bishop St, Suite 315, Honolulu, HI 96813
Tel: 808-529-0866, Fax: 808-529-0884
http://www.tsdye.com
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: LaTeX export of lists
2011-08-24 17:39 ` Thomas S. Dye
@ 2011-08-24 18:59 ` Nicolas Goaziou
2011-08-24 19:45 ` Thomas S. Dye
0 siblings, 1 reply; 24+ messages in thread
From: Nicolas Goaziou @ 2011-08-24 18:59 UTC (permalink / raw
To: Thomas S. Dye; +Cc: Org-mode
tsd@tsdye.com (Thomas S. Dye) writes:
> I've just browsed the Document Structure chapter of the Org-mode manual:
> paragraphs aren't mentioned!
They are in "11.1 Structural markup elements"
> I'm not trying to be pedantic here and hold out for the presence or
> absence of blank lines to indicate a paragraph break in Org-mode. For
> the use case of lists set within a paragraph some other mechanism might
> be more appropriate.
I would suggest #+begin_latex #+end_latex for such specific needs
(paralist).
> But this circles back to the more general question of how paragraphs are
> indicated in Org-mode. Is it the blank line alone, or the blank line and
> other mechanisms?
There is no strict definition of a paragraph in Org core, yet. That's
why every exporter comes out with its own.
Though, a blank line is definitely seen as a paragraph break, as any
paragraph starter. So, what are these paragraph starters? Here are some:
- any line starting with #+, maybe indented. That includes keywords,
blocks, comments...
- fixed-width lines
- items
- headlines.
Now, defining a paragraph in Org wouldn't necessary be a bad thing for
exporters. This would just add information they could deliberately throw
away. That's why, again, keeping the exact number of blank lines is
important (for when they will throw the information away).
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: LaTeX export of lists
2011-08-24 18:59 ` Nicolas Goaziou
@ 2011-08-24 19:45 ` Thomas S. Dye
0 siblings, 0 replies; 24+ messages in thread
From: Thomas S. Dye @ 2011-08-24 19:45 UTC (permalink / raw
To: Nicolas Goaziou; +Cc: Org-mode
Nicolas Goaziou <n.goaziou@gmail.com> writes:
> tsd@tsdye.com (Thomas S. Dye) writes:
>
>> I've just browsed the Document Structure chapter of the Org-mode manual:
>> paragraphs aren't mentioned!
>
> They are in "11.1 Structural markup elements"
>
Yes, somewhat incongruously. To my mind, the markup elements are blank
lines and \\, not paragraphs.
>> I'm not trying to be pedantic here and hold out for the presence or
>> absence of blank lines to indicate a paragraph break in Org-mode. For
>> the use case of lists set within a paragraph some other mechanism might
>> be more appropriate.
>
> I would suggest #+begin_latex #+end_latex for such specific needs
> (paralist).
>
Yes, but this solution misses the great pleasure and convenience of
working with Org-mode lists. It is something I can live with if it
proves impractical to keep the current configuration, however.
>> But this circles back to the more general question of how paragraphs are
>> indicated in Org-mode. Is it the blank line alone, or the blank line and
>> other mechanisms?
>
> There is no strict definition of a paragraph in Org core, yet. That's
> why every exporter comes out with its own.
>
> Though, a blank line is definitely seen as a paragraph break, as any
> paragraph starter. So, what are these paragraph starters? Here are some:
> - any line starting with #+, maybe indented. That includes keywords,
> blocks, comments...
> - fixed-width lines
> - items
> - headlines.
>
> Now, defining a paragraph in Org wouldn't necessary be a bad thing for
> exporters. This would just add information they could deliberately throw
> away. That's why, again, keeping the exact number of blank lines is
> important (for when they will throw the information away).
>
Thanks very much for this, to me, clear explanation of the issue. I'm
convinced that I've been able to make my points understood and will
happily use the Org-mode that you and others are so kind to develop,
with or without the ability to set Org-mode lists within paragraphs via
LaTeX.
All the best,
Tom
> Regards,
--
T.S. Dye & Colleagues, Archaeologists
735 Bishop St, Suite 315, Honolulu, HI 96813
Tel: 808-529-0866, Fax: 808-529-0884
http://www.tsdye.com
^ permalink raw reply [flat|nested] 24+ messages in thread
end of thread, other threads:[~2011-08-24 19:45 UTC | newest]
Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-28 14:33 LaTeX export of lists Thomas S. Dye
2010-11-28 15:05 ` Nicolas Goaziou
2010-11-28 15:54 ` [patch] " Nicolas Goaziou
2010-11-28 19:02 ` Thomas S. Dye
2010-11-28 21:15 ` Nicolas Goaziou
2010-11-29 8:42 ` Sébastien Mengin
2010-11-29 12:17 ` Nicolas Goaziou
2010-11-28 18:40 ` Thomas S. Dye
2010-11-29 8:43 ` Sébastien Mengin
-- strict thread matches above, loose matches on Subject: below --
2011-07-24 16:16 Thomas S. Dye
2011-07-24 16:44 ` Nick Dokos
2011-07-24 18:13 ` Nicolas Goaziou
2011-07-24 19:18 ` Thomas S. Dye
2011-07-25 8:45 ` Nicolas Goaziou
2011-07-25 16:15 ` Thomas S. Dye
2011-08-24 15:11 ` Eric S Fraga
2011-08-24 15:53 ` Nicolas Goaziou
2011-08-24 17:39 ` Thomas S. Dye
2011-08-24 18:59 ` Nicolas Goaziou
2011-08-24 19:45 ` Thomas S. Dye
2011-08-24 16:40 ` Achim Gratz
2011-08-24 17:08 ` Thomas S. Dye
2010-11-27 22:02 Thomas S. Dye
2010-11-28 6:40 ` Richard Lawrence
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.