Re: [O] How to signal end of a section or subsection

2014-01-23 Thread Sebastien Vauban
Hello Nicolas,

Nicolas Goaziou wrote:
> "Sebastien Vauban" writes:
>
>> Is the simpler solution valid on all types of block environments?
>>
>> To enumerate them (extensively, AFAICT):
>>
>> - structureenv
>> - alertblock
>> - exampleblock
>> - definition
>> - example
>> - proof
>> - beamercolorbox
>> - verse
>> - quotation
>> - quote
>
> The "simpler solution" is just a consequence of special blocks handling
> in LaTeX export back-ends. So, it will work for any special block.

OK, thanks.

> You can rule out verse, example and quote, which have their own type
> in Org syntax.

Verse and quote give the same results in both the complex and the simple
ways.

However, it does not for example.

The following:

--8<---cut here---start->8---
** =example= environment

- Behaves like the theorem environment, except that the theorem style =example=
  is used.
- A side-effect of using this theorem style is that the contents is put in an
  =exampleblock= instead of a =block=.

*** Example :B_example:
:PROPERTIES:
:BEAMER_env: example
:END:

Contents of example

*** End of example:B_ignoreheading:
:PROPERTIES:
:BEAMER_env: ignoreheading
:END:

** =example= environment

- Simpler solution:

#+begin_example
Contents of example
#+end_example
--8<---cut here---end--->8---

gives:

--8<---cut here---start->8---
\begin{frame}[fragile,label=sec-6-8]{\texttt{example} environment}
 \begin{itemize}
\item Behaves like the theorem environment, except that the theorem style 
\texttt{example}
is used.
\item A side-effect of using this theorem style is that the contents is put in 
an
  \texttt{exampleblock} instead of a \texttt{block}.
\end{itemize}

\begin{example}[Example]
Contents of example
\end{example}
\end{frame}
\begin{frame}[fragile,label=sec-6-9]{\texttt{example} environment}
 \begin{itemize}
\item Simpler solution:
\end{itemize}

\begin{verbatim}
Contents of example
\end{verbatim}
\end{frame}
--8<---cut here---end--->8---

Hence, a verbatim environment in LaTeX instead of an example.

Do I miss something?  Or do I have something wrong somewhere?

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] How to signal end of a section or subsection

2014-01-23 Thread Nicolas Goaziou


"Sebastien Vauban" 
writes:

> Is the simpler solution valid on all types of block environments?
>
> To enumerate them (extensively, AFAICT):
>
> - structureenv
> - alertblock
> - exampleblock
> - definition
> - example
> - proof
> - beamercolorbox
> - verse
> - quotation
> - quote

The "simpler solution" is just a consequence of special blocks handling
in LaTeX export back-ends. So, it will work for any special block. You
can rule out verse, example and quote, which have their own type in Org
syntax.


Regards,

-- 
Nicolas Goaziou




Re: [O] How to signal end of a section or subsection

2014-01-23 Thread Sebastien Vauban
Hello Nicolas,

Nicolas Goaziou wrote:
> "Sebastien Vauban" writes:
>
>> I thought that the standard way was the following:
>>
>> *** 
>> :B_theorem:
>> :PROPERTIES:
>> :BEAMER_env: theorem
>> :END:
>>
>> There is no largest prime number.
>>
>> *** End of theorem
>> :B_ignoreheading:
>> :PROPERTIES:
>> :BEAMER_env: ignoreheading
>> :END:
>>
>> Obviously, it's much less readeable...
>
> But more powerful. For example, you can nest blocks of the same type
> with this syntax. Not with the other one.
>
>> Maybe that solution should be deprecated, then?
>
> Certainly not. See above.

OK.

Is the simpler solution valid on all types of block environments?

To enumerate them (extensively, AFAICT):

- structureenv
- alertblock
- exampleblock
- definition
- example
- proof
- beamercolorbox
- verse
- quotation
- quote

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] How to signal end of a section or subsection

2014-01-22 Thread Nicolas Goaziou


Hello,

"Sebastien Vauban" 
writes:

> I thought that the standard way was the following:
>
> *** 
> :B_theorem:
> :PROPERTIES:
> :BEAMER_env: theorem
> :END:
>
> There is no largest prime number.
>
> *** End of theorem
> :B_ignoreheading:
> :PROPERTIES:
> :BEAMER_env: ignoreheading
> :END:
>
> Obviously, it's much less readeable...

But more powerful. For example, you can nest blocks of the same type
with this syntax. Not with the other one.

> Maybe that solution should be deprecated, then?

Certainly not. See above.


Regards,

-- 
Nicolas Goaziou




Re: [O] How to signal end of a section or subsection

2014-01-22 Thread Alan Schmitt
Nicolas Goaziou  writes:

> Hello,
>
> Alan Schmitt  writes:
>
>> I have a use case for beamer export, where I have had to use latex
>> blocks to solve it. If I want:
>>
>> ,
>> | blah blah
>> | 
>> | \begin{block}{Theorem}
>> | foo bar
>> | \end{block}
>> | 
>> | more blah blah
>> `
>>
>> I don't know how to do it using the org machinery without going back to
>> latex.
>
> The following should work:
>
>   #+attr_latex: :options {Theorem}
>   #+begin_block
>   foo bar
>   #+end_block

Ah, nice, thank you, I did not know of this option.

Alan



Re: [O] How to signal end of a section or subsection

2014-01-22 Thread Sebastien Vauban
Nicolas Goaziou wrote:
> Alan Schmitt  writes:
>
>> I have a use case for beamer export, where I have had to use latex
>> blocks to solve it. If I want:
>>
>> ,
>> | blah blah
>> | 
>> | \begin{block}{Theorem}
>> | foo bar
>> | \end{block}
>> | 
>> | more blah blah
>> `
>>
>> I don't know how to do it using the org machinery without going back to
>> latex.
>
> The following should work:
>
>   #+attr_latex: :options {Theorem}
>   #+begin_block
>   foo bar
>   #+end_block

I thought that the standard way was the following:

--8<---cut here---start->8---
*** :B_theorem:
:PROPERTIES:
:BEAMER_env: theorem
:END:

There is no largest prime number.

*** End of theorem:B_ignoreheading:
:PROPERTIES:
:BEAMER_env: ignoreheading
:END:
--8<---cut here---end--->8---

Obviously, it's much less readeable...

Maybe that solution should be deprecated, then?

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] How to signal end of a section or subsection

2014-01-22 Thread Nicolas Goaziou
Hello,

Alan Schmitt  writes:

> I have a use case for beamer export, where I have had to use latex
> blocks to solve it. If I want:
>
> ,
> | blah blah
> | 
> | \begin{block}{Theorem}
> | foo bar
> | \end{block}
> | 
> | more blah blah
> `
>
> I don't know how to do it using the org machinery without going back to
> latex.

The following should work:

  #+attr_latex: :options {Theorem}
  #+begin_block
  foo bar
  #+end_block


Regards,

-- 
Nicolas Goaziou



Re: [O] How to signal end of a section or subsection

2014-01-22 Thread Alan Schmitt
Eric S Fraga  writes:

> I guess you can find plenty of discussions on this list on this topic so
> I won't rehash.  Just to say that there has never been a convincing use
> case that is not easily addressed with description lists and inline
> tasks.  The former can be made to look like encapsulated sections on
> export with appropriate customisation of the various export targets.
>
> I suggest you check out the list and think about your actual use case.

I have a use case for beamer export, where I have had to use latex
blocks to solve it. If I want:

,
| blah blah
| 
| \begin{block}{Theorem}
| foo bar
| \end{block}
| 
| more blah blah
`

I don't know how to do it using the org machinery without going back to
latex.

Alan



Re: [O] How to signal end of a section or subsection

2014-01-21 Thread Eric S Fraga
Hi,

I guess you can find plenty of discussions on this list on this topic so
I won't rehash.  Just to say that there has never been a convincing use
case that is not easily addressed with description lists and inline
tasks.  The former can be made to look like encapsulated sections on
export with appropriate customisation of the various export targets.

I suggest you check out the list and think about your actual use case.

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.3.1, Org release_8.2.4-322-gece429




Re: [O] How to signal end of a section or subsection

2014-01-20 Thread Skip Collins
Several requests have been made over the years for a way to end a
subsection without starting a new new higher level section. This is
possible with plain lists: a blank line ends the list. Some other
syntax would have to be added to org to allow this for sections. I
would love to see something like this implemented:

--- begin org example ---

* First top-level section
A bunch of text.

Blah blah.

Yada yada.

** TODO Something I need to do
** :END:

Resuming first top-level section.

** Here is a small subsection
When this sub-section ends, the top-level section will resume.
** :END:

Resuming first top-level section.

--- end org example ---

Such a fundamental change to org syntax might be difficult to
implement without extensive changes to how files are parsed. But,
IMHO, it would add to its elegance and flexibility. As things stand
now, inline tasks and lists are used as workarounds.



Re: [O] How to signal end of a section or subsection

2014-01-16 Thread Eric S Fraga
Ken Mankoff  writes:

[...]

>  I just discovered org inline tasks. This seems to be another approach, and
> very useful!

Indeed!  I use these all the time for when I have tasks inersprsed in a
large document.  I'm not sure why I forgot to mention this capability;
probably because org has so many ways to accomplish most tasks.  I'm
glad you found out anyway.
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.3.1, Org release_8.2.4-322-gece429




Re: [O] How to signal end of a section or subsection

2014-01-15 Thread Ken Mankoff
Hi Eric,

On Tue, Jan 14, 2014 at 11:55 AM, Eric S Fraga  wrote:
>
>
> What I would do is make the A, B and C paragraph items.  Then add
> checkboxes (C-u C-c C-x C-b) to any list item you want to mark as a todo
> item.  You can set/unset using C-c C-x C-b.  If you add the text [/] to
> the headline with the TODO on it, it will be updated to indicate the
> number of completed checkboxes and the total number of such boxes each
> time you set or unset one.
>

 I just discovered org inline tasks. This seems to be another approach, and
very useful!

http://orgmode.org/worg/org-faq.html#closing-outline-sections

   -k.


Re: [O] How to signal end of a section or subsection

2014-01-14 Thread Eric S Fraga
Ken Mankoff  writes:

> I just re-watched the Carsten Google Tech Talk from 2008. He explains

Great talk that was!  Changed my life.

> that Org was created as a hybrid note taker and TODO list, and that
> the TODOs should be embedded in the text. This leads me to a strange
> situation and I hope list members can explain how they deal with it.
>
>
> * ONE: Sometimes I have as section of text as I take notes.
>
> ** TWO: And under that subsections
>
>A And there there are multiple paragraphs of text like this.
>
>B And like this.
>
>C And if one of these becomes an item that should be turned into a
> TODO item, how do I best do this?

What I would do is make the A, B and C paragraph items.  Then add
checkboxes (C-u C-c C-x C-b) to any list item you want to mark as a todo
item.  You can set/unset using C-c C-x C-b.  If you add the text [/] to
the headline with the TODO on it, it will be updated to indicate the
number of completed checkboxes and the total number of such boxes each
time you set or unset one.
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.3.1, Org release_8.2.4-322-gece429




[O] How to signal end of a section or subsection

2014-01-14 Thread Ken Mankoff


I just re-watched the Carsten Google Tech Talk from 2008. He 
explains that Org was created as a hybrid note taker and TODO list, 
and that the TODOs should be embedded in the text. This leads me to 
a strange situation and I hope list members can explain how they 
deal with it.



* ONE: Sometimes I have as section of text as I take notes.

** TWO: And under that subsections

   A And there there are multiple paragraphs of text like this.

   B And like this.

   C And if one of these becomes an item that should be turned into 
a TODO item, how do I best do this?


For example, if "B" needs to be a TODO item, I could set it equal to 
TWO (subsection) like so: "** TODO B" or keep it in its current area 
under TWO (subsubsection) like so "*** TODO B".


The first doesn't make sense because I've elevated the notes under 
"** TWO" to be equal to it. The second option makes sense, but the 
problem is now that "C" is suddenly contained in "B" because there 
is no way to signal that the subsubsection "B" has ended and further 
text is in its original level of under subsection TWO.


I could go through and make A, B, and C all subsubsections, but now 
I need to make up titles for each paragraph of text under "TWO".


Perhaps the best-practice is what I wrote last - not paragraphs of 
text, but each paragraph is its own sub(sub(sub))section with as 
summary title. Is this what others do? Any other advice how do deal 
with this?


Thanks,

  -k.