emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Org-mode and/or org-ref citation formats
@ 2017-01-04 13:49 Gerald Wildgruber
  2017-01-04 14:28 ` John Kitchin
  0 siblings, 1 reply; 4+ messages in thread
From: Gerald Wildgruber @ 2017-01-04 13:49 UTC (permalink / raw)
  To: org mode mailing list


Hi,

I'm about to migrate my entire LaTeX document setup to Org-mode and the
one point in this process that is more complicated than every other is
the bibliography system.

In LaTeX I was using BibTeX/biblatex with lots of coomands like:

\cite[PAGENUM]{MYREF} or \footcite[PRENOTE][POSTNOTE]{MYREF}

What would be a convenient way to migrate documents containing such
references to something more native within Org-mode?

If I understood correctly there is still no real native Org-mode
citation syntax; is that true?

So the alternative would be

1) using raw inline LaTeX Code in Org-mode with RefTeX
2) using John Kitchin's org-ref package

I tried org-ref and indeed it looks very promising with lots of extra
features like mouse-over resolution of references and so on, -- but I
fail to understand the syntax of org-ref formatted links.

A simple link would be of the form "cite:MYREF" or "citep:MYREF"; but if
I want to add a page number to this reference, the syntax of the link
seems to be very different, like so: "[[citep:MYREF][PAGENUM]]" or
[[citep:MYREF][::PAGENUM]].


1) is this in fact the correct format in org-ref, where is this documented?
2) how can I insert links like that in an org-mode buffer (other than manually)?
3) do they export correctly to other formats (like docx)?
4) is there a way to convert LaTeX code to the org-ref citation format?

Thanks

Gerald

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Org-mode and/or org-ref citation formats
  2017-01-04 13:49 Org-mode and/or org-ref citation formats Gerald Wildgruber
@ 2017-01-04 14:28 ` John Kitchin
  2017-01-05 17:20   ` Gerald Wildgruber
  0 siblings, 1 reply; 4+ messages in thread
From: John Kitchin @ 2017-01-04 14:28 UTC (permalink / raw)
  To: Gerald Wildgruber; +Cc: org mode mailing list


Gerald Wildgruber writes:

> Hi,
>
> I'm about to migrate my entire LaTeX document setup to Org-mode and the
> one point in this process that is more complicated than every other is
> the bibliography system.
>
> In LaTeX I was using BibTeX/biblatex with lots of coomands like:
>
> \cite[PAGENUM]{MYREF} or \footcite[PRENOTE][POSTNOTE]{MYREF}
>
> What would be a convenient way to migrate documents containing such
> references to something more native within Org-mode?
>
> If I understood correctly there is still no real native Org-mode
> citation syntax; is that true?
>
> So the alternative would be
>
> 1) using raw inline LaTeX Code in Org-mode with RefTeX
> 2) using John Kitchin's org-ref package
>
> I tried org-ref and indeed it looks very promising with lots of extra
> features like mouse-over resolution of references and so on, -- but I
> fail to understand the syntax of org-ref formatted links.
>
> A simple link would be of the form "cite:MYREF" or "citep:MYREF"; but if
> I want to add a page number to this reference, the syntax of the link
> seems to be very different, like so: "[[citep:MYREF][PAGENUM]]" or
> [[citep:MYREF][::PAGENUM]].

That is correct. Basically it is [[cite:key][pre text::post text]]
>
>
> 1) is this in fact the correct format in org-ref, where is this
> documented?

You can run M-x org-ref-help to get the manual for org-ref. It is
described near the end in this section:

https://github.com/jkitchin/org-ref/blob/master/org-ref.org#citations


> 2) how can I insert links like that in an org-mode buffer (other than
> manually)?

You can type C-c C-l, select the link type, then the bibtex key, then
type in the description. There is no way to do it through helm-bibtex though.

> 3) do they export correctly to other formats (like docx)?

Probably not to docx. There are exports defined for ’html, ’latex,
’ascii, ’org, ’md, and ’pandoc.  HTML works pretty well, LaTeX works, 

> 4) is there a way to convert LaTeX code to the org-ref citation
> format?

Not that I know of. 

>
> Thanks
>
> Gerald


-- 
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Org-mode and/or org-ref citation formats
  2017-01-04 14:28 ` John Kitchin
@ 2017-01-05 17:20   ` Gerald Wildgruber
  2017-01-05 17:41     ` John Kitchin
  0 siblings, 1 reply; 4+ messages in thread
From: Gerald Wildgruber @ 2017-01-05 17:20 UTC (permalink / raw)
  To: John Kitchin; +Cc: org mode mailing list


On Mi, Jan 04 2017, John Kitchin <jkitchin@andrew.cmu.edu> wrote:


>> A simple link would be of the form "cite:MYREF" or "citep:MYREF"; but if
>> I want to add a page number to this reference, the syntax of the link
>> seems to be very different, like so: "[[citep:MYREF][PAGENUM]]" or
>> [[citep:MYREF][::PAGENUM]].
>
> That is correct. Basically it is [[cite:key][pre text::post text]]
>
> You can type C-c C-l, select the link type, then the bibtex key, then
> type in the description. There is no way to do it through helm-bibtex though.

Thanks! Is there a reason why refs with pre- and post-text use the
general Org-mode link syntax and insert mechanisms and not org-ref's own
more powerful format and interface (helm-bibtex); why are they handled
differently?

Gerald.


--
Dr.Gerald Wildgruber
eikones NFS Bildkritik
NCCR Iconic Criticism
Universität Basel
Rheinsprung 11
CH-4051 Basel
www.eikones.ch
T. +41 (0)61 267 18 02
F. +41 (0)61 267 18 11
---------------------
Sent with mu4e

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Org-mode and/or org-ref citation formats
  2017-01-05 17:20   ` Gerald Wildgruber
@ 2017-01-05 17:41     ` John Kitchin
  0 siblings, 0 replies; 4+ messages in thread
From: John Kitchin @ 2017-01-05 17:41 UTC (permalink / raw)
  To: Gerald Wildgruber; +Cc: org mode mailing list

[-- Attachment #1: Type: text/plain, Size: 2570 bytes --]

I don't know if it is possible to get helm-bibtex to insert links with
pre/post text in a way that doesn't get in the (i.e. my) way. I never use
pre/post text, so I want to select entries, and press enter to insert them.
There would have to be some prompt for pre and post text I think, and I
wouldn't want to press enter two more times to get empty ones.

You could write your own function for that like this:

#+BEGIN_SRC emacs-lisp
(defun my-insert (candidate)
  (insert (format "[[cite:%s]%s]"
 candidate
 (let ((pre (read-input "pre-text: "))
(post (read-input "post text: ")))
   (cond
    ;; both pre and post
    ((and (not (string= pre ""))
  (not (string= post "")))
     (format "[%s::%s]" pre post))
    ;; only pre
    ((and (not (string= pre ""))
  (string= post ""))
     (format "[%s]" pre))
    ((and (not (string= post ""))
  (string= pre ""))
     (format "[::%s]" post)))))))

(helm-add-action-to-source "pre/post insert cite" 'my-insert
  helm-source-bibtex)
#+END_SRC

we already use C-u to insert a ref link, and C-u C-u to insert a label link
on C-c ] (which inserts a citation).

John

-----------------------------------
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu


On Thu, Jan 5, 2017 at 12:20 PM, Gerald Wildgruber <
Gerald.Wildgruber@unibas.ch> wrote:

>
> On Mi, Jan 04 2017, John Kitchin <jkitchin@andrew.cmu.edu> wrote:
>
>
> >> A simple link would be of the form "cite:MYREF" or "citep:MYREF"; but if
> >> I want to add a page number to this reference, the syntax of the link
> >> seems to be very different, like so: "[[citep:MYREF][PAGENUM]]" or
> >> [[citep:MYREF][::PAGENUM]].
> >
> > That is correct. Basically it is [[cite:key][pre text::post text]]
> >
> > You can type C-c C-l, select the link type, then the bibtex key, then
> > type in the description. There is no way to do it through helm-bibtex
> though.
>
> Thanks! Is there a reason why refs with pre- and post-text use the
> general Org-mode link syntax and insert mechanisms and not org-ref's own
> more powerful format and interface (helm-bibtex); why are they handled
> differently?
>
> Gerald.
>
>
> --
> Dr.Gerald Wildgruber
> eikones NFS Bildkritik
> NCCR Iconic Criticism
> Universität Basel
> Rheinsprung 11
> CH-4051 Basel
> www.eikones.ch
> T. +41 (0)61 267 18 02
> F. +41 (0)61 267 18 11
> ---------------------
> Sent with mu4e
>

[-- Attachment #2: Type: text/html, Size: 5120 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-01-05 17:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-04 13:49 Org-mode and/or org-ref citation formats Gerald Wildgruber
2017-01-04 14:28 ` John Kitchin
2017-01-05 17:20   ` Gerald Wildgruber
2017-01-05 17:41     ` John Kitchin

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).