Skip to content

Instantly share code, notes, and snippets.

@EtaoinWu
Created May 6, 2022 13:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save EtaoinWu/1a1990e75311165c1b039ec88ef73b50 to your computer and use it in GitHub Desktop.
Save EtaoinWu/1a1990e75311165c1b039ec88ef73b50 to your computer and use it in GitHub Desktop.
CSL Style for Chinese University Politics Homework

CSL Style for Chinese Uni-Politics Homework

This CSL file is made according to Peking University's style guide for politics term paper.

Released under CC BY-SA 3.0.

<?xml version="1.0" encoding="utf-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl" version="1.0" class="note" default-locale="zh-CN" delimiter-precedes-last="always" demote-non-dropping-particle="never" initialize-with=" " name-delimiter="," names-delimiter="。" name-as-sort-order="all" sort-separator=" ">
<!-- This style was edited with the Visual CSL Editor (https://editor.citationstyles.org/visualEditor/) -->
<info>
<title>Politics Homework</title>
<title-short>Pol HW</title-short>
<id>http://www.zotero.org/styles/politics-homework</id>
<link rel="self" href="http://www.zotero.org/styles/politics-homework"/>
<author>
<name>牛耕田</name>
<email>buffalo_d@163.com</email>
</author>
<author>
<name>Etaoin</name>
<email>etaoin.wu+csl@gmail.com</email>
</author>
<category citation-format="note"/>
<category field="generic-base"/>
<summary>Politics Homework</summary>
<updated>2022-05-06T05:00:45+00: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-CN">
<terms>
<term name="anonymous">佚名</term>
<term name="edition">版</term>
<term name="page" form="short">
<single>p.</single>
<multiple>pp.</multiple>
</term>
</terms>
</locale>
<macro name="accessed-date">
<date delimiter="–" variable="accessed">
<date-part name="year"/>
<date-part name="month" form="numeric-leading-zeros"/>
<date-part name="day" form="numeric-leading-zeros"/>
</date>
</macro>
<macro name="author">
<choose>
<if variable="author">
<names variable="author">
<name delimiter="、">
<name-part name="family" text-case="uppercase"/>
<name-part name="given"/>
</name>
</names>
</if>
</choose>
</macro>
<macro name="container-author">
<names variable="container-author">
<name>
<name-part name="family" text-case="uppercase"/>
<name-part name="given"/>
</name>
</names>
</macro>
<macro name="edition">
<choose>
<if variable="edition">
<group delimiter="">
<text value="第"/>
<text variable="edition"/>
<text term="edition"/>
</group>
</if>
</choose>
</macro>
<macro name="editor">
<names variable="editor translator">
<name delimiter=",">
<name-part name="family" text-case="uppercase"/>
<name-part name="given"/>
</name>
<label form="short" strip-periods="false" prefix=""/>
</names>
</macro>
<macro name="issued-date">
<choose>
<if variable="issued">
<date variable="issued" delimiter="–">
<date-part name="year"/>
<date-part name="month" form="numeric-leading-zeros"/>
<date-part name="day" form="numeric-leading-zeros"/>
</date>
</if>
</choose>
</macro>
<macro name="issued-date-zh">
<choose>
<if variable="issued">
<date variable="issued">
<date-part name="year" suffix="年"/>
<date-part name="month" form="numeric-leading-zeros" suffix="月"/>
<date-part name="day" form="numeric-leading-zeros" suffix="日"/>
</date>
</if>
</choose>
</macro>
<macro name="issue-date-year">
<choose>
<if variable="issued">
<date date-parts="year" form="numeric" variable="issued"/>
</if>
<else>
<text term="no date" prefix="[" suffix="]"/>
</else>
</choose>
</macro>
<macro name="publishing">
<choose>
<if variable="publisher">
<group delimiter=":">
<text variable="publisher-place"/>
<group delimiter=",">
<group>
<text variable="publisher"/>
<choose>
<if type="thesis" match="any">
<text variable="genre" suffix="论文"/>
</if>
</choose>
</group>
<text macro="issue-date-year" suffix="年"/>
</group>
</group>
<text variable="page" prefix=",第" suffix="页"/>
</if>
</choose>
</macro>
<macro name="serial-information">
<group delimiter=",">
<choose>
<if type="article-newspaper">
<text macro="issued-date-zh"/>
</if>
<else>
<text macro="issue-date-year" suffix="年"/>
<text variable="volume" prefix="第" suffix="卷"/>
<text variable="issue" prefix="第" suffix="期"/>
</else>
</choose>
<text variable="page" prefix="第" suffix="页"/>
</group>
</macro>
<macro name="type-code">
<choose>
<if type="article-journal article-magazine" match="any">
<text value="J"/>
</if>
<else-if type="article-newspaper">
<text value="N"/>
</else-if>
<else-if type="bill legislation" match="any">
<text value="S"/>
</else-if>
<else-if type="book">
<text value="M"/>
</else-if>
<else-if type="chapter">
<text value="M"/>
</else-if>
<else-if type="dataset">
<text value="DS"/>
</else-if>
<else-if type="paper-conference">
<text value="C"/>
</else-if>
<else-if type="patent">
<text value="P"/>
</else-if>
<else-if type="post-weblog webpage" match="any">
<text value="EB"/>
</else-if>
<else-if type="report">
<text value="R"/>
</else-if>
<else-if type="thesis">
<text value="D"/>
</else-if>
<else>
<text value="Z"/>
</else>
</choose>
</macro>
<macro name="title">
<text variable="title" text-case="title" prefix="《" suffix="》"/>
<choose>
<if type="book">
<text variable="volume" prefix="第" suffix="卷"/>
</if>
</choose>
</macro>
<citation collapse="citation-number" after-collapse-delimiter="
">
<sort>
<key variable="citation-number" sort="ascending"/>
</sort>
<layout>
<text macro="author" suffix=":"/>
<text macro="title"/>
<choose>
<if type="book bill chapter legislation paper-conference report thesis" match="any">
<text macro="editor" prefix=","/>
<choose>
<if variable="container-title">
<text value=",载"/>
<text macro="container-author" suffix=""/>
<text variable="container-title" text-case="title" suffix=","/>
</if>
<else>
<text value=","/>
</else>
</choose>
<text macro="edition" suffix=","/>
<text macro="publishing"/>
</if>
<else-if type="article-journal article-magazine article-newspaper" match="any">
<group prefix=",">
<choose>
<if variable="container-title">
<text variable="container-title" text-case="title" prefix="载《" suffix="》"/>
<text macro="serial-information" prefix=","/>
</if>
<else>
<text macro="serial-information" suffix=","/>
<text macro="publishing"/>
</else>
</choose>
</group>
</else-if>
<else-if type="patent">
<text macro="issued-date" prefix=","/>
</else-if>
<else>
<text macro="publishing" prefix=","/>
<text macro="issued-date" prefix=","/>
<group delimiter="," prefix=",">
<text variable="URL"/>
<text variable="DOI" prefix="DOI:"/>
</group>
</else>
</choose>
<choose>
<if match="any" locator="volume">
<text variable="locator" prefix=",第" suffix="卷"/>
</if>
<else-if match="any" locator="chapter">
<text variable="locator" prefix=",第" suffix="章"/>
</else-if>
<else match="any" locator="page">
<text variable="locator" prefix=",第" suffix="页"/>
</else>
</choose>
<text value="。"/>
</layout>
</citation>
<bibliography entry-spacing="0" et-al-min="4" et-al-use-first="3" line-spacing="1" second-field-align="flush">
<layout>
<text variable="citation-number" prefix="(" suffix=")"/>
<text macro="author" suffix=":"/>
<text macro="title"/>
<choose>
<if type="book bill chapter legislation paper-conference report thesis" match="any">
<text macro="editor" prefix=","/>
<choose>
<if variable="container-title">
<text value=",载"/>
<text macro="container-author" suffix=":"/>
<text variable="container-title" text-case="title" suffix=","/>
</if>
<else>
<text value=","/>
</else>
</choose>
<text macro="edition" suffix=","/>
<text macro="publishing"/>
</if>
<else-if type="article-journal article-magazine article-newspaper" match="any">
<group prefix=",">
<choose>
<if variable="container-title">
<text variable="container-title" text-case="title" prefix="载《" suffix="》"/>
<text macro="serial-information" prefix=","/>
</if>
<else>
<text macro="serial-information" suffix=","/>
<text macro="publishing"/>
</else>
</choose>
</group>
</else-if>
<else-if type="patent">
<text macro="issued-date" prefix=","/>
</else-if>
<else>
<text macro="publishing" prefix=","/>
<text macro="issued-date" prefix=","/>
<group delimiter="," prefix=",">
<text variable="URL"/>
<text variable="DOI" prefix="DOI:"/>
</group>
</else>
</choose>
<text value="。"/>
</layout>
</bibliography>
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment