Advertisement
marichan022

zotero bibtex csl

Jun 1st, 2023
827
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 7.19 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="sort-only" default-locale="en-US">
  3.   <info>
  4.     <title>My BibTeX citation style</title>
  5.     <id>my_bibtex</id>
  6.     <!--<link href="http://www.zotero.org/styles/bibtex" rel="self"/>-->
  7.     <link href="http://www.bibtex.org/" rel="documentation"/>
  8.     <author>
  9.       <name>Markus Schaffner</name>
  10.     </author>
  11.     <contributor>
  12.       <name>Richard Karnesky</name>
  13.       <email>karnesky+zotero@gmail.com</email>
  14.       <uri>http://arc.nucapt.northwestern.edu/Richard_Karnesky</uri>
  15.     </contributor>
  16.     <contributor>
  17.       <name>Brenton M. Wiernik</name>
  18.       <email>zotero@wiernik.org</email>
  19.     </contributor>
  20.     <contributor>
  21.       <name>Marina Banov</name>
  22.       <email>mbanov@riteh.hr</email>
  23.     </contributor>
  24.     <category citation-format="label"/>
  25.     <category field="generic-base"/>
  26.     <updated>2022-05-10T18:01:57+00:00</updated>
  27.     <rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights>
  28.   </info>
  29.   <macro name="zotero2bibtexType">
  30.     <choose>
  31.       <if type="bill book graphic legal_case legislation motion_picture report song" match="any">
  32.         <text value="BOOK"/>
  33.       </if>
  34.       <else-if type="chapter" match="any">
  35.         <text value="INBOOK"/>
  36.       </else-if>
  37.       <else-if type="article article-journal article-magazine article-newspaper" match="any">
  38.         <text value="ARTICLE"/>
  39.       </else-if>
  40.       <else-if type="thesis" match="any">
  41.         <text value="PHDTESIS"/>
  42.       </else-if>
  43.       <else-if type="manuscript" match="any">
  44.         <text value="UNPUBLISHED"/>
  45.       </else-if>
  46.       <else-if type="paper-conference" match="any">
  47.         <text value="INPROCEEDINGS"/>
  48.       </else-if>
  49.       <else-if type="report" match="any">
  50.         <text value="TECHREPORT"/>
  51.       </else-if>
  52.       <else>
  53.         <text value="MISC"/>
  54.       </else>
  55.     </choose>
  56.   </macro>
  57.   <macro name="citeKey">
  58.     <group delimiter="_">
  59.       <text macro="author-short" text-case="lowercase"/>
  60.       <text macro="issued-year"/>
  61.     </group>
  62.   </macro>
  63.   <locale xml:lang="en">
  64.     <terms>
  65.       <term name="et-al"/>
  66.     </terms>
  67.   </locale>
  68.   <macro name="author-short">
  69.     <names variable="author">
  70.       <name form="short" delimiter="_" delimiter-precedes-last="always" et-al-min="1" et-al-use-first="1"/>
  71.       <substitute>
  72.         <names variable="editor"/>
  73.         <names variable="translator"/>
  74.         <choose>
  75.           <if type="bill book graphic legal_case legislation motion_picture report song" match="any">
  76.             <text variable="title" form="short"/>
  77.           </if>
  78.           <else>
  79.             <text variable="title" form="short"/>
  80.           </else>
  81.         </choose>
  82.       </substitute>
  83.     </names>
  84.   </macro>
  85.   <macro name="issued-year">
  86.     <date variable="issued">
  87.       <date-part name="year"/>
  88.     </date>
  89.   </macro>
  90.   <macro name="issued-month">
  91.     <date variable="issued">
  92.       <date-part name="month" form="short" strip-periods="true"/>
  93.     </date>
  94.   </macro>
  95.   <macro name="author">
  96.     <names variable="author">
  97.       <name sort-separator=", " delimiter=" and " delimiter-precedes-last="always" name-as-sort-order="all"/>
  98.     </names>
  99.   </macro>
  100.   <macro name="editor-translator">
  101.     <names variable="editor translator" delimiter=", ">
  102.       <name sort-separator=", " delimiter=" and " delimiter-precedes-last="always" name-as-sort-order="all"/>
  103.     </names>
  104.   </macro>
  105.   <macro name="title">
  106.     <text variable="title"/>
  107.   </macro>
  108.   <macro name="number">
  109.     <text variable="issue"/>
  110.     <text variable="number"/>
  111.   </macro>
  112.   <macro name="container-title">
  113.     <choose>
  114.       <if type="chapter paper-conference" match="any">
  115.         <text variable="container-title" prefix=" booktitle={" suffix="}"/>
  116.       </if>
  117.       <else>
  118.         <text variable="container-title" prefix=" journal={" suffix="}"/>
  119.       </else>
  120.     </choose>
  121.   </macro>
  122.   <macro name="publisher">
  123.     <choose>
  124.       <if type="thesis">
  125.         <text variable="publisher" prefix=" school={" suffix="}"/>
  126.       </if>
  127.       <else-if type="report">
  128.         <text variable="publisher" prefix=" institution={" suffix="}"/>
  129.       </else-if>
  130.       <else>
  131.         <text variable="publisher" prefix=" publisher={" suffix="}"/>
  132.       </else>
  133.     </choose>
  134.   </macro>
  135.   <macro name="pages">
  136.     <text variable="page"/>
  137.   </macro>
  138.   <macro name="edition">
  139.     <!-- This should probably be ordinal? -->
  140.     <text variable="edition"/>
  141.   </macro>
  142.   <citation et-al-min="2" et-al-use-first="1" disambiguate-add-names="true" disambiguate-add-givenname="true" disambiguate-add-year-suffix="true" givenname-disambiguation-rule="primary-name" collapse="year">
  143.     <sort>
  144.       <key macro="author"/>
  145.       <key variable="issued"/>
  146.     </sort>
  147.     <layout delimiter="_">
  148.       <text macro="citeKey"/>
  149.     </layout>
  150.   </citation>
  151.   <bibliography hanging-indent="false" entry-spacing="2">
  152.     <sort>
  153.       <key macro="author"/>
  154.       <key variable="issued"/>
  155.     </sort>
  156.     <layout>
  157.       <text macro="zotero2bibtexType" prefix=" @"/>
  158.       <group prefix="{" suffix=" }" delimiter=",&#10;">
  159.         <text macro="citeKey"/>
  160.         <text variable="publisher-place" prefix=" address={" suffix="}"/>
  161.         <!--Fix This-->
  162.         <text variable="chapter-number" prefix=" chapter={" suffix="}"/>
  163.         <!--Fix This-->
  164.         <text macro="edition" prefix=" edition={" suffix="}"/>
  165.         <text variable="genre" prefix=" type={" suffix="}"/>
  166.         <text variable="collection-title" prefix=" series={" suffix="}"/>
  167.         <text macro="title" prefix=" title={{" suffix="}}"/>
  168.         <text variable="volume" prefix=" volume={" suffix="}"/>
  169.         <text variable="license" prefix=" rights={" suffix="}"/>
  170.         <text variable="ISBN" prefix=" ISBN={" suffix="}"/>
  171.         <text variable="ISSN" prefix=" ISSN={" suffix="}"/>
  172.         <text variable="call-number" prefix=" callNumber={" suffix="}"/>
  173.         <text variable="archive_location" prefix=" archiveLocation={" suffix="}"/>
  174.         <text variable="URL" prefix=" url={" suffix="}"/>
  175.         <text variable="DOI" prefix=" DOI={" suffix="}"/>
  176.         <text variable="abstract" prefix=" abstractNote={" suffix="}"/>
  177.         <text variable="note" prefix=" note={" suffix="}"/>
  178.         <text macro="number" prefix=" number={" suffix="}"/>
  179.         <text macro="container-title"/>
  180.         <text macro="publisher"/>
  181.         <text macro="author" prefix=" author={" suffix="}"/>
  182.         <text macro="editor-translator" prefix=" editor={" suffix="}"/>
  183.         <text macro="issued-year" prefix=" year={" suffix="}"/>
  184.         <text macro="issued-month" prefix=" month={" suffix="}"/>
  185.         <text macro="pages" prefix=" pages={" suffix="}"/>
  186.         <text variable="collection-title" prefix=" collection={" suffix="}"/>
  187.         <text variable="keyword" prefix=" keywords={" suffix="}"/>
  188.         <text variable="language" prefix="language={" suffix="}"/>
  189.         <text variable="annote" prefix="annote={" suffix="}"/>
  190.       </group>
  191.     </layout>
  192.   </bibliography>
  193. </style>
  194.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement