From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Is it possible to have a code fragment in a bulleted list? Date: Mon, 09 Jan 2012 08:13:49 +0100 Message-ID: <87ty45s5zm.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:44273) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rk9SJ-0004yD-HS for emacs-orgmode@gnu.org; Mon, 09 Jan 2012 02:15:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rk9SI-0002R7-GF for emacs-orgmode@gnu.org; Mon, 09 Jan 2012 02:15:43 -0500 Received: from mail-wi0-f169.google.com ([209.85.212.169]:56904) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rk9SI-0002R2-AO for emacs-orgmode@gnu.org; Mon, 09 Jan 2012 02:15:42 -0500 Received: by wibhq12 with SMTP id hq12so3368829wib.0 for ; Sun, 08 Jan 2012 23:15:41 -0800 (PST) In-Reply-To: (Stephen J. Barr's message of "Sun, 8 Jan 2012 20:07:41 -0500") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: "Stephen J. Barr" Cc: emacs-orgmode@gnu.org Hello, "Stephen J. Barr" writes: > Quick question. Is it possible to have a code fragment in a bulleted > list? For example, I would like to do > > - This is interesting > - Level 2 for loop > > #+begin_src R > for (i in 1:10) { > ... > } > #+end_src > > - This should also be on level 2 > > When I render this as HTML, the sentences "Level 2 for loop" and "This > should also be on level 2" to be at the same depth, with the source > code block in the middle. How do I do this? You have to indent your whole code block so that it belongs to the list. In other words, the "#+begin_src" line has to start at the "L" of "Level 2". You may want to read the section 2.7 of the manual for more information. Regards, -- Nicolas Goaziou