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


[-- Attachment #1.1.1: Type: text/plain, Size: 739 bytes --]

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.1.2: 0001-Provide-new-macro-to-insert-entry-property.patch --]
[-- Type: text/plain, Size: 1054 bytes --]

From ca968bee5a935229370555e9ad915d12e2eb22ab Mon Sep 17 00:00:00 2001
From: David Maus <dmaus@ictsoc.de>
Date: Thu, 9 Sep 2010 15:38:07 +0200
Subject: [PATCH] Provide new macro to insert entry property

* org-exp.el (org-infile-export-plist): Provide new macro to insert
entry property.

Format: {{{property(PROP)}}}, where PROP is the name of the property.
This currently only works for single value properties and fails with
an error if used above the first headline.
---
 lisp/org-exp.el |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/lisp/org-exp.el b/lisp/org-exp.el
index c16bec8..64ad454 100644
--- a/lisp/org-exp.el
+++ b/lisp/org-exp.el
@@ -771,6 +771,7 @@ modified) list.")
 	;; Add macro definitions
 	(setq p (plist-put p :macro-date "(eval (format-time-string \"$1\"))"))
 	(setq p (plist-put p :macro-time "(eval (format-time-string \"$1\"))"))
+	(setq p (plist-put p :macro-property "(eval (org-entry-get nil \"$1\"))"))
 	(setq p (plist-put
 		 p :macro-modification-time
 		 (and (buffer-file-name)
-- 
1.7.1


[-- Attachment #1.2: Type: application/pgp-signature, Size: 230 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 13:44 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 [this message]
2010-09-09 15:40   ` Scot Becker
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=8762yfowuy.wl%dmaus@ictsoc.de \
    --to=dmaus@ictsoc.de \
    --cc=emacs-orgmode@gnu.org \
    --cc=scot.becker@gmail.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).