emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] multi-line citation export issue


From: Ken Mankoff
Subject: Re: [O] multi-line citation export issue
Date: Mon, 13 Jan 2014 10:23:45 -0500 (EST)
User-agent: Alpine 2.00 (OSX 1167 2008-08-23)

Hi Nicolas et al.,

On Mon, 13 Jan 2014, Nicolas Goaziou wrote:

Ken Mankoff <address@hidden> writes:

I am not familiar with export snippets, but I guess from that syntax that I will not be able to export with citations to ODT/DOC. Right now one org file exports well to both formats.

You can also write the same for odt:

 @@odt:\cite{key}@@

So, in your buffer, it would become:

 @@latex:\cite{key}@@@@odt:\cite{key}@@

And you can avoid the implied repetition with a macro:

 #+MACRO: cite @@latex:\cite{$1}@@@@odt:\cite{$1}@@

and write in your document:

 {{{cite(key)}}}

Note that you will need to escape commas (with backslashed) in key.

This also works for your more complicated example :

 #+MACRO: cite2 @@latex:\cite[$1]{$2}@@@@odt:\cite[$1]{$2}@@


Wow. I was going point out that citing for both formats is cumbersome and makes the document hard-to-read, but the MACRO solves this. I was not aware of MACRO's. I guess this is both the beauty and pain of Org and emacs, all this customization. And down the rabbit-hole I go, because now I need to redefine my RefTeX shortcut so that it inserts {{{cite(key)}}} instead of \cite{key}.

Unfortunately this is probably not something I have the skill to do right now. Perhaps I could get it for one citation, but the regex detect when inside an existing cite command and just insert the key, not the latex command wrapping it, is beyond my lisp skill and time. I'll just deal with no spaces inside \cite{a,b}.

But thank you for teaching me about MACRO anyway.

  -k.



reply via email to

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