Show URL when available

Hi,

I'm using a slightly modified version of this style:
http://www.zotero.org/styles/harvard-institut-fur-praxisforschung-de

Now I have some books and other types of documents in my zotero database which are also available online. I entered the URL in the related field but it is not shown when I insert the bibliography in Libre Office. How can I change that or what do I have to change in the style?

Thanks,

Simon
  • Zotero ignores the URL for items that have a page range by default. If you want to show URLs for those items, check the "include URL" box under Cite-->Styles in the Zotero preferences.
  • Hi Adam,

    I already tried that but it doesn't change anything:

    http://img707.imageshack.us/img707/928/74pd.png

    Thanks,

    Simon
  • In the Institut für Praxisforschung style, URLs are only printed for the Webpage item type. If you want to show them for all item types, delete
    lines 68-69
    https://github.com/citation-style-language/styles/blob/master/harvard-institut-fur-praxisforschung-de.csl#L68
    and lines 83-84
    https://github.com/citation-style-language/styles/blob/master/harvard-institut-fur-praxisforschung-de.csl#L83
    in the style (or the corresponding lines in your customized style.
  • It's working, thanks!

    But this leads me to a new question: Why is the "," before the "Abgerufen am" missing in some cases?

    Example: http://img443.imageshack.us/img443/3235/o68k.png

    Both sources are books.

    Would it be possible, to insert a line break before the "Abgerufen am"?

    Thanks!
  • I'd have to see your modified style, put it onto a public gist at gist.github.com
    Best I can tell, with the style as is I wouldn't expect a comma for either.

    You should be able to insert a line break by using
    <text macro="access" display="blocks"/>
    this will only work with the Word plugin, not with Bibliographies copied to the clipboard from Zotero, but that seems to be what you're using anyway.
  • https://gist.github.com/anonymous/7079651

    Thanks for the support!
  • Hi Adam,

    did you already had a look at my modified style? I'm a little bit confused where I should insert the code you mentioned.

    Thanks,

    Simon
  • I don't see where the comma is coming from. Make sure you're also getting that in the test pane,
    chrome://zotero/content/tools/csledit.xul
    if you do, look at the item data itself, chance there's something odd there.

    The macro="access" line should just replace the current l. 232.
  • Hi Adam,

    I changed line 232 without any effect. The comma only appears, when a book belongs to a "Reihe" (I don't know the english word, sorry). If there is no "Reihe" but an URL available Zotero adds nothing between publisher name and URL what also looks strange:

    http://img194.imageshack.us/img194/5600/jn38.png

    I think a line break would be the best solution here.

    Thanks,

    Simon
  • <text macro="access" display="block"/>
    should be outside of all groups, i.e. move it three lines down so it's between </group> and </layout>
  • When I move it there and click on "refresh" I only get the error message "curr is undefined"
  • definitely works. If it doesn't, I need to see your version of the style.
  • https://gist.github.com/anonymous/7280706
  • display="block" not display="blocks"
    (you can validate styles here: http://simonster.github.io/csl-validator.js/ )
  • It's working and even the missing "." after the publisher is visible now, thanks!
    One last thing: Sometimes there is another line break added at the end of an entry, after the URL or the doi number for example. How can I stop Zotero from doing that?

    http://img33.imageshack.us/img33/2408/f85y.png
  • not easily - that's an effect of how display="block" works.
    You can try removing display="block" on the access macro (but leaving it in the current place between </group> and </layout>) and setting it on the group that contains the entirely bibliography
    https://gist.github.com/anonymous/7280706#file-gistfile1-txt-L199
  • edited August 17, 2022
    Hi,

    I have the same problem as SimonSt back in 2013. I'm using the "Institut für Praxisforschung - Harvard (Bahr & Frackmann) (Deutsch)" Stile but when I delete the mentioned lines I get an error. Should I still delete the lines 68-69 and 83-84 or did they change over Time. Those are the Lines 66 - 87 in my version.

    <macro name="access">
    <choose>
    <if variable="DOI">
    <text variable="DOI" prefix="doi: "/>
    </if>
    <else-if type="webpage post post-weblog" match="any">
    <group delimiter=" ">
    <text term="online" prefix="[" suffix="]"/>
    <text variable="URL"/>
    <date variable="accessed" prefix="[" suffix="]">
    <date-part name="day" form="numeric-leading-zeros" suffix="."/>
    <date-part name="month" form="numeric-leading-zeros" suffix="."/>
    <date-part name="year" form="long"/>
    </date>
    </group>
    </else-if>
    </choose>
    </macro>
    <macro name="title">
    <choose>
    <if type="bill book graphic legal_case legislation motion_picture report song" match="any">
    <text variable="title" font-style="italic"/>



    Thanks for your help,

    Kim
Sign In or Register to comment.