emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Examples in numbered lists
@ 2010-08-26 16:18 Andrei Jirnyi
  2010-08-26 17:26 ` Neil Hepburn
  2010-08-26 21:56 ` Nicolas Goaziou
  0 siblings, 2 replies; 3+ messages in thread
From: Andrei Jirnyi @ 2010-08-26 16:18 UTC (permalink / raw)
  To: emacs-orgmode

Hi --

Is there any way to make a numbered list preserve its' numbering when 
there are intervening code or example blocks? For example, if I have smth 
like this:
* testing auto numbering
1. First do something
#+begin_example
here is an example how to do something
#+end_example
2. Then do something else

and try to export, it will give me number (1.) for both items. Also if I 
press M-RET on the last line, it will be re-numbered as 1.

Is there any way to avoid this?

--aj

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Examples in numbered lists
  2010-08-26 16:18 Examples in numbered lists Andrei Jirnyi
@ 2010-08-26 17:26 ` Neil Hepburn
  2010-08-26 21:56 ` Nicolas Goaziou
  1 sibling, 0 replies; 3+ messages in thread
From: Neil Hepburn @ 2010-08-26 17:26 UTC (permalink / raw)
  To: Andrei Jirnyi; +Cc: emacs-orgmode

you could revert to raw latex code in your document and use \begin{enumerate}..\end{enumerate} with something like this:
* testing auto numbering
\begin{enumerate}
\item First do something
#+begin_example
here is an example how to do something
#+end_example
\item Then do something else
\end{enumerate}

It's not as elegant as the org-mode approach but it works.

-Neil
On 2010-08-26, at 10:18 AM, Andrei Jirnyi wrote:

> Hi --
> 
> Is there any way to make a numbered list preserve its' numbering when 
> there are intervening code or example blocks? For example, if I have smth 
> like this:
> * testing auto numbering
> 1. First do something
> #+begin_example
> here is an example how to do something
> #+end_example
> 2. Then do something else
> 
> and try to export, it will give me number (1.) for both items. Also if I 
> press M-RET on the last line, it will be re-numbered as 1.
> 
> Is there any way to avoid this?
> 
> --aj
> 
> 
> _______________________________________________
> 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	[flat|nested] 3+ messages in thread

* Re: Examples in numbered lists
  2010-08-26 16:18 Examples in numbered lists Andrei Jirnyi
  2010-08-26 17:26 ` Neil Hepburn
@ 2010-08-26 21:56 ` Nicolas Goaziou
  1 sibling, 0 replies; 3+ messages in thread
From: Nicolas Goaziou @ 2010-08-26 21:56 UTC (permalink / raw)
  To: Andrei Jirnyi; +Cc: emacs-orgmode

Hello,
>>>>> Andrei Jirnyi writes:

> Is there any way to make a numbered list preserve its' numbering
> when there are intervening code or example blocks? For example, if I
> have smth like this: * testing auto numbering 1. First do
> something #+begin_example here is an example how to do
> something #+end_example 2. Then do something else

> and try to export, it will give me number (1.) for both items. Also
> if I press M-RET on the last line, it will be re-numbered as 1.

> Is there any way to avoid this?


Indent your list like this:

* testing auto numbering
1. First do something
   #+begin_example
   here is an example how to do something
   #+end_example
2. Then do something else


Regards,

-- Nicolas

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-08-26 21:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-26 16:18 Examples in numbered lists Andrei Jirnyi
2010-08-26 17:26 ` Neil Hepburn
2010-08-26 21:56 ` Nicolas Goaziou

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).