emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Scot Becker <scot.becker@gmail.com>
To: David Maus <dmaus@ictsoc.de>
Cc: Org-mode ml <emacs-orgmode@gnu.org>
Subject: Re: Exporting property values to LaTeX
Date: Thu, 9 Sep 2010 16:40:09 +0100	[thread overview]
Message-ID: <AANLkTi=foaBbF+9gdtMJMhVQoZ5VxBctRz4jQi=pofa4@mail.gmail.com> (raw)
In-Reply-To: <8762yfowuy.wl%dmaus@ictsoc.de>


[-- Attachment #1.1: Type: text/plain, Size: 2082 bytes --]

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 <dmaus@ictsoc.de> wrote:

> Scot Becker wrote:
> >[1  <multipart/alternative (7bit)>]
> >[1.1  <text/plain; ISO-8859-1 (7bit)>]
>
> >[1.2  <text/html; ISO-8859-1 (quoted-printable)>]
> >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
>

[-- Attachment #1.2: Type: text/html, Size: 2761 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
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

  reply	other threads:[~2010-09-09 15:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-09 11:42 Exporting property values to LaTeX Scot Becker
2010-09-09 13:44 ` David Maus
2010-09-09 15:40   ` Scot Becker [this message]
2010-09-09 16:03     ` David Maus

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='AANLkTi=foaBbF+9gdtMJMhVQoZ5VxBctRz4jQi=pofa4@mail.gmail.com' \
    --to=scot.becker@gmail.com \
    --cc=dmaus@ictsoc.de \
    --cc=emacs-orgmode@gnu.org \
    /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).