From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Kitchin Subject: Re: org-ref: customizing bibtex key names generated by doi-utils Date: Thu, 23 Jun 2016 16:04:52 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47112) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGAs0-0003aj-0I for emacs-orgmode@gnu.org; Thu, 23 Jun 2016 16:05:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bGArv-0007fT-Qz for emacs-orgmode@gnu.org; Thu, 23 Jun 2016 16:04:58 -0400 Received: from mail-qk0-x231.google.com ([2607:f8b0:400d:c09::231]:36262) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGArv-0007fP-M4 for emacs-orgmode@gnu.org; Thu, 23 Jun 2016 16:04:55 -0400 Received: by mail-qk0-x231.google.com with SMTP id p10so121151812qke.3 for ; Thu, 23 Jun 2016 13:04:55 -0700 (PDT) In-reply-to: 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" To: David Dynerman Cc: emacs-orgmode@gnu.org You can customize the bibtex keys like this: ;; variables that control bibtex key format for auto-generation ;; I want firstauthor-year-title-words ;; this usually makes a legitimate filename to store pdfs under. (setq bibtex-autokey-year-length 4 bibtex-autokey-name-year-separator "-" bibtex-autokey-year-title-separator "-" bibtex-autokey-titleword-separator "-" bibtex-autokey-titlewords 2 bibtex-autokey-titlewords-stretch 1 bibtex-autokey-titleword-length 5) The closest you can get changing the way citations are exported is outlined here: http://kitchingroup.cheme.cmu.edu/blog/2015/12/11/Introduction-to-a-citation-processor-in-org-ref/ It is not yet an easy thing to do. David Dynerman writes: > Hi all, > > I'm interested in exporting HTML from an org document that contains references managed by org-ref. > > I'm running into the following problem. I have a reference that doi-utils added with a very long bibtex key: > > @article{saldin09_struc_isolat_biomol_obtain_from ... > > When exporting to html, org-ref uses this bibtex key as the link text in every citation. This quickly becomes unreadable, especially if you cite the above paper several times in a paragraph. > > Does anyone know how easy it would be to customize the bibtex keys generated by doi-utils, for instance by doi-add-bibtex-entry? For instance, if the above key were just the first author and year, it'd be > > @article{Saladin2009 > > which would be much more readable after HTML export. I took a 30 mins look at the relevant doi-utils functions but couldn't piece out a reasonable way to make the change. > > I guess another solution would be to modify HTML export to change citation link text, but that seems like the wrong place to make this change. > > Any advice is appreciated! > David -- 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