Blibliographie classée par type de références

edited October 15, 2019
Une doctorante de mon laboratoire a besoin de classer sa bibliographie de thèse par type de documents. J'ai ajouté un bout de code à la feuille de style "Association de Science Régionale de Langue Française (French)" en suivant les conseils trouvés ici : https://forums.zotero.org/discussion/16531/sort-bibliography-by-reference-type et ici http://blogs.eui.eu/zotero/sort-a-bibliography-by-type.html mais mon code n'est pas validé.
<macro name="type-sorting">
<choose>
"if type="book chapter article-journal thesis" match="any">
<text value="1"/>
</if>
<else-if type="report conference paper-conference" match="any">
<texte value="2"/>
</else-if>
<else type="bill legal_case webpage>
<texte value="3"/>
</else>
</choose>
</macro>

et
<bibliography et-al-min="8" et-al-use-first="6" et-al-use-last="true">
<sort>
<key macro="type-sorting"/>
<key macro="author"/>
<key macro="issued-sort" sort="descending"/>
</sort>

Quelqu'un aurait-il une idée ? merci Bénédicte
  • Bonjour Bénédicte,
    Je dirais :

    <macro name="type-sorting">
    <choose>
    <if type="book chapter article-journal thesis" match="any">
    <text value="1"/>
    </if>
    <else-if type="report paper-conference" match="any">
    <text value="2"/>
    </else-if>
    <else-if type="bill legal_case webpage" match="any">
    <text value="3"/>
    </else-if>
    </choose>
    </macro>


    Le type de document "conference" n'existe pas en CSL, je l'ai retiré.
    Si vous pensez que d'autres types de documents que ceux mentionnés dans les conditions peuvent être cités :

    <macro name="type-sorting">
    <choose>
    <if type="book chapter article-journal thesis" match="any">
    <text value="1"/>
    </if>
    <else-if type="report paper-conference" match="any">
    <text value="2"/>
    </else-if>
    <else-if type="bill legal_case webpage" match="any">
    <text value="3"/>
    </else-if>
    <else>
    <text value="4"/>
    </else>
    </choose>
    </macro>


    Bonne journée,
    Frédérique
  • Je vais tester ! Merci Frédérique
  • Bonjour Frédérique,

    C'est bon. La doctorante de mon laboratoire a testé la feuille et ça lui convient. Ouf !

    Merci pour votre aide,
    Bénédicte
  • Bonjour,
    Je me permets de m'imicer dans votre conversation car il me faut aussi classer les références bibliographiques par type mais pour ajouter de la difficulté, il faut ajouter un en-tête « Livre », « Articles de revues » (…) à chaque type.
    Une idée ?
    Merci.
  • It’s not possible to add headings like that automatically. You can do that manually after you finish writing and click the Unlink Citations button to disconnect your document from Zotero.
  • edited December 3, 2019
    @bwiernik : I understand. But it's not possible for me because I use pandoc-citeproc to generate a PDF.
    I think that could be a good idea it could be possible to tell pandoc-citeproc include a piece of database (with an option of {#refs} for example). It's possible in LaTeX with \printbibliography[keyword=xxx] for example.
    So, we could have headers between categories.

    But I know it's could be a difficult problem to resolve /o\.
  • In that case, you should use pandoc to go to TeX, then edit the TeX document to add the subheadings, then compile the TeX to PDF. You can possibly write a bash script to do these edits for you automatically. This is what would be possible given current capabilities of CSL.

This is an old discussion that has not been active in a long time. Before commenting here, you should strongly consider starting a new discussion instead. If you think the content of this discussion is still relevant, you can link to it from your new discussion.

Sign In or Register to comment.