* code blocks inside enumerations
@ 2014-01-31 14:01 Alan Schmitt
2014-01-31 14:06 ` Alan Schmitt
0 siblings, 1 reply; 2+ messages in thread
From: Alan Schmitt @ 2014-01-31 14:01 UTC (permalink / raw)
To: emacs-orgmode
Hello,
I'm writing a series of exercises where I need to write some code in the
middle of an enumeration. Unfortunately the following does not work:
--8<---------------cut here---------------start------------->8---
1. This is how one write an empty list
#+BEGIN_SRC emacs-lisp
nil
#+END_SRC
2. And this is a second item
--8<---------------cut here---------------end--------------->8---
When I export this, the source block is interpreted as closing the
enumerate environment.
Is there a way to say that the source block should be nested in the
enclosing enumerating item?
Thanks,
Alan
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: code blocks inside enumerations
2014-01-31 14:01 code blocks inside enumerations Alan Schmitt
@ 2014-01-31 14:06 ` Alan Schmitt
0 siblings, 0 replies; 2+ messages in thread
From: Alan Schmitt @ 2014-01-31 14:06 UTC (permalink / raw)
To: emacs-orgmode
I dug a little deeper and found the answer: I need to indent the source
block.
Alan Schmitt <alan.schmitt@polytechnique.org> writes:
> Hello,
>
> I'm writing a series of exercises where I need to write some code in the
> middle of an enumeration. Unfortunately the following does not work:
>
> 1. This is how one write an empty list
>
> #+BEGIN_SRC emacs-lisp
> nil
> #+END_SRC
>
> 2. And this is a second item
>
> When I export this, the source block is interpreted as closing the
> enumerate environment.
This works:
--8<---------------cut here---------------start------------->8---
1. This is how one write an empty list
#+BEGIN_SRC emacs-lisp
nil
#+END_SRC
2. And this is a second item
--8<---------------cut here---------------end--------------->8---
Sorry for the noise,
Alan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-01-31 14:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-31 14:01 code blocks inside enumerations Alan Schmitt
2014-01-31 14:06 ` Alan Schmitt
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).