Citation Style Formatting Issues

Dear all,

I am trying to set up my own Harvard Referencing Style and have already come very far.

The only thing I have issues with is adding a comma behind "(eds.)" in chapters from edited volumes. Currently, there is no punctuation behind "(eds)".

Here is an example:

Kelly, Mark G. E. (2013): “Foucault, Subjectivity, and Technologies of the Self.” In: Falzon, Christopher/ O’Leary, Timothy/ Sawicki, Jana (eds.) A Companion to Foucault. Malden, MA: Wiley-Blackwell, pp. 510–525.

So, I have no idea where in the source code I can make the necessary changes.

Would be great if someone can help!
  • edited October 13, 2014
    paste the code of your style to the window on gist.github.com, create public gist and post the link here. You don't need to register on github.
  • edited October 13, 2014
    find
    <names variable="editor" delimiter="/ ">

    change to
    <names variable="editor" suffix=",">

    that should do it (haven't tested, though).
  • Great. Thanks. It works!

    I also noticed, though, that when using CSL-Validation I get two errors.

    The style seems to work anyway. So is this a problem?
  • yeah, you do need an id in the style that will cause problems otherwise. Typically IDs are URIs, needn't be existing ones i.e.
    <id>http://www.zotero.org/styles/harvard-jb</id>;
    works just fine.

    The other issue likely won't matter, but you can just delete the macro in lines 55 and 56 to get rid of it.
  • Thanks a lot!

    When I insert the code into csl-calidator.js I also get the following error message:

    stdin:127:6: error: text not allowed
    required:
    after
    allowed:
    element http://purl.org/net/xbiblio/csl^names
    element http://purl.org/net/xbiblio/csl^date
    element http://purl.org/net/xbiblio/csl^label
    element http://purl.org/net/xbiblio/csl^text
    element http://purl.org/net/xbiblio/csl^number
    element http://purl.org/net/xbiblio/csl^choose
    element http://purl.org/net/xbiblio/csl^group

    error: invalid input

    Can this cause any problems?
  • line 127 reads:
    <text variable="page"/>-
    i.e. delete the dash in the end.
  • Perfect! Thank you!

    One final question:

    Ideally, I would like to have bibliographic entries of chapters in edited volumes in the way that the editors are mentioned with first name before last name.

    I. e. instead of:

    Kelly, Mark G. E. (2013): “Foucault, Subjectivity, and Technologies of the Self.” In: Falzon, Christopher/ O’Leary, Timothy/ Sawicki, Jana (eds.), A Companion to Foucault. Malden, MA: Wiley-Blackwell, pp. 510–525.

    it should look like this:

    Kelly, Mark G. E. (2013): “Foucault, Subjectivity, and Technologies of the Self.” In: Christopher Falzon/ Timothy O’Leary/ Jana Sawicki, Jana (eds.), A Companion to Foucault. Malden, MA: Wiley-Blackwell, pp. 510–525.
  • delete name-as-sort-order="all" in the editor macro
  • @randy.tortuga: For what is this style for?
  • Just one more thing:

    I realized that now in the bibliography edited volumes appear with a comma between "(eds.)" and "Date".

    For example:

    Walter Carlsnaes/ Beth A. Simmons/ Thomas Risse (eds.), (2002): Handbook of International Relations. London: Sage.

    Is it possible to remove the comma?

    @zuphilip: I modified an existing Harvard Style so that it fits to my own purposes
  • change line 40
    <text macro="editor"/>

    to
    <names variable="editor"/>
  • Thanks again!

    I just realized that there is one more error:

    When using in-text-citations that also include pages, there is missing a space character between colon and page number. E.g.:

    (Smith 2005:34).

    How can I add the space in between?
  • that's with the version of the style you have up on github? If anything I'd expect a space too much
  • I might have made minor changes to the one psted on github.

    That's why I posted my current version on github again:

    https://gist.github.com/anonymous/335bacd81bc1551837e1

    Any idea why there is a space lacking?
  • Works for me: (Legewie/DiPrete 2014: 32)
  • That's strange.

    I am using MS Word 2013. Could this be the reason?
  • Unlikely. I'd strongly suspect that either you have an old version of that style installed or the citation isn't updated in Word.

    Does this look right in a new Word document?
  • You are right. It works now. Thanks again!
  • Hello everyone,

    I would be happy for your help regarding some style issues in the above mentioned style.

    In reports, as well as newspaper articles, I need the URL to be displayed in the reference list. How can I do this?
  • edited October 1, 2015
    something like
    <macro name="access">
    <choose>
    <if type="report article-newspaper" match="any">
    <text variable="URL"/>
    </if>
    </choose>
    </macro>


    Place anywhere between the other macros (but make sure it's actually _between_ them, and then add other styling as needed.
  • edited October 2, 2015
    Perfect. Thank you.

    I also added conference papers to display their URL but realized that the format for them is not very useful.

    I would need conference papers to be displayed as

    Habermas, Jürgen (2002): "Title of the Paper", Paper presented at the ### conference, June 19–22, in Berlin, Germany.

    I saw that this issue has been raised before: https://forums.zotero.org/discussion/7450/problems-with-conference-paper-citation/, but using presentation instead of conference paper does not seem to work.
  • Change this line: <if type="report article-newspaper" match="any">to this: <if type="report article-newspaper paper-conference" match="any">
  • Thanks, but still, the problem still exists that the conference papers are not properly shown as indicated above. Any idea?
  • Sorry, I read too quickly and misunderstood what you are trying to do. The change I suggested above is a mistake - it will add the URL after conference papers, which you obviously don't want.

    Inserting something like this at line 205 will do something like what you want:<text variable="event" prefix="Paper presented at " suffix="."/>
    But your example does not follow the pattern of the style, which concludes each element in the bibliography entries with a period. To keep things looking clean and clear, you probably want to use a similar style for conference papers.

    In any case, the style needs some further work done on it. The "In: " added by the style is intended for conference proceedings volumes, but it is included even when there is no container-title variable (it should disappear in that case).

    Hope that helps!
Sign In or Register to comment.