emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <n.goaziou@gmail.com>
To: Ken Mankoff <mankoff@gmail.com>
Cc: Org-mode <emacs-orgmode@gnu.org>
Subject: Re: multi-line citation export issue
Date: Mon, 13 Jan 2014 12:07:29 +0100	[thread overview]
Message-ID: <87zjn0jg26.fsf@gmail.com> (raw)
In-Reply-To: <alpine.OSX.2.00.1401122101040.5000@tbetbambyn> (Ken Mankoff's message of "Sun, 12 Jan 2014 21:04:11 -0500 (EST)")

Hello,

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}@@

> I will deal with multiple citations by not having spaces, and find
> some other way (rewording?) to deal with the \cite[foo bar]{baz}
> situation. And maybe someone more versed in org source can file this
> as a bug, even if not a priority.

This is not a bug. Parsing any LaTeX macro is way out of Org's league.
Org conveniently support some simple macros, that's all.


Regards,

-- 
Nicolas Goaziou

  reply	other threads:[~2014-01-13 11:07 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 [this message]
2014-01-13 15:23       ` Ken Mankoff
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=87zjn0jg26.fsf@gmail.com \
    --to=n.goaziou@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=mankoff@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).