How to add "p." to note style

edited November 2, 2018
Hi,
When I type "p. 45" type entries in the locator, Zotero stripps out the "p. " text and I only get "45".
For ex: I would like my footnotes to look like this
University of London Press c. University Tutorial Press, [1916] 2 Ch 601, p. 609.

But right now this is what I get
University of London Press c. University Tutorial Press, [1916] 2 Ch 601, 609.

This is my style https://github.com/citation-style-language/styles/blob/master/lluelles-no-ibid.csl

I'm not sure I copy past the right part, but this is the section about cases :

<macro name="case-note">
<choose>
<if variable="author">
<group delimiter=", ">
<text variable="authority"/>
<text macro="issued"/>
<text variable="number"/>
<group delimiter=" ">
<text variable="title" font-style="italic"/>
<text variable="references" prefix="(" suffix=")"/>
</group>
<group delimiter=" ">
<text variable="container-title" font-style="italic"/>
<group delimiter=".">
<text variable="volume"/>
<text variable="page"/>
</group>
</group>
</group>
<text macro="point-locators"/>
<!-- line deleted -->
</if>
<else-if variable="title" match="none">
<group delimiter=", ">
<text variable="authority"/>
<text macro="issued"/>
<text variable="number"/>
<group delimiter=" ">
<text variable="title" form="short" font-style="italic"/>
<text variable="references" prefix="(" suffix=")"/>
</group>
<group delimiter=" ">
<text variable="container-title" font-style="italic"/>
<group delimiter=".">
<text variable="volume"/>
<text variable="page"/>
</group>
</group>
</group>
<text macro="point-locators"/>
</else-if>
<else>
<text variable="title" font-style="italic" suffix=", "/>
<choose>
<if variable="container-title" match="none">
<group delimiter=" ">
<text macro="issued-year"/>
<text variable="authority"/>
<text variable="page"/>
</group>
<text macro="point-locators"/>
</if>
<else>
<text macro="issued-year" prefix=" [" suffix="] "/>
<text variable="volume" suffix=" "/>
<text variable="container-title"/>
<text variable="page" prefix=" "/>
<text macro="point-locators"/>
<text variable="authority" prefix=" (" suffix=")"/>
</else>
</choose>
<text variable="references" prefix=" (" suffix=")"/>
<!-- line deleted -->
</else>
</choose>
<text macro="URL"/>
</macro>


Does anyone knows how to help me? I have tried and tried and tried to solve this issue and it won't work






  • edited November 2, 2018
    YOu would want to look in the macro "point-locators" for the conditions (if any) under which <label variable="locator"/> is used. It's common to not print it for pages
  • edited November 2, 2018
    any suggestion?
    <macro name="point-locators">
    <choose>
    <if variable="locator" match="any">
    <choose>
    <if locator="page" type="chapter article-magazine article-newspaper" match="all">
    <label variable="locator" prefix=" " suffix="&#160;" form="long"/>
    <text variable="locator"/>
    </if>
    <else-if locator="page" type="article-journal legal_case" match="all">
    <text variable="locator" prefix=", "/>
    </else-if>
    <else-if locator="sub-verbo">
    <text variable="locator" quotes="true" prefix=", v° "/>
    </else-if>
    <else-if type="legislation bill" locator="section" match="all">
    <text variable="locator" prefix=", art.&#160;"/>
    </else-if>
    <else>
    <label variable="locator" prefix=", " suffix="&#160;" form="short"/>
    <text variable="locator"/>
    </else>
    </choose>
    </if>
    </choose>
    </macro>
  • You need to put <code>CSL code goes here</code> around CSL code
  • It kind of depends on what exactly you need, but if you replace the whole thing by
    <macro name="point-locators">
    <group delimiter="&#160;" prefix=", ">
    <label variable="locator" form="short"/>
    <text variable="locator"/>
    </group>
    </choose>
    </macro>


    You'll always get the locator/pinpoint preceded by a comma and the locator abbreviation, i.e.
    University of London Press c. University Tutorial Press, [1916] 2 Ch 601, p. 609.
    in your example above.
  • When I replace

    <else-if locator="page" type="article-journal legal_case" match="all">
    <text variable="locator" prefix=", "/>


    by

    <else-if locator="page" type="article-journal legal_case" match="none">
    <label variable="locator" form="short" prefix=", "/>


    it magically works, since I have no clue why it fixed the problem, do you think that this fix could make my zotero explode?

    I know it might be impossible to answer my question, sorry if it is, I really appreciate your help
  • What I have above is more robust, but your code will work in most instances. But e.g. it'll mean that if you want to cite a book by its chapter number, it would just print the number, without ch. in front of it.
  • You were right, problem solved with yours. Thank you so much! I really appreciate your help!!!
Sign In or Register to comment.