Unable to create citation that adds URL

I'm trying to create user defined style that will show the URL at the end of the reference. This should be possible because many of the items (articles) in the library have URL information with them (in the info tab).

Say for example, one of my references now show like this:

A.G. Phillips, L.M.A. Perdigao, P.H. Beton, and N.R. Champness, “Tailoring pores for guest entrapment in a unimolecular surface self-assembled hydrogen bonded network,” Chemical Communications, (2010) 46, 2775-2777.test.

and the URL field has got for this article:
http://dx.doi.org/10.1039/b926824c

I would like to put this URL at the end but I'm unable to do this. I noticed some available styles add a url at the end but it seems to only work with some type of references.

I created a *.csl file that conforms to standard. My last lines are like this:

<else>
<group delimiter=", ">
<text macro="title"/>
<text variable="container-title" font-style="italic"/>
<group delimiter=" ">
<text macro="year-date" prefix="(" suffix=")"/>
<text variable="volume" />
</group>
<text variable="page" form="short" suffix="."/>
</group>
<text variable="URL" />
<text value="test"/>
</else>
</choose>

But the URL does not appear. Why?
Any help would be appreciated.

(Note: I noticed that if I do <text variable="DOI"/> it does show the DOI it has stored)
  • check the Include URLs box in the styles tab of the Zotero preferences.
    By default (i.e. with that box unchecked), Zotero doesn't include URLs of items with page ranges given.
    if, however, your URLs mostly take the form of the one above - i.e. they are dois - I'd recommend you put just the number in the doi field - if you want the doi printed as a URL you can then simply use
    <text variable="DOI" prefix="http://dx.doi.org/"/>
  • edited August 3, 2010
    There's a tick-box at the bottom of gear menu -> Preferences -> Styles that may help. (Actually, what adamsmith said.)
  • Great. That worked.

    Regarding the doi suggestion, I had noticed that if I put
    <text variable="DOI" prefix="doi:" />
    the DOI appears as a link

    But if I do:
    <text variable="DOI" prefix="DOI:" />
    it doesn't appear as a link. Interesting.
  • what turns into a link and what doesn't is determined by your word processor, not Zotero.
  • I've been using the Zotero Reference Test pane. Unless Firefox converts it to a link I can't see any of my extensions that would do that.
  • yes, I'm pretty sure that would be Firefox then, which recognizes it as a link.
    Not 100% positive though.
Sign In or Register to comment.