Not show number of pages in book

I created my own CSL style with online generator (http://www.somwhere.org/csl) for entry "book" and "journal article" but zotero don't generate the total number of pages. But i added the total number of pages in zotero database.

I have this version of zotero -- 2.0b7.6

fragment of CSL source:

<macro name="page">
<choose>
<if type="article-journal">
<text variable="page" font-weight="normal" font-style="normal" text-case="" vertical-align="baseline" form=""/>
</if>
<else-if type="book">
<text variable="page" font-weight="normal" font-style="normal" text-case="" vertical-align="baseline" form=""/>
</else-if>
<else>
<text variable="page" font-weight="normal" font-style="normal" text-case="" vertical-align="baseline" form=""/>
</else>
</choose>
</macro>

<bibliography>
<layout>
<choose>
<if type="article-journal">
<text macro="author-short" prefix="" suffix=""/>
<text macro="title" prefix="" suffix=" // "/>
<text macro="container-title" prefix="" suffix=". --- "/>
<text macro="year-date" prefix="" suffix=". --- "/>
<text macro="volume" prefix="" suffix=". --- "/>
<text macro="issue" prefix="%u2116 " suffix=". --- "/>
<text macro="page" prefix="%u0421. " suffix="."/>
</if>
<else-if type="book">
<text macro="author-short" prefix="" suffix="."/>
<text macro="title" prefix="" suffix=". — "/>
<text macro="publisher-place" prefix="" suffix=": "/>
<text macro="publisher" prefix="" suffix=", "/>
<text macro="year-date" prefix="" suffix=". — "/>
<text macro="page" prefix="" suffix=" с."/>
</else-if>
<else>
<text variable="citation-number" prefix="" suffix=". "/>
<text macro="author-short" prefix="" suffix=". "/>
<text macro="title" prefix="" suffix=". --- "/>
<text macro="publisher-place" prefix="" suffix=":"/>
<text macro="publisher" prefix="" suffix=","/>
<text macro="year-date" prefix="" suffix=". --- "/>
<text macro="page" prefix="" suffix=" %u0441. —"/>
  • edited January 12, 2010
    I believe you want "number-of-pages", not "page".

    (Also, for what it's worth, that CSL generator is old and produces bad output, and it's recommended that it not be used.)
  • edited January 12, 2010
    Ok. Thank you for advice. I will try it.

    UPDATE:
    I downloaded this style with "number-of-pages" value:
    http://code.google.com/p/zotero-gost-rus-bibliography/

    But it's not generated the bibliography with total number of pages in book:
    Aspects of the Theory of Syntax [Текст] / N. Chomsky. — Cambridge: M.I.T. Press, 1965.

    And it's should be:
    Aspects of the Theory of Syntax [Текст] / N. Chomsky. — Cambridge: M.I.T. Press, 1965. — 265 p.

    UPDATE #2:
    I think i should add this:

    <macro name="number-of-pages">
    <text variable="number-of-pages" font-style="normal" vertical-align="baseline" font-weight="normal" text-case="" form=""/>
    </macro>
    <bibliography>
    <if type="book">
    <text macro="author" prefix="" suffix=" "/>
    <text macro="title-text"/>
    <text macro="volume-book" prefix=": "/>
    <text macro="collection-title" prefix=": " suffix=""/>
    <text macro="author-short"/>
    <text macro="publisher-place" prefix=". — " suffix=": "/>
    <text macro="publisher" prefix="" suffix=", "/>
    <text macro="year-date" prefix="" suffix="."/>
    <text macro="number-of-pages"/>
    </if>
    </bibliography>
  • edited January 12, 2010
    I created the simple test style and i can see the total of pages in book.

    <macro name="citation-number">
    <text variable="citation-number" font-style="normal" vertical-align="baseline" />
    </macro>
    <macro name="title">
    <text variable="title" font-weight="normal" font-style="normal" text-case="" vertical-align="baseline" form=""/>
    </macro>
    <macro name="editor">
    <text variable="editor" font-weight="normal" font-style="normal" text-case="" vertical-align="baseline" form=""/>
    </macro>
    <macro name="translator">
    <text variable="translator" font-weight="normal" font-style="normal" text-case="" vertical-align="baseline" form=""/>
    </macro>
    <macro name="publisher">
    <text variable="publisher" font-weight="normal" font-style="normal" text-case="" vertical-align="baseline" form=""/>
    </macro>
    <macro name="publisher-place">
    <text variable="publisher-place" font-weight="normal" font-style="normal" text-case="" vertical-align="baseline" form=""/>
    </macro>
    <macro name="number-of-volume">
    <text variable="number-of-volume" font-weight="normal" font-style="normal" text-case="" vertical-align="baseline" form=""/>
    </macro>
    <macro name="issue">
    <text variable="issue" font-weight="normal" font-style="normal" text-case="" vertical-align="baseline" form=""/>
    </macro>
    <macro name="URL">
    <text variable="URL" font-weight="normal" font-style="normal" text-case="" vertical-align="baseline" form=""/>
    </macro>
    <macro name="DOI">
    <text variable="DOI" font-weight="normal" font-style="normal" text-case="" vertical-align="baseline" form=""/>
    </macro>
    <macro name="edition">
    <text variable="edition" font-weight="normal" font-style="normal" text-case="" vertical-align="baseline" form=""/>
    </macro>
    <macro name="collection-title">
    <text variable="collection-title" font-weight="normal" font-style="normal" text-case="" vertical-align="baseline" form=""/>
    </macro>
    <macro name="volume">
    <text variable="volume" font-weight="normal" font-style="normal" text-case="" vertical-align="baseline" form=""/>
    </macro>
    <macro name="number-of-pages">
    <text variable="number-of-pages" font-weight="normal" font-style="normal" text-case="" vertical-align="baseline" form=""/>
    </macro>
    <macro name="container-title">
    <text variable="container-title" font-weight="normal" font-style="normal" text-case="" vertical-align="baseline" form=""/>
    </macro>
    <macro name="author-short">
    <names variable="author">
    <name font-weight="normal" font-style="normal" />
    </names>
    </macro>
    <macro name="year-date">
    <date variable="issued" font-weight="normal" font-style="normal">
    <date-part name="year" form="long" suffix=""/>
    </date></macro>
    <macro name="author-citation">
    <names variable="author">
    <name form="short"/>
    </names>
    </macro>
    <citation>
    <option name="collapse" value="citation-number"/>
    <sort>
    <key variable="citation-number"/>
    </sort>
    <layout prefix="[" suffix="]" delimiter="," font-weight="normal" font-style="normal" vertical-align="baseline">
    <text variable="citation-number"/>
    </layout>
    </citation>
    <bibliography>
    <layout>
    <text macro="author-short" prefix="" suffix=""/>
    <text macro="title" prefix="" suffix=""/>
    <text macro="publisher" prefix="" suffix=""/>
    <text macro="year-date" prefix="" suffix=""/>
    <text macro="number-of-pages" prefix="" suffix=""/>
    </layout>
    </bibliography>

    Result:
    Jane Austen Annette BarnesEmmaPearson Education1999
  • I take it you mean you can't see the total of pages, right?
    I don't think "number-of-pages" works at the moment. It will in the new CSL processor.
  • Oh, it's been mapped since 2.0b7.6, apparently. The mapping exists on the trunk and will be in the next version.
  • oh right, I did remember this was discussed somewhere, but knew it didn't work yet.
    b7.7 (or 8?) will be out soon.
  • Thank you for information.

    And for version 2.0b7.6 can i generate the bibilography with total number of pages, perhaps with undocumented capabilities of zotero? :) Or it's no method to do this in this version? Or nobody before ask it ? :) then no issue to do total number of pages in a book since zotero 1.0?
  • The next release should be out by the end of the week. You can always use a dev build, but I wouldn't recommend it for something as trivial as this. You can alternatively apply the patch yourself if you can't wait.
  • no you can't do that correctly in the current version. In 1.0 that was possible only due to a wrong mapping of the # of pages field to the pages variable, which created a whole bunch of other issues.
  • This is a great project! Thank you for help! I will try to fix it by myself by adding this patch.
  • It's works! Thank you a lot, guys! I've added the patch and it's fixed now! :)
Sign In or Register to comment.