emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Eric Schulte" <schulte.eric@gmail.com>
To: mail@christianmoe.com
Cc: emacs-orgmode@gnu.org, Phil Branigan <branigan@mun.ca>
Subject: Re: Using noweb with org-mode source
Date: Wed, 05 Jan 2011 23:24:10 -0700	[thread overview]
Message-ID: <87tyhmeeid.fsf@gmail.com> (raw)
In-Reply-To: <4D24D1F7.1050307@christianmoe.com> (Christian Moe's message of "Wed, 05 Jan 2011 21:17:59 +0100")

Hi Christian,

The following should remove the enclosing begin_src org blocks, and
results in the org-mode exporting normally, rather than verbatim.
Notice the :results header arguments on the last code block, such header
arguments can be set on a file-wide basis to reduce code clutter.

Best -- Eric

* One section, exported to a particular document

#+srcname: primates
#+begin_src org
   ,- chimps :: strong, smart and savage
   ,- bonobos :: less savage, sexy, smart
   ,- orangutans :: kinda asocial, with big arms
   ,- gorillas :: really strong, but shy
#+end_src

Lots of text here.

* Another section, exported to a different document

Let's review what we know about the primate group.

#+begin_src org :noweb yes :results replace raw
<<primates>>
#+end_src


Christian Moe <mail@christianmoe.com> writes:

> Hi,
>
> This should get you part of the way: Use `org' as the language name, 
> not `org-mode'. Enclose the noweb reference in another src block with 
> noweb explicitly turned on. Reworked example follows.
>
> I can't seem to get rid of the code block around it, though, however I 
> play with the header arguments.
>
> Yours,
> Christian
>
>
> * One section, exported to a particular document
>
> #+srcname: primates
> #+begin_src org
>    ,- chimps :: strong, smart and savage
>    ,- bonobos :: less savage, sexy, smart
>    ,- orangutans :: kinda asocial, with big arms
>    ,- gorillas :: really strong, but shy
> #+end_src
>
> Lots of text here.
>
> * Another section, exported to a different document
>
> Let's review what we know about the primate group.
>
> #+begin_src org :noweb yes
> <<primates>>
> #+end_src
>
> On 1/5/11 6:59 PM, Phil Branigan wrote:
>> In making up lecture and teaching materials, I would find it useful to
>> be able to use noweb references to replicate blocks of org-mode text
>> directly, rather than source code from latex or another language.  But
>> org-mode isn't one of the babel-supported languages.  Can anyone
>> suggest a tricky way to achieve this result?
>>
>> What I have in mind is something like the following:
>>
>> * One section, exported to a particular document
>>
>> #+srcname: primates
>> #+begin_src org-mode
>>    - chimps :: strong, smart and savage
>>    - bonobos :: less savage, sexy, smart
>>    - orangutans :: kinda asocial, with big arms
>>    - gorillas :: really strong, but shy
>> #+end_src
>>
>> Lots of text here.
>>
>> * Another section, exported to a different document
>>
>> Let's review what we know about the primate group.
>>
>> <<primates>>
>>
>>
>> --
>> Phil Branigan
>>
>>
>>
>> _______________________________________________
>> 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
>
>
> _______________________________________________
> 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

  parent reply	other threads:[~2011-01-06  6:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-05 17:59 Using noweb with org-mode source Phil Branigan
2011-01-05 19:58 ` suvayu ali
2011-01-05 20:17 ` Christian Moe
2011-01-06  0:08   ` Phil Branigan
2011-01-06  6:24   ` Eric Schulte [this message]
2011-01-06  7:59     ` Christian Moe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87tyhmeeid.fsf@gmail.com \
    --to=schulte.eric@gmail.com \
    --cc=branigan@mun.ca \
    --cc=emacs-orgmode@gnu.org \
    --cc=mail@christianmoe.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).