From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: multi-line citation export issue Date: Mon, 13 Jan 2014 22:56:22 +0100 Message-ID: <87r48bzgu1.fsf@gmx.us> References: <874n58lpe8.fsf@gmail.com> <87zjn0jg26.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47794) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W2pRA-0002lE-Jv for emacs-orgmode@gnu.org; Mon, 13 Jan 2014 16:52:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W2pR3-0004E4-9i for emacs-orgmode@gnu.org; Mon, 13 Jan 2014 16:52:48 -0500 Received: from plane.gmane.org ([80.91.229.3]:35116) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W2pR3-0004E0-3A for emacs-orgmode@gnu.org; Mon, 13 Jan 2014 16:52:41 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1W2pQz-0006oa-V3 for emacs-orgmode@gnu.org; Mon, 13 Jan 2014 22:52:37 +0100 Received: from tsn85-159-236-209.dyn.nltelcom.net ([85.159.236.209]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 13 Jan 2014 22:52:37 +0100 Received: from rasmus by tsn85-159-236-209.dyn.nltelcom.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 13 Jan 2014 22:52:37 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Ken Mankoff writes: > 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}. Another possibility is using links as suggested by Tom S. Dye. These do not suffer from the newline problem you encountered. They do not format nicely, though, if you have complicated cite-constructions. Here's an example using biblatex syntax in LaTeX and a cite tag in HTML: (org-add-link-type "textcite" 'ramus/find-lit (lambda (path desc format) (cond ((eq format 'html) (format "(%s)" path)) ((eq format 'odt) (format "%s" path)) ((eq format 'latex) (if (or (not desc) (equal 0 (search "cite:" desc))) (format "\\textcite{%s}" path) (format "\\textcite[%s][%s]{%s}" (cadr (split-string desc ";")) (car (split-string desc ";")) path)))))) where rasmus/find-lit opens the correct pdf from my local archive, if possible. You can add reftex support in a manner similar to the following: (with-eval-after-load 'org (defun org-mode-reftex-setup () ;; (load-library "reftex") (require 'reftex) (and (buffer-file-name) (file-exists-p (buffer-file-name)) ;; (reftex-parse-all) ) (make-local-variable 'reftex-cite-format) (setq reftex-cite-format 'org) (define-key org-mode-map (kbd "C-c )") 'reftex-citation)) (add-hook 'org-mode-hook 'org-mode-reftex-setup)) (with-eval-after-load 'reftex (add-to-list 'reftex-cite-format-builtin '(org "Org-mode citation" ((?m . "[[cite:%l]]") (?t . "[[textcite:%l]]") (?p . "[[parencite:%l]]") (?s . "[[citepos:%l]]") (?a . "[[citeauthor:%l]]") (?y . "[[citeyear:%l]]") (?l . "%l"))))) –Rasmus -- Send from my Emacs