emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] Using noweb with org-mode source


From: Phil Branigan
Subject: Re: [Orgmode] Using noweb with org-mode source
Date: Wed, 5 Jan 2011 20:38:04 -0330

Thanks, Suvaya and Christian,  Unfortunately, neither of these two suggestions really does what I had hoped.  Using INCLUDE files will certainly allow me to reuse my text and export to different documents, but at the cost of cluttering up my directories with a bunch of files which have no other purpose.  And the syntax proposed by Christian produces verbatim copies of the org-mode source, instead of allowing me to export the same text at different points in the document.  

I can achieve what I want already to some extent by using org-tables and the like to generate latex code in a src block.  But this obviously doesn't offer a general export solution to other formats, and it's a clunky way of working.  It may be that the noweb syntax can't accomodate the kind of src-export-reuse that I'm looking for.  

- Phil Branigan

On Wed, Jan 5, 2011 at 4:47 PM, Christian Moe <address@hidden> wrote:
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.
address@hidden
http://lists.gnu.org/mailman/listinfo/emacs-orgmode




--
Phil Branigan
--------------------
Associate Professor
Department of Linguistics
Memorial University of Newfoundland
St. John's, NL,  A1B 3X9
Tel. (709) 737-8134
Fax (709) 737-4000

reply via email to

[Prev in Thread] Current Thread [Next in Thread]