Skip to content

Commit

Permalink
新增北京大学样式(#299
Browse files Browse the repository at this point in the history
  • Loading branch information
zepinglee committed Apr 26, 2024
1 parent 5a9ecb9 commit 59b19d3
Show file tree
Hide file tree
Showing 9 changed files with 1,197 additions and 103 deletions.
70 changes: 45 additions & 25 deletions 412tsinghua-university-author-date.csl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<category citation-format="author-date"/>
<category field="generic-base"/>
<summary>姓名取消全大写;专利文献增加“专利国别”。</summary>
<updated>2024-01-21T19:36:05+08:00</updated>
<updated>2024-04-26T09:40:24+08:00</updated>
<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>
<locale xml:lang="zh">
Expand Down Expand Up @@ -112,23 +112,23 @@
</if>
</choose>
<choose>
<if type="patent">
<if type="article article-journal" match="none">
<!-- 预印本和期刊文章的编号用于其他位置 -->
<group delimiter=", ">
<choose>
<!-- 专利的国别应使用 `jurisdiction`,但 Zotero 的 `Country` 字段没有映射到 CSL,所以 `publisher-place` 作为备选 -->
<if variable="jurisdiction">
<text variable="jurisdiction"/>
<if type="patent">
<text macro="patent-country"/>
</if>
<else>
<text variable="publisher-place"/>
</else>
</choose>
<text variable="number"/>
</group>
</if>
<else-if type="bill legal_case legislation regulation report standard" match="any">
<text variable="number"/>
</else-if>
</choose>
<choose>
<if type="collection manuscript personal_communication" match="any">
<!-- 档案的卷宗号 -->
<text variable="archive_location"/>
</if>
</choose>
</group>
</group>
Expand Down Expand Up @@ -166,6 +166,18 @@
</if>
</choose>
</macro>
<!-- 专利国别 -->
<macro name="patent-country">
<choose>
<!-- 专利的国别应使用 `jurisdiction`,但 Zotero 没有对应的字段,所以使用 `publisher-place` 作为备选 -->
<if variable="jurisdiction">
<text variable="jurisdiction"/>
</if>
<else>
<text variable="publisher-place"/>
</else>
</choose>
</macro>
<!-- 文献类型标识 -->
<macro name="type-id">
<choose>
Expand Down Expand Up @@ -270,23 +282,31 @@
</choose>
</group>
</macro>
<!-- 连续出版物中的析出文献的出处项(年、卷、期等信息) -->
<!-- 连续出版物中的出处项 -->
<macro name="container-periodical">
<group delimiter=": ">
<group>
<choose>
<if type="article-newspaper">
<!-- 报纸的出处项:“刊名, 出版日期(版次): 页码[引用日期]” -->
<group delimiter=", ">
<text macro="container-booklike"/>
<choose>
<if type="article-newspaper">
<text macro="issued-date"/>
</if>
</choose>
<text variable="volume"/>
<text variable="container-title"/>
<text macro="issued-date"/>
</group>
<text variable="issue" prefix="(" suffix=")"/>
</group>
<text variable="page"/>
</group>
<text variable="page" prefix="(" suffix=")"/>
</if>
<else>
<!-- 期刊、杂志的出处项:“刊名, 卷(期): 页码[引用日期]” -->
<group delimiter=": ">
<group>
<group delimiter=", ">
<text variable="container-title"/>
<text variable="volume"/>
</group>
<text variable="issue" prefix="(" suffix=")"/>
</group>
<text variable="page"/>
</group>
</else>
</choose>
<text macro="accessed-date"/>
</macro>
<!-- 版本项 -->
Expand Down
80 changes: 49 additions & 31 deletions 413tsinghua-university-numeric.csl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<category citation-format="numeric"/>
<category field="generic-base"/>
<summary>姓名取消全大写;专利文献增加“专利国别”。</summary>
<updated>2024-01-21T19:22:13+08:00</updated>
<updated>2024-04-26T09:40:23+08:00</updated>
<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>
<locale xml:lang="zh">
Expand Down Expand Up @@ -69,23 +69,23 @@
</if>
</choose>
<choose>
<if type="patent">
<if type="article article-journal" match="none">
<!-- 预印本和期刊文章的编号用于其他位置 -->
<group delimiter=", ">
<choose>
<!-- 专利的国别应使用 `jurisdiction`,但 Zotero 的 `Country` 字段没有映射到 CSL,所以 `publisher-place` 作为备选 -->
<if variable="jurisdiction">
<text variable="jurisdiction"/>
<if type="patent">
<text macro="patent-country"/>
</if>
<else>
<text variable="publisher-place"/>
</else>
</choose>
<text variable="number"/>
</group>
</if>
<else-if type="bill legal_case legislation regulation report standard" match="any">
<text variable="number"/>
</else-if>
</choose>
<choose>
<if type="collection manuscript personal_communication" match="any">
<!-- 档案的卷宗号 -->
<text variable="archive_location"/>
</if>
</choose>
</group>
</group>
Expand Down Expand Up @@ -123,6 +123,18 @@
</if>
</choose>
</macro>
<!-- 专利国别 -->
<macro name="patent-country">
<choose>
<!-- 专利的国别应使用 `jurisdiction`,但 Zotero 没有对应的字段,所以使用 `publisher-place` 作为备选 -->
<if variable="jurisdiction">
<text variable="jurisdiction"/>
</if>
<else>
<text variable="publisher-place"/>
</else>
</choose>
</macro>
<!-- 文献类型标识 -->
<macro name="type-id">
<choose>
Expand Down Expand Up @@ -227,26 +239,32 @@
</choose>
</group>
</macro>
<!-- 连续出版物中的析出文献的出处项(年、卷、期等信息) -->
<!-- 连续出版物中的出处项 -->
<macro name="container-periodical">
<group delimiter=": ">
<group>
<choose>
<if type="article-newspaper">
<!-- 报纸的出处项:“刊名, 出版日期(版次): 页码[引用日期]” -->
<group delimiter=", ">
<text macro="container-booklike"/>
<choose>
<if type="article-newspaper">
<text macro="issued-date"/>
</if>
<else>
<text variable="container-title"/>
<text macro="issued-date"/>
</group>
<text variable="page" prefix="(" suffix=")"/>
</if>
<else>
<!-- 期刊、杂志的出处项:“刊名, 年, 卷(期): 页码[引用日期]” -->
<group delimiter=": ">
<group>
<group delimiter=", ">
<text variable="container-title"/>
<text macro="issued-year"/>
</else>
</choose>
<text variable="volume"/>
<text variable="volume"/>
</group>
<text variable="issue" prefix="(" suffix=")"/>
</group>
<text variable="page"/>
</group>
<text variable="issue" prefix="(" suffix=")"/>
</group>
<text variable="page"/>
</group>
</else>
</choose>
<text macro="accessed-date"/>
</macro>
<!-- 版本项 -->
Expand Down Expand Up @@ -425,13 +443,13 @@
</layout>
</citation>
<bibliography entry-spacing="0" et-al-min="4" et-al-use-first="3" second-field-align="flush">
<layout locale="en">
<layout suffix="." locale="en">
<text variable="citation-number" prefix="[" suffix="]"/>
<text macro="entry-layout" suffix="."/>
<text macro="entry-layout"/>
</layout>
<layout>
<layout suffix=".">
<text variable="citation-number" prefix="[" suffix="]"/>
<text macro="entry-layout" suffix="."/>
<text macro="entry-layout"/>
</layout>
</bibliography>
</style>

0 comments on commit 59b19d3

Please sign in to comment.