Changements dans la hiérarchie pour passer à CSL-Clio

This commit is contained in:
Bastien Dumont 2020-12-21 18:01:50 +01:00
parent e7e949ec9e
commit d626246ec2
8 changed files with 108 additions and 135 deletions

View File

@ -57,11 +57,13 @@ Pour utiliser ce style dans un article rédigé dans une langue autre que le fra
<id>http://zotero.org/styles/reb-zotbyz-dev</id> <id>http://zotero.org/styles/reb-zotbyz-dev</id>
<author> <author>
<name>Bastien Dumont</name> <name>Bastien Dumont</name>
<email>bastien.dumont@univ-paris1.fr</email> <email>bastien.dumont@posteo.net
</email>
</author> </author>
<category citation-format="note"/> <category citation-format="note"/>
<category field="history"/> <category field="history"/>
<updated>2019-02-04T12:10:36+01:00</updated> <updated>2019-02-04T12:10:36+01:00</updated>
<!-- TODO : modifier la license -->
<rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights> <rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights>
</info> </info>
<locale xml:lang="fr"> <locale xml:lang="fr">
@ -99,6 +101,94 @@ Pour utiliser ce style dans un article rédigé dans une langue autre que le fra
</terms> </terms>
</locale> </locale>
<citation disambiguate-add-names="true" disambiguate-add-givenname="true" givenname-disambiguation-rule="all-names">
<layout suffix=".">
<choose>
<if position="ibid-with-locator ibid" match="any">
<text macro="ibidem"/>
</if>
<else-if position="subsequent">
<text macro="subsequentCitation"/>
</else-if>
<else>
<text macro="completeReference"/>
</else>
</choose>
</layout>
</citation>
<bibliography hanging-indent="true" et-al-min="11" et-al-use-first="7" entry-spacing="1" line-spacing="1">
<sort>
<key macro="sort-sources" names-min="3" names-use-first="3"/>
<key variable="issued" sort="descending"/>
</sort>
<layout suffix=".">
<choose>
<if variable="title-short abstract container-title-short" match="any">
<group delimiter="|">
<group delimiter=", ">
<text macro="author-subsequent"/>
<text macro="title-short"/>
</group>
<text macro="completeReference"/>
</group>
</if>
</choose>
</layout>
</bibliography>
<macro name="completeReference">
<group delimiter=" ">
<group delimiter=", ">
<choose>
<if variable="abstract">
<choose>
<if variable="title container-title" match="none">
<group delimiter=" ">
<text macro="source"/>
<text macro="collection"/>
</group>
</if>
<else>
<text macro="source"/>
</else>
</choose>
</if>
<else>
<text macro="author"/>
</else>
</choose>
<choose>
<if variable="title container-title" match="any">
<group delimiter=" ">
<text macro="title"/>
<text macro="collection"/>
</group>
</if>
</choose>
<text macro="translation"/>
<group delimiter=" ">
<text macro="pub-place"/>
<group>
<text macro="year"/>
<text variable="edition" vertical-align="sup"/>
</group>
</group>
<text macro="manuscript"/>
<choose>
<if variable="page chapter-number" type="webpage post-weblog" match="any">
<text macro="page"/>
<text macro="locator" prefix=", ici "/>
</if>
<else>
<text macro="locator"/>
</else>
</choose>
</group>
<text macro="accessed"/>
</group>
</macro>
<!-- Indique l'auteur, le titre et l'éditeur de la source, plus la cote du manuscrit si le type est "Manuscrit". --> <!-- Indique l'auteur, le titre et l'éditeur de la source, plus la cote du manuscrit si le type est "Manuscrit". -->
<macro name="source"> <macro name="source">
<group delimiter=", "> <group delimiter=", ">
@ -552,19 +642,15 @@ Pour utiliser ce style dans un article rédigé dans une langue autre que le fra
</choose> </choose>
</macro> </macro>
<macro name="ibidem">
<citation disambiguate-add-names="true" disambiguate-add-givenname="true" givenname-disambiguation-rule="all-names"> <group delimiter=", ">
<layout suffix=".">
<!-- D'abord un choix conditionnel qui décrit les cas d'ouvrages déjà cités, puis le cas normal. -->
<choose>
<if position="ibid-with-locator ibid" match="any">
<group delimiter=", ">
<text term="ibid" text-case="capitalize-first" font-style="italic"/> <text term="ibid" text-case="capitalize-first" font-style="italic"/>
<text macro="locator"/> <text macro="locator"/>
</group> </group>
</if> </macro>
<else-if position="subsequent">
<group delimiter=", "> <macro name="subsequentCitation">
<group delimiter=", ">
<text macro="author-subsequent"/> <text macro="author-subsequent"/>
<choose> <choose>
<if variable="title-short abstract container-title-short" match="any"> <if variable="title-short abstract container-title-short" match="any">
@ -594,120 +680,9 @@ Pour utiliser ce style dans un article rédigé dans une langue autre que le fra
</group> </group>
<text macro="locator"/> <text macro="locator"/>
</group> </group>
</else-if> </macro>
<else>
<group delimiter=" ">
<group delimiter=", ">
<choose>
<if variable="abstract">
<choose>
<if variable="title container-title" match="none">
<group delimiter=" ">
<text macro="source"/>
<text macro="collection"/>
</group>
</if>
<else>
<text macro="source"/>
</else>
</choose>
</if>
<else>
<text macro="author"/>
</else>
</choose>
<choose>
<if variable="title container-title" match="any">
<group delimiter=" ">
<text macro="title"/>
<text macro="collection"/>
</group>
</if>
</choose>
<text macro="translation"/>
<group delimiter=" ">
<text macro="pub-place"/>
<group>
<text macro="year"/>
<text variable="edition" vertical-align="sup"/>
</group>
</group>
<text macro="manuscript"/>
<choose>
<if variable="page chapter-number" type="webpage post-weblog" match="any">
<text macro="page"/>
<text macro="locator" prefix=", ici "/>
</if>
<else>
<text macro="locator"/>
</else>
</choose>
</group>
<text macro="accessed"/>
</group>
</else>
</choose>
</layout>
</citation>
<bibliography hanging-indent="true" et-al-min="11" et-al-use-first="7" entry-spacing="1" line-spacing="1">
<sort>
<key macro="sort-sources" names-min="3" names-use-first="3"/>
<key variable="issued" sort="descending"/>
</sort>
<layout suffix=".">
<choose>
<if variable="title-short abstract container-title-short" match="any">
<group delimiter="|">
<group delimiter=", ">
<text macro="author-subsequent"/>
<text macro="title-short"/>
</group>
<group delimiter=", ">
<choose>
<if variable="abstract">
<choose>
<if variable="title container-title" match="none">
<group delimiter=" ">
<text macro="source"/>
<text macro="collection"/>
</group>
</if>
<else>
<text macro="source"/>
</else>
</choose>
</if>
<else>
<text macro="author"/>
</else>
</choose>
<choose>
<if variable="title container-title" match="any">
<group delimiter=" ">
<text macro="title"/>
<text macro="collection"/>
</group>
</if>
</choose>
<text macro="translation"/>
<group delimiter=" ">
<text macro="pub-place"/>
<group>
<text macro="year"/>
<text variable="edition" vertical-align="sup"/>
</group>
</group>
<text macro="manuscript"/>
<group delimiter=" ">
<text macro="page"/>
<text macro="accessed"/>
</group>
</group>
</group>
</if>
</choose>
</layout>
</bibliography>
</style> </style>

View File

@ -1,20 +1,18 @@
# TODO : Ajouter les filtres nécessaires pour obtenir un bon rendu. On peut imaginer un fichier dans $(STYLESHEET_DIR) qui indique les différents filtres à appliquer : un petit script dans le make récupère ces noms de fichiers et en fait des arguments de ligne de commande commençant par --filter.
INPUT_DATA_DIR = ../Tests-Data INPUT_DATA_DIR = ../Tests-Data
BIBLIO_FILE = $(INPUT_DATA_DIR)/BIBLIO_CSL-Tests.json BIBLIO_FILE = $(INPUT_DATA_DIR)/BIBLIO_CSL-Tests.json
INPUT_FILE = $(INPUT_DATA_DIR)/CSL-Tests.md INPUT_FILE = $(INPUT_DATA_DIR)/CSL-Tests.md
STYLESHEET_DIR = _CSL-dev STYLESHEETS_DIR = ..
VALIDATION_FILE_SUFFIX = _CSL-Validation.html VALIDATION_FILE_SUFFIX = _CSL-Validation.html
OUTPUT_FILE_SUFFIX = _CSL-Tests.html OUTPUT_FILE_SUFFIX = _CSL-Tests.html
CSL_FILE_SUFFIX = .csl CSL_FILE_SUFFIX = .csl
JSON_BIBLIO_UTILITIES_DIR = /home/bdumont/Logiciels/Pandoc-utilities/FileModifiers-Pandoc JSON_BIBLIO_UTILITIES_DIR = /home/bdumont/Logiciels/Pandoc-utilities/FileModifiers-Pandoc
VALIDATION_PROV_FILE = $(PROV_PREFIX)$(JOURNAL)$(VALIDATION_FILE_SUFFIX) VALIDATION_PROV_FILE = $(PROV_PREFIX)$(JOURNAL)$(VALIDATION_FILE_SUFFIX)
CSL_FILE = ../$(JOURNAL)$(STYLESHEET_DIR)/$(JOURNAL)$(CSL_FILE_SUFFIX) CSL_FILE = $(STYLESHEETS_DIR)/$(JOURNAL)/$(JOURNAL)$(CSL_FILE_SUFFIX)
VALIDATION_FILE = ../$(JOURNAL)$(STYLESHEET_DIR)/$(JOURNAL)$(VALIDATION_FILE_SUFFIX) VALIDATION_FILE = $(STYLESHEETS_DIR)/$(JOURNAL)/$(JOURNAL)$(VALIDATION_FILE_SUFFIX)
OUTPUT_FILE = ../$(JOURNAL)$(STYLESHEET_DIR)/$(JOURNAL)$(OUTPUT_FILE_SUFFIX) OUTPUT_FILE = $(STYLESHEETS_DIR)/$(JOURNAL)/$(JOURNAL)$(OUTPUT_FILE_SUFFIX)
FILTERS_FILE_FIRST = ../$(JOURNAL)$(STYLESHEET_DIR)/$(JOURNAL)_filters-first.txt FILTERS_FILE_FIRST = $(STYLESHEETS_DIR)/$(JOURNAL)/$(JOURNAL)_filters-first.txt
FILTERS_LIST_FIRST != ./get-filters.sh $(FILTERS_FILE_FIRST) FILTERS_LIST_FIRST != ./get-filters.sh $(FILTERS_FILE_FIRST)
FILTERS_FILE_LAST = ../$(JOURNAL)$(STYLESHEET_DIR)/$(JOURNAL)_filters-last.txt FILTERS_FILE_LAST = $(STYLESHEETS_DIR)/$(JOURNAL)/$(JOURNAL)_filters-last.txt
FILTERS_LIST_LAST != ./get-filters.sh $(FILTERS_FILE_LAST) FILTERS_LIST_LAST != ./get-filters.sh $(FILTERS_FILE_LAST)
PANDOC_OPTIONS = -s \ PANDOC_OPTIONS = -s \
$(FILTERS_LIST_FIRST) \ $(FILTERS_LIST_FIRST) \
@ -60,4 +58,4 @@ install: $(VALIDATION_PROV_FILE)
mv $(VALIDATION_PROV_FILE) $(VALIDATION_FILE) mv $(VALIDATION_PROV_FILE) $(VALIDATION_FILE)
clean: clean:
rm ../*$(STYLESHEET_DIR)/*$(OUTPUT_FILE_SUFFIX) rm $(STYLESHEETS_DIR)/*/*$(OUTPUT_FILE_SUFFIX)