Citations: Use RefTeX to insert citations
RefTeX can now be used to create a citation in Org-mode buffers. Setup the buffer with #+BIBLIOGRAPHY: bibbase style and create citations with `C-c C-x ['.
This commit is contained in:
parent
68e6c08c17
commit
a7ed5b9b76
|
@ -682,18 +682,12 @@ after ``{\tt :}'', and dictionary words elsewhere.
|
||||||
\key{quit agenda, remove agenda buffer}{q}
|
\key{quit agenda, remove agenda buffer}{q}
|
||||||
\key{exit agenda, remove all agenda buffers}{x}
|
\key{exit agenda, remove all agenda buffers}{x}
|
||||||
|
|
||||||
\section{Calendar and Diary Integration}
|
|
||||||
|
|
||||||
Include Emacs diary entries into Org-mode agenda with:
|
|
||||||
\beginexample%
|
|
||||||
(setq org-agenda-include-diary t)
|
|
||||||
\endexample
|
|
||||||
|
|
||||||
\section{LaTeX and cdlatex-mode}
|
\section{LaTeX and cdlatex-mode}
|
||||||
|
|
||||||
\key{preview LaTeX fragment}{C-c C-x C-l}
|
\key{preview LaTeX fragment}{C-c C-x C-l}
|
||||||
\key{expand abbreviation (cdlatex-mode)}{TAB}
|
\key{expand abbreviation (cdlatex-mode)}{TAB}
|
||||||
\key{insert/modify math symbol (cdlatex-mode)}{` / '}
|
\key{insert/modify math symbol (cdlatex-mode)}{` / '}
|
||||||
|
\key{insert citation using RefTeX}{C-c C-x [}
|
||||||
|
|
||||||
\section{Exporting and Publishing}
|
\section{Exporting and Publishing}
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
2009-03-28 Carsten Dominik <carsten.dominik@gmail.com>
|
||||||
|
|
||||||
|
* org.el (org-reftex-citation): New command.
|
||||||
|
|
||||||
2009-03-27 Carsten Dominik <carsten.dominik@gmail.com>
|
2009-03-27 Carsten Dominik <carsten.dominik@gmail.com>
|
||||||
|
|
||||||
* org-agenda.el (org-agenda-cmp-user-defined): New option.
|
* org-agenda.el (org-agenda-cmp-user-defined): New option.
|
||||||
|
|
34
lisp/org.el
34
lisp/org.el
|
@ -13516,6 +13516,9 @@ The images can be removed again with \\[org-ctrl-c-ctrl-c]."
|
||||||
(define-key org-mode-map "\C-c\C-xg" 'org-feed-update-all)
|
(define-key org-mode-map "\C-c\C-xg" 'org-feed-update-all)
|
||||||
(define-key org-mode-map "\C-c\C-xG" 'org-feed-goto-inbox)
|
(define-key org-mode-map "\C-c\C-xG" 'org-feed-goto-inbox)
|
||||||
|
|
||||||
|
(define-key org-mode-map "\C-c\C-x[" 'org-reftex-citation)
|
||||||
|
|
||||||
|
|
||||||
(when (featurep 'xemacs)
|
(when (featurep 'xemacs)
|
||||||
(org-defkey org-mode-map 'button3 'popup-mode-menu))
|
(org-defkey org-mode-map 'button3 'popup-mode-menu))
|
||||||
|
|
||||||
|
@ -15376,6 +15379,36 @@ this line is also exported in fixed-width font."
|
||||||
(goto-char (match-end 0))
|
(goto-char (match-end 0))
|
||||||
(insert org-quote-string " "))))))))
|
(insert org-quote-string " "))))))))
|
||||||
|
|
||||||
|
(defun org-reftex-citation ()
|
||||||
|
"Use reftex-citation to insert a citation into the buffer.
|
||||||
|
This looks for a line like
|
||||||
|
|
||||||
|
#+BIBLIOGRAPHY: foo plain option:-d
|
||||||
|
|
||||||
|
and derives from it that foo.bib is the bbliography file relevant
|
||||||
|
for this document. It then installs the necessary environment for RefTeX
|
||||||
|
to work in this buffer and calls `reftex-citation' to insert a citation
|
||||||
|
into the buffer.
|
||||||
|
|
||||||
|
Export of such citations to both LaTeX and HTML is handled by the contributed
|
||||||
|
package org-exp-bibtex by Taru Karttunen."
|
||||||
|
(interactive)
|
||||||
|
(let ((reftex-docstruct-symbol 'rds)
|
||||||
|
(reftex-cite-format "\\cite{%l}")
|
||||||
|
rds bib)
|
||||||
|
(save-excursion
|
||||||
|
(save-restriction
|
||||||
|
(widen)
|
||||||
|
(let ((case-fold-search t)
|
||||||
|
(re "^#\\+bibliography:[ \t]+\\([^ \t\n]+\\)"))
|
||||||
|
(if (not (save-excursion
|
||||||
|
(or (re-search-forward re nil t)
|
||||||
|
(re-search-backward re nil t))))
|
||||||
|
(error "No bibliography defined in file")
|
||||||
|
(setq bib (concat (match-string 1) ".bib")
|
||||||
|
rds (list (list 'bib bib)))))))
|
||||||
|
(call-interactively 'reftex-citation)))
|
||||||
|
|
||||||
;;;; Functions extending outline functionality
|
;;;; Functions extending outline functionality
|
||||||
|
|
||||||
(defun org-beginning-of-line (&optional arg)
|
(defun org-beginning-of-line (&optional arg)
|
||||||
|
@ -15995,7 +16028,6 @@ Still experimental, may disappear in the future."
|
||||||
;; make tree, check each match with the callback
|
;; make tree, check each match with the callback
|
||||||
(org-occur "CLOSED: +\\[\\(.*?\\)\\]" nil callback)))
|
(org-occur "CLOSED: +\\[\\(.*?\\)\\]" nil callback)))
|
||||||
|
|
||||||
|
|
||||||
;;;; Finish up
|
;;;; Finish up
|
||||||
|
|
||||||
(provide 'org)
|
(provide 'org)
|
||||||
|
|
Loading…
Reference in New Issue