From: Ken Mankoff <mankoff@gmail.com>
To: Nicolas Goaziou <n.goaziou@gmail.com>
Cc: Org-mode <emacs-orgmode@gnu.org>
Subject: Re: multi-line citation export issue
Date: Mon, 13 Jan 2014 10:23:45 -0500 (EST) [thread overview]
Message-ID: <alpine.OSX.2.00.1401131020260.11669@tbetbambyn.jubv.rqh> (raw)
In-Reply-To: <87zjn0jg26.fsf@gmail.com>
Hi Nicolas et al.,
On Mon, 13 Jan 2014, Nicolas Goaziou wrote:
> Ken Mankoff <mankoff@gmail.com> 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.
next prev parent reply other threads:[~2014-01-13 15:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-12 23:21 multi-line citation export issue Ken Mankoff
2014-01-12 23:23 ` Ken Mankoff
2014-01-13 0:02 ` Nicolas Goaziou
2014-01-13 2:04 ` Ken Mankoff
2014-01-13 11:07 ` Nicolas Goaziou
2014-01-13 15:23 ` Ken Mankoff [this message]
2014-01-13 21:56 ` Rasmus
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=alpine.OSX.2.00.1401131020260.11669@tbetbambyn.jubv.rqh \
--to=mankoff@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=n.goaziou@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).