From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scot Becker Subject: Re: Exporting property values to LaTeX Date: Thu, 9 Sep 2010 16:40:09 +0100 Message-ID: References: <8762yfowuy.wl%dmaus@ictsoc.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0089283990==" Return-path: Received: from [140.186.70.92] (port=49955 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OtjSt-0002RZ-H7 for emacs-orgmode@gnu.org; Thu, 09 Sep 2010 11:55:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OtjEn-0005l7-QU for emacs-orgmode@gnu.org; Thu, 09 Sep 2010 11:40:37 -0400 Received: from mail-pz0-f41.google.com ([209.85.210.41]:35851) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OtjEn-0005ku-H3 for emacs-orgmode@gnu.org; Thu, 09 Sep 2010 11:40:33 -0400 Received: by pzk26 with SMTP id 26so8418pzk.0 for ; Thu, 09 Sep 2010 08:40:32 -0700 (PDT) In-Reply-To: <8762yfowuy.wl%dmaus@ictsoc.de> 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: David Maus Cc: Org-mode ml --===============0089283990== Content-Type: multipart/alternative; boundary=001636456f22268738048fd5736c --001636456f22268738048fd5736c Content-Type: text/plain; charset=ISO-8859-1 David, Thanks for your response. What a cool and useful patch. This adds all kinds of cool functionality to org-mode, and in a single line! I've had several times I wished I could do this kind of thing. As it is, it doesn't automate my present case much, since I'd still have to put the macro expansion in after every headline. Not surprisingly it won't expand if you put the {{{property(myproperty}}} code as part of a headline in org-export-latex-classes. I reckon I'll have to try to do a hacked-up latex exporter. Also, the patch doesn't seem to work with inherited properties. With org-use-property-inheritance set to 't', and this input file: ---------------- * Notes taken while reading: Smith, Some-Wild-Book :PROPERTIES: :bibkey: smith2009somewild :END: This here is the key: {{{property(bibkey)}}}. ** The Problem This here is the key: {{{property(bibkey)}}}. ------------------------ I get this output: ------------------------- \section{Notes taken while reading: Smith, Some-Wild-Book} \label{sec-1} This here is the key: smith2009somewild. \subsection{The Problem} \label{sec-1_1} This here is the key: \{{\{property(bibkey)\}}\}. --------------------------- Cheers, Scot On Thu, Sep 9, 2010 at 2:44 PM, David Maus wrote: > Scot Becker wrote: > >[1 ] > >[1.1 ] > > >[1.2 ] > >SHORT VERSION: > > >Can someone tell me how I might be able to get a property value exported > to LaTeX? > > This is currently not possible but attached patch adds a new macro > (cf. Manual, 11.6 Macro replacement) that inserts a property of the > current subtree. > > Example: > > {{{property(id)}}} > > Will insert the ID property of current subtree if the Org buffer is > exported. > > This patch only works for singe value properties and raises an error > if the macro is inserted above the first headline. > > Best, > -- David > -- > OpenPGP... 0x99ADB83B5A4478E6 > Jabber.... dmjena@jabber.org > Email..... dmaus@ictsoc.de > --001636456f22268738048fd5736c Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable David,

Thanks for your response.=A0 What a cool and useful patch. = =A0 This adds all kinds of cool functionality to org-mode, and in a single = line! =A0=A0 I've had several times I wished I could do this kind of th= ing.=A0

As it is, it doesn't automate my present case much, since I'd s= till have to put the macro expansion in after every headline.=A0 Not surpri= singly it won't expand if you put the {{{property(myproperty}}} code as= part of a headline in org-export-latex-classes.=A0 I reckon I'll have = to try to do a hacked-up latex exporter.

Also, the patch doesn't seem to work with inherited properties.=A0 = With org-use-property-inheritance set to 't', and this input file:<= br>----------------
* Notes taken while reading: Smith, Some-Wild-Book =A0 :PROPERTIES:
=A0 :bibkey:=A0=A0 smith2009somewild
=A0 :END:
This here is the key:=A0 {{{property(bibkey)}}}.=A0

** The Proble= m
This here is the key:=A0 {{{property(bibkey)}}}.=A0
--------------= ----------

I get this output:

-------------------------
\section{Notes t= aken while reading: Smith, Some-Wild-Book}
\label{sec-1}


This= here is the key:=A0 smith2009somewild.=A0
\subsection{The Problem}
\label{sec-1_1}

This here is the key:=A0 \{{\{property(bibkey)\}}\}.= =A0
---------------------------


Cheers,

Scot

<= div class=3D"gmail_quote">On Thu, Sep 9, 2010 at 2:44 PM, David Maus <dmaus@ictsoc.de><= /span> wrote:
Scot Becker wrote= :
>[1 =A0<multipart/alternative (7bit)>]
>[1.1 =A0<text/plain; ISO-8859-1 (7bit)>]

>[1.2 =A0<text/html; ISO-8859-1 (quoted-printable)>]
>SHORT VERSION:

>Can someone tell me how I might be able to get a property value exporte= d to LaTeX?

This is currently not possible but attached patch adds a new macro (cf. Manual, 11.6 Macro replacement) that inserts a property of the
current subtree.

Example:

{{{property(id)}}}

Will insert the ID property of current subtree if the Org buffer is
exported.

This patch only works for singe value properties and raises an error
if the macro is inserted above the first headline.

Best,
=A0-- David
--
OpenPGP... 0x99ADB83B5A4478E6
Jabber.... dmjena@jabber.org
Email..... dmaus@ictsoc.de

--001636456f22268738048fd5736c-- --===============0089283990== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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 --===============0089283990==--