emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Citations, continued


From: John Kitchin
Subject: Re: [O] Citations, continued
Date: Mon, 02 Feb 2015 14:38:48 -0500

You can color your own links like this:

 (highlight-regexp "cite:\\([a-zA-Z0-9]*[-_:]*\\)*" 'dired-warning)

 (highlight-regexp "citenum:\\([a-zA-Z0-9]*[-_:]*\\)*" 'dired-marked)

The regexps are not as robust as what org uses, the plain link on my
system looks like:

"\\<\\(Autocite[*s]?\\|Cite\\(?:a\\(?:l[pt]\\|uthor\\*?\\)\\|[pst]\\)?\\|Gls\\(?:pl\\)?\\|Notecite\\|P\\(?:arencites?\\|notecite\\)\\|ResearcherID\\|Smartcites?\\|Textcites?\\|a\\(?:dd\\(?:bibresource\\|ressbook\\)\\|ns\\|ssignment\\|ttachfile\\|utocite[*s]?\\)\\|b\\(?:bdb\\|ib\\(?:entry\\|liography\\(?:style\\)?\\|tex\\)\\)\\|cite\\(?:a\\(?:l\\(?:[pt]\\*\\|[pt]\\)\\|uthor\\*?\\)\\|date\\*?\\|num\\|p\\*\\|t\\(?:\\*\\|ext\\|itle\\*?\\)\\|url\\|year\\*?\\|[*pst]\\)?\\|do\\(?:cview\\|i\\)\\|e\\(?:l\\(?:feed\\|isp\\)\\|qref\\|xercise\\)\\|f\\(?:ile\\(?:\\+\\(?:\\(?:emac\\|sy\\)s\\)\\)?\\|notecite\\|oot\\(?:cite\\(?:s\\|texts?\\)?\\|fullcite\\)\\|tp\\|u\\(?:llcite\\|nc\\)\\)\\|g\\(?:ls\\(?:pl\\)?\\|nus\\|oogle\\)\\|https?\\|i\\(?:d\\|n\\(?:dex\\|fo\\)\\|rc\\)\\|l\\(?:abel\\|ist-of-\\(?:\\(?:figur\\|tabl\\)es\\)\\)\\|m\\(?:a\\(?:c-outlook\\|ilto\\)\\|c\\|essage\\|he\\|od\\|sx\\|u4e\\)\\|n\\(?:ameref\\|ew\\(?:glossaryentry\\|s\\)\\|ihmsid\\|o\\(?:bibliography\\|\\(?:te\\)?cite\\)\\)\\|orcid\\|p\\(?:a\\(?:geref\\|rencite[*s]?\\)\\|m\\(?:c?id\\)\\|notecite\\|rint\\(?:bibliography\\|index\\)\\|ydoc\\)\\|r\\(?:ef\\|mail\\)\\|s\\(?:hell\\|kim\\|link\\|martcites?\\|olution\\|upercites?\\)\\|t\\(?:extcites?\\|q-index\\)\\|x-together-item\\):\\([^
\n()<>]+\\(?:([[:word:]0-9_]+)\\|\\([^[:punct:]
\n]\\|/\\)\\)\\)"


But, if you put that in init files, then your links will be colored the
way you want them.

Thomas S. Dye writes:

> Hi John,
>
> John Kitchin <address@hidden> writes:
>
>>> Now, I agree with you that Org mode links are not ideal for citations.
>>> Parsing the description is humbug and error-prone, and the descriptions
>>> look ungainly in the Org mode document.  I never remember to click
>>> citation links in the "right" place!  There is much room for improvement
>>> here.
>>
>> I am not sure how much better it could get. What did you have in mind? I
>> could imagine for a cite link with several citations the click action
>> could give you an ido-completing/helm selection buffer and you choose
>> what you want to do from there. In org-ref the click action is user
>> definable, so you can get what you want.
>
> I didn't mean to imply any criticism of org-ref, which I haven't used.
> I've been using my own home-grown solution for several years now, have
> grown used to its limitations, and of course now have all those legacy
> documents to support ...
>
> It would be nice to have the link syntax extended or generalized to
> indicate pre- and post-note text, so my home-grown system would use
> links compatible with org-ref, say.  I really like the direction Richard
> is heading for this reason.  If the distinctions needed for citations
> were recognized in the Org mode core, then citation links used by
> different systems might be compatible with one another.
>
> More control over how links are displayed would be nice (perhaps let the
> user pass in a function?).  When I first worked on setting up citations,
> I thought it would be great to color citation links differently from
> other links, and I still kind of like that idea.  Also, in my setup, I
> don't want to see the full link because the bibtex keys are long and the
> full links really break up the flow of the text.  Among other things,
> this means I can't be sure just looking at the buffer in its typical
> state what kind of link I'm using (footcite, parencite, textcite, etc.).
> A little indicator of some kind would be really nice here, but I haven't
> found an easy way to display one.
>
> I'm glad you like Samuel's idea about extensible syntax for links.  I
> don't know if it is practical or not, but it was one of those ideas that
> seemed right on when I first read it.
>
> All the best,
> Tom

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]