Re: [O] LaTeX export of lists

2011-08-24 Thread Eric S Fraga
t...@tsdye.com (Thomas S. Dye) writes:

 Nicolas Goaziou n.goaz...@gmail.com writes:

 Hello,

 t...@tsdye.com (Thomas S. Dye) writes:

 Nicolas Goaziou n.goaz...@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)



Re: [O] LaTeX export of lists

2011-08-24 Thread Nicolas Goaziou
Hello,

Eric S Fraga e.fr...@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



Re: [O] LaTeX export of lists

2011-08-24 Thread Achim Gratz
Eric S Fraga e.fr...@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




Re: [O] LaTeX export of lists

2011-08-24 Thread Thomas S. Dye
Eric S Fraga e.fr...@ucl.ac.uk writes:

 t...@tsdye.com (Thomas S. Dye) writes:

 Nicolas Goaziou n.goaz...@gmail.com writes:

 Hello,

 t...@tsdye.com (Thomas S. Dye) writes:

 Nicolas Goaziou n.goaz...@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 =inpara= 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



Re: [O] LaTeX export of lists

2011-08-24 Thread Thomas S. Dye
Nicolas Goaziou n.goaz...@gmail.com writes:

 Hello,

 Eric S Fraga e.fr...@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



Re: [O] LaTeX export of lists

2011-08-24 Thread Nicolas Goaziou
t...@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



Re: [O] LaTeX export of lists

2011-08-24 Thread Thomas S. Dye
Nicolas Goaziou n.goaz...@gmail.com writes:

 t...@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



Re: [O] LaTeX export of lists

2011-07-25 Thread Nicolas Goaziou
Hello,

t...@tsdye.com (Thomas S. Dye) writes:

 Nicolas Goaziou n.goaz...@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



Re: [O] LaTeX export of lists

2011-07-25 Thread Thomas S. Dye
Nicolas Goaziou n.goaz...@gmail.com writes:

 Hello,

 t...@tsdye.com (Thomas S. Dye) writes:

 Nicolas Goaziou n.goaz...@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



Re: [O] LaTeX export of lists

2011-07-24 Thread Nick Dokos
Thomas S. Dye t...@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.goaz...@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.
| 
| :04 04 5c6d7691e72af31680c5560171cc46bea56112ea 
4de9fe5e7c954b31ab23a9e84ba28fa818c368c8 Mlisp
`

Nick



Re: [O] LaTeX export of lists

2011-07-24 Thread Nicolas Goaziou
Hello,

t...@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