From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Thomas S. Dye" Subject: [babel] language support Date: Sat, 17 Oct 2009 07:44:13 -1000 Message-ID: Mime-Version: 1.0 (Apple Message framework v936) Content-Type: multipart/mixed; boundary="===============1000828007==" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MzDKO-0004GR-82 for emacs-orgmode@gnu.org; Sat, 17 Oct 2009 13:44:28 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MzDKI-000473-Bb for emacs-orgmode@gnu.org; Sat, 17 Oct 2009 13:44:26 -0400 Received: from [199.232.76.173] (port=37369 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MzDKI-00046u-8U for emacs-orgmode@gnu.org; Sat, 17 Oct 2009 13:44:22 -0400 Received: from outbound-mail-16.bluehost.com ([69.89.20.231]:58492) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1MzDKH-00007H-G1 for emacs-orgmode@gnu.org; Sat, 17 Oct 2009 13:44:21 -0400 Received: from cpe-24-161-159-72.hawaii.res.rr.com ([24.161.159.72] helo=[192.168.1.2]) by box472.bluehost.com with esmtpa (Exim 4.69) (envelope-from ) id 1MzDKA-0004kF-Mh for emacs-orgmode@gnu.org; Sat, 17 Oct 2009 11:44:15 -0600 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --===============1000828007== Content-Type: multipart/alternative; boundary=Apple-Mail-61-468862982 --Apple-Mail-61-468862982 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Aloha all, Is it possible (or would it be useful) to leverage the literate programming facilities of org-babel to write LaTeX code? I'd like to weave a document that describes how some thesis/idea/story can be developed/elaborated/told and then tangle an instance of 'developed thesis'/'elaborated idea'/'told story' that LaTeX can make presentable. The motivation for this is a desire to have one source document that will tangle 1) a slide presentation via beamer, and 2) a print document for publication. The two share a common organization/ structure/plot but there are radically different presentation mode constraints. Org-mode is a terrific tool for organizing, structuring, and plotting. Org-babel seems to be a likely candidate for abstracting the different presentation modes. Here is some pseudo-code for illustration: * Idea 1 #+srcname: beamer-idea-1 #+begin_src latex :exports none \begin{itemize} \item first concept \item second concept \end{itemize} #+end_src #+srcname: latex-idea-1 #+begin_src latex :exports none The first concept was developed by \citet{author1}. It later became the basis for the second concept \citep{author2}. ... #+end_src #+srcname: beamer-presentation #+begin_src latex :tangle beamer-thesis :exports none # <> # <> ... #+end_src #+srcname: latex-presentation #+begin_src latex :tangle latex-thesis :exports none # <> # <> ... #+end_src Tom Thomas S. Dye, Ph.D. T. S. Dye & Colleagues, Archaeologists, Inc. Phone: (808) 529-0866 Fax: (808) 529-0884 http://www.tsdye.com --Apple-Mail-61-468862982 Content-Type: text/html; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Aloha = all,

Is it possible (or would it be useful) to = leverage the literate programming facilities of org-babel to write LaTeX = code?  

I'd like to weave a document that = describes how some thesis/idea/story can be developed/elaborated/told = and then tangle an instance of 'developed thesis'/'elaborated = idea'/'told story' that LaTeX can make presentable.  The motivation = for this is a desire to have one source document that will tangle 1) a = slide presentation via beamer, and 2) a print document for publication. =  The two share a common organization/structure/plot but there are = radically different presentation mode = constraints.

Org-mode is a terrific tool for = organizing, structuring, and plotting.  Org-babel seems to be a = likely candidate for abstracting the different presentation = modes.

Here is some pseudo-code for = illustration:

* Idea 1
#+srcname: =
beamer-idea-1
#+begin_src latex :exports none
\begin{itemize}
	\item =
first concept
	\item second =
concept
\end{itemize}
#+end_src
#+begin_src latex :exports =
none
The first concept was developed by =
\citet{author1}.  It later became the basis for the second concept =
\citep{author2}. ...
#+srcname: =
beamer-presentation
#+begin_src =
latex :tangle beamer-thesis :exports none
# =
<<beamer-idea-1>>
# =
<<beamer-idea-2>>
... 
#+end_src
#+begin_src =
latex :tangle latex-thesis :exports none
# =
<<latex-idea-1>>
# =
<<latex-idea-2>>
#+end_src
=
Tom
<= /font>

Thomas S. Dye, Ph.D.

T. S. Dye & Colleagues, = Archaeologists, Inc.

Phone: (808) 529-0866 Fax: (808) 529-0884

=

= --Apple-Mail-61-468862982-- --===============1000828007== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --===============1000828007==-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: [babel] language support Date: Sat, 17 Oct 2009 12:41:11 -0600 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MzEDS-0000Pn-83 for emacs-orgmode@gnu.org; Sat, 17 Oct 2009 14:41:22 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MzEDN-0000LB-FD for emacs-orgmode@gnu.org; Sat, 17 Oct 2009 14:41:21 -0400 Received: from [199.232.76.173] (port=41389 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MzEDN-0000L6-9k for emacs-orgmode@gnu.org; Sat, 17 Oct 2009 14:41:17 -0400 Received: from mail-px0-f191.google.com ([209.85.216.191]:34822) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MzEDM-0007WV-Qu for emacs-orgmode@gnu.org; Sat, 17 Oct 2009 14:41:17 -0400 Received: by pxi29 with SMTP id 29so2376594pxi.14 for ; Sat, 17 Oct 2009 11:41:15 -0700 (PDT) In-Reply-To: (Thomas S. Dye's message of "Sat, 17 Oct 2009 07:44:13 -1000") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: "Thomas S. Dye" Cc: emacs-orgmode@gnu.org --=-=-= Hi Tom, I certainly believe what you describe should be possible, although it pains me to imagine embedding pure latex code in an Org-mode document and losing the ability to use the org latex export helpers :), but I digress. Org-babel needs to be told to recognize latex source code blocks and how they should be tangled, which can be accomplished with the following (org-babel-add-interpreter "latex") (add-to-list 'org-babel-tangle-langs '("latex" "tex")) Once that is done `org-babel-tangle' should do the trick. for example, after evaluating the above I was able to tangle the following .org file into the following .tex file. --=-=-= Content-Type: application/octet-stream Content-Disposition: attachment; filename=babel-latex.org #+TITLE: babel-tangling #+OPTIONS: num:nil ^:nil #+LaTeX_CLASS: normal * top level ** and some more #+srcname: latex-idea-1 #+begin_src latex :tangle none \item first concept \item second concept #+end_src #+srcname: latex-idea-2 #+begin_src latex :tangle none The first concept was developed by \citet{author1}. It later became the basis for the second concept \citep{author2}. ... #+end_src #+begin_src latex :tangle latex-thesis :exports none % <> % <> #+end_src --=-=-= Content-Type: application/x-tex Content-Disposition: attachment; filename=latex-thesis.tex % generated by org-babel-tangle % [[file:~/Desktop/scraps/babel-latex.org::*and%20some%20more][block-3]] % <> \item first concept \item second concept % <> The first concept was developed by \citet{author1}. It later became the basis for the second concept \citep{author2}. ... % block-3 ends here --=-=-= Hope this suits your needs. Cheers -- Eric "Thomas S. Dye" writes: > Aloha all, > > Is it possible (or would it be useful) to leverage the literate programming facilities of org-babel to > write LaTeX code? > > I'd like to weave a document that describes how some thesis/idea/story can be developed/elaborated/told > and then tangle an instance of 'developed thesis'/'elaborated idea'/'told story' that LaTeX can make > presentable. The motivation for this is a desire to have one source document that will tangle 1) a slide > presentation via beamer, and 2) a print document for publication. The two share a common organization/ > structure/plot but there are radically different presentation mode constraints. > > Org-mode is a terrific tool for organizing, structuring, and plotting. Org-babel seems to be a likely > candidate for abstracting the different presentation modes. > > Here is some pseudo-code for illustration: > > * Idea 1 > > #+srcname: beamer-idea-1 > > #+begin_src latex :exports none > > \begin{itemize} > > \item first concept > > \item second concept > > \end{itemize} > > #+end_src > > #+srcname: latex-idea-1 > > #+begin_src latex :exports none > > The first concept was developed by \citet{author1}. It later became the basis for the second concept \citep{author2}. ... > > #+end_src > > #+srcname: beamer-presentation > > #+begin_src latex :tangle beamer-thesis :exports none > > # <> > > # <> > > ... > > #+end_src > > #+srcname: latex-presentation > > #+begin_src latex :tangle latex-thesis :exports none > > # <> > > # <> > > ... > > #+end_src > > Tom > > Thomas S. Dye, Ph.D. > > T. S. Dye & Colleagues, Archaeologists, Inc. > > Phone: (808) 529-0866 Fax: (808) 529-0884 > > http://www.tsdye.com > > _______________________________________________ > Emacs-orgmode mailing list > Remember: use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --=-=-=-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Thomas S. Dye" Subject: Re: [babel] language support Date: Sat, 17 Oct 2009 09:52:32 -1000 Message-ID: <205A0691-6023-422C-B2B6-4EEBEFFF2DEA@tsdye.com> References: Mime-Version: 1.0 (Apple Message framework v936) Content-Type: multipart/mixed; boundary="===============0636407812==" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MzFKT-0002j4-TL for emacs-orgmode@gnu.org; Sat, 17 Oct 2009 15:52:41 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MzFKP-0002g5-P7 for emacs-orgmode@gnu.org; Sat, 17 Oct 2009 15:52:41 -0400 Received: from [199.232.76.173] (port=51774 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MzFKP-0002fu-Gw for emacs-orgmode@gnu.org; Sat, 17 Oct 2009 15:52:37 -0400 Received: from outbound-mail-17.bluehost.com ([69.89.20.232]:51295) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1MzFKO-00080h-QA for emacs-orgmode@gnu.org; Sat, 17 Oct 2009 15:52:37 -0400 Received: from cpe-24-161-159-72.hawaii.res.rr.com ([24.161.159.72] helo=[192.168.1.2]) by box472.bluehost.com with esmtpa (Exim 4.69) (envelope-from ) id 1MzFKL-0005uN-SP for emacs-orgmode@gnu.org; Sat, 17 Oct 2009 13:52:34 -0600 In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --===============0636407812== Content-Type: multipart/alternative; boundary=Apple-Mail-65-476562146 --Apple-Mail-65-476562146 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Hi Eric, Wonderful! I look forward to using this new tool. Thank you. If it eases your pain :), I don't plan to ignore the org latex export helpers. I'd like to produce a "reproducible research" document (as LaTeX/pdf and/or html) that includes descriptions of data collection, analysis, results, *and* presentation (as both conference paper and publication). Given my current toolbox, the document might contain source code chunks in SQL, R, Python, and LaTeX. The latex export helpers (and html export helpers) will have a role in producing the "reproducible research" document, which can have a relatively simple structure, but the helpers won't be called on to abstract the full complexity of LaTeX (or at least that large portion required to achieve some particular publication standard). At this point, I don't fully comprehend the possible paths to this end, especially in comparison to the capabilities of others on this list, and comments or suggestions are most welcome. All the best, Tom Thomas S. Dye, Ph.D. T. S. Dye & Colleagues, Archaeologists, Inc. Phone: (808) 529-0866 Fax: (808) 529-0884 http://www.tsdye.com On Oct 17, 2009, at 8:41 AM, Eric Schulte wrote: > Hi Tom, > > I certainly believe what you describe should be possible, although it > pains me to imagine embedding pure latex code in an Org-mode document > and losing the ability to use the org latex export helpers :), but I > digress. > > Org-babel needs to be told to recognize latex source code blocks and > how > they should be tangled, which can be accomplished with the following > > (org-babel-add-interpreter "latex") > (add-to-list 'org-babel-tangle-langs '("latex" "tex")) > > Once that is done `org-babel-tangle' should do the trick. > > for example, after evaluating the above I was able to tangle the > following .org file into the following .tex file. > > > > Hope this suits your needs. Cheers -- Eric > > "Thomas S. Dye" writes: > >> Aloha all, >> >> Is it possible (or would it be useful) to leverage the literate >> programming facilities of org-babel to >> write LaTeX code? >> >> I'd like to weave a document that describes how some thesis/idea/ >> story can be developed/elaborated/told >> and then tangle an instance of 'developed thesis'/'elaborated >> idea'/'told story' that LaTeX can make >> presentable. The motivation for this is a desire to have one >> source document that will tangle 1) a slide >> presentation via beamer, and 2) a print document for publication. >> The two share a common organization/ >> structure/plot but there are radically different presentation mode >> constraints. >> >> Org-mode is a terrific tool for organizing, structuring, and >> plotting. Org-babel seems to be a likely >> candidate for abstracting the different presentation modes. >> >> Here is some pseudo-code for illustration: >> >> * Idea 1 >> >> #+srcname: beamer-idea-1 >> >> #+begin_src latex :exports none >> >> \begin{itemize} >> >> \item first concept >> >> \item second concept >> >> \end{itemize} >> >> #+end_src >> >> #+srcname: latex-idea-1 >> >> #+begin_src latex :exports none >> >> The first concept was developed by \citet{author1}. It later >> became the basis for the second concept \citep{author2}. ... >> >> #+end_src >> >> #+srcname: beamer-presentation >> >> #+begin_src latex :tangle beamer-thesis :exports none >> >> # <> >> >> # <> >> >> ... >> >> #+end_src >> >> #+srcname: latex-presentation >> >> #+begin_src latex :tangle latex-thesis :exports none >> >> # <> >> >> # <> >> >> ... >> >> #+end_src >> >> Tom >> >> Thomas S. Dye, Ph.D. >> >> T. S. Dye & Colleagues, Archaeologists, Inc. >> >> Phone: (808) 529-0866 Fax: (808) 529-0884 >> >> http://www.tsdye.com >> >> _______________________________________________ >> Emacs-orgmode mailing list >> Remember: use `Reply All' to send replies to the list. >> Emacs-orgmode@gnu.org >> http://lists.gnu.org/mailman/listinfo/emacs-orgmode --Apple-Mail-65-476562146 Content-Type: text/html; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi = Eric,

Wonderful!  I look forward to using this = new tool.  Thank you.

If it eases your = pain :), I don't plan to ignore the org latex export = helpers.  I'd like to produce a "reprod= ucible research" document (as LaTeX/pdf and/or&nb= sp;html) that includes descriptions of data = collection, analysis, results, *and* presentation = ;(as both conference paper and publication). =  Given my current toolbox, the document might contain source code = chunks in SQL, R, Python, and LaTeX.  The latex export helpers (and = html export helpers) will have a role in producing the "reproducible = research" document, which can have a relatively simple structure, but = the helpers won't be called on to abstract the full complexity of LaTeX = (or at least that large portion required to achieve some particular = publication standard).

At this point, I don't = fully comprehend the possible paths to this end, especially in = comparison to the capabilities of others on this list, and comments or = suggestions are most welcome.

All the = best,
Tom

Hi Tom,

I certainly believe what you describe = should be possible, although it
pains me to imagine embedding pure = latex code in an Org-mode document
and losing the ability to use the = org latex export helpers :), but I
digress.

Org-babel needs to = be told to recognize latex source code blocks and how
they should be = tangled, which can be accomplished with the = following

(org-babel-add-interpreter "latex")
(add-to-list = 'org-babel-tangle-langs '("latex" "tex"))

Once that is done = `org-babel-tangle' should do the trick.

for example, after = evaluating the above I was able to tangle the
following .org file = into the following .tex = file.

<babel-latex.org><latex-thesis.te= x>

Hope this suits your needs.  Cheers -- = Eric

"Thomas S. Dye" <
tsd@tsdye.com> = writes:

Aloha = all,

Is it possible = (or would it be useful) to leverage the literate programming facilities = of org-babel to
write LaTeX = code?  

I'd like to = weave a document that describes how some thesis/idea/story can be = developed/elaborated/told
and = then tangle an instance of 'developed thesis'/'elaborated idea'/'told = story' that LaTeX can make
presentable.  The motivation for this is a desire to = have one source document that will tangle 1) a = slide
presentation via beamer, = and 2) a print document for publication.  The two share a common = organization/
structure/plot = but there are radically different presentation mode = constraints.

Org-mode is a = terrific tool for organizing, structuring, and plotting.  Org-babel = seems to be a likely
candidate = for abstracting the different presentation = modes.

Here is some = pseudo-code for illustration:

* Idea = 1

#+srcname: beamer-idea-1

#+begin_src = latex :exports none

\begin{itemize}

=        \item first = concept

=        \item second = concept

\end{itemize}

#+end_src

#+srcname: = latex-idea-1

#+begin_src = latex :exports none

The first = concept was developed by \citet{author1}.  It later became the = basis for the second concept \citep{author2}. = ...

#+end_src

#+srcname: = beamer-presentation

#+begin_src = latex :tangle beamer-thesis :exports none

# = <<beamer-idea-1>>

# = <<beamer-idea-2>>

... =

#+end_src

#+srcname: = latex-presentation

#+begin_src = latex :tangle latex-thesis :exports none

# = <<latex-idea-1>>

# = <<latex-idea-2>>

... =

#+end_src

Tom

Thomas S. Dye, = Ph.D.

T. S. Dye & = Colleagues, Archaeologists, Inc.

Phone: (808) = 529-0866 Fax: (808) 529-0884

http://www.tsdye.com

_______________________________________________
Emacs-orgmode mailing = list
Remember: use `Reply All' = to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.= gnu.org/mailman/listinfo/emacs-orgmode

= --Apple-Mail-65-476562146-- --===============0636407812== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --===============0636407812==--