CSL 1.0.2 Specification¶
Principal AuthorsRintze M. Zelle, PhD,Brenton M. Wiernik,Frank G. Bennett, Jr.,Bruce D’Arcus,Denis Maier
with additional contributions fromJulien Gonzalez,Sebastian Karcher,Sylvester Keil,Cormac Relf,Lars Willighagen,and other CSL contributors.
Table of Contents
- CSL 1.0.2 Specification
- Introduction
- Namespacing
- Whitespace Handling
- File Types
- XML Declaration
- Styles - Structure
- Locale Files - Structure
- Rendering Elements
- Style Behavior
- Appendix I - Categories
- Appendix II - Terms
- Appendix III - Types
- Appendix IV - Variables
- Appendix V - Page Range Formats
- Appendix VI: Links
Introduction¶
The Citation Style Language (CSL) is an XML-based format to describe theformatting of citations, notes and bibliographies, offering:
- An open format
- Compact and robust styles
- Extensive support for style requirements
- Automatic style localization
- Infrastructure for style distribution and updating
- Thousands of freely available styles (Creative Commons BY-SA licensed)
For additional documentation, the CSL schema, styles, and locales, visit the CSLproject home,citationstyles.org.
Terminology¶
The key words MUST, MUST NOT, REQUIRED, SHALL, SHALL NOT, SHOULD, SHOULD NOT,RECOMMENDED, MAY, and OPTIONAL, are to be interpreted as described inIETF RFC 2119.
Namespacing¶
The CSLXML namespace URIis “http://purl.org/net/xbiblio/csl”. The namespace prefixcs: is usedthroughout this specification when referring to CSL elements, but is generallyomitted in favor of a default namespace declaration (set withthexmlns attribute) on the rootcs:style orcs:locale element.
Whitespace Handling¶
CSL styles are valid XML, but CSL processors MUST NOT normalize attribute valuesby trimming leading or trailing whitespace from attributes which define text thatis intended for output:
- after-collapse-delimiter
- cite-group-delimiter
- delimiter
- initialize-with
- name-delimiter
- names-delimiter
- prefix
- range-delimiter
- sort-separator
- suffix
- year-suffix-delimiter
- value
File Types¶
There are three types of CSL files: independent and dependent styles (both typesuse the “.csl” extension), and locale files (named “locales-xx-XX.xml”, where“xx-XX” is a language dialect, e.g. “en-US” for American English).
Independent Styles¶
Independent styles contain formatting instructions for citations, notes andbibliographies. While mostly self-contained, they rely on locale files for(default) localization data.
Dependent Styles¶
A dependent style is an alias for an independent style. Its contents are limitedto style metadata, and doesn’t include any formatting instructions (the soleexception is that dependent styles can specify an overriding style locale). Bylinking dependent styles for journals that share the same citation style (e.g.,“Nature Biotechnology”, “Nature Nanotechnology”, etc.) to a single independentstyle (e.g., “Nature Journals”), there is no need to duplicate formattinginstructions.
Locale Files¶
Each locale file contains a set of localization data (term translations,localized date formats, and grammar options) for a particular language dialect.
XML Declaration¶
Each style or locale should begin with an XML declaration, specifying the XMLversion and character encoding. In most cases, the declaration will be:
<?xml version="1.0" encoding="UTF-8"?>Styles - Structure¶
The Root Element -cs:style¶
The root element of styles iscs:style. In independent styles, the elementcarries the following attributes:
class- Determines whether the style uses in-text citations (value “in-text”) ornotes (“note”).
default-locale(optional)- Sets a default locale for style localization. Value must be alocalecode.
version- The CSL version of the style. Must be “1.0” for CSL 1.0-compatible styles.
In addition,cs:style may carry any of theglobal options andinheritable name options.
Of these attributes, onlyversion is required oncs:style in dependentstyles, while thedefault-locale attribute may be set to specify anoverriding style locale. The other attributes are allowed but ignored.
An example ofcs:style for an independent style, preceded by the XMLdeclaration:
<?xml version="1.0" encoding="UTF-8"?><stylexmlns="http://purl.org/net/xbiblio/csl"version="1.0"class="in-text"default-locale="fr-FR"/>
Child Elements ofcs:style¶
In independent styles, thecs:style root element has the following childelements:
cs:info- Must appear as the first child element of
cs:style. Contains themetadata describing the style (style name, ID, authors, etc.). cs:citation- Must appear once. Describes the formatting of in-text citations or notes.
cs:bibliography(optional)- May appear once. Describes the formatting of the bibliography.
cs:macro(optional)- May appear multiple times. Macros allow formatting instructions to bereused, keeping styles compact and maintainable.
cs:locale(optional)- May appear multiple times. Used to specify (overriding) localization data.
Independent styles,cs:style has only one child element,cs:info.
Info¶
Thecs:info element contains the style’s metadata. Its structure is based ontheAtom Syndication Format.
In independent styles,cs:info has the following child elements:
cs:authorandcs:contributor(optional)cs:authorandcs:contributor, used to respectively acknowledge styleauthors and contributors, may each be used multiple times. Within theseelements, the child elementcs:namemust appear once, whilecs:emailandcs:urieach may appear once. These child elements should containrespectively the name, email address and URI of the author or contributor.cs:category(optional)Styles may be assigned one or more categories.
cs:categorymay be usedonce to describe how in-text citations are rendered, using thecitation-formatattribute set to one of the following values:- “author-date” - e.g. “… (Doe, 1999)”
- “author” - e.g. “… (Doe)”
- “numeric” - e.g. “… [1]”
- “label” - e.g. “… [doe99]”
- “note” - the citation appears as a footnote or endnote
cs:categorymay be used multiple times with thefieldattribute, setto one of the discipline categories (seeAppendix I - Categories), toindicates the field(s) for which the style is relevant.cs:id- Must appear once and contain a stable, unique identifier to establish theidentity of the style. For historical reasons, existing styles may useURIs, but new styles should use a UUID to guarantee stability and uniqueness.
cs:issn/cs:eissn/cs:issnl(optional)- The
cs:issnelement may be used multiple times to indicate the ISSNidentifier(s) of the journal for which the style was written. Thecs:eissnandcs:issnlelements may each be used once for the eISSNandISSN-Lidentifiers, respectively. cs:link(optional)May be used multiple times.
cs:linkmust carry two attributes:href,set to a URI (usually a URL), andrel, whose value indicates how the URIrelates to the style. The possible values ofrel:- “self” - style URI
- “template” - URI of the style from which the current style is derived
- “documentation” - URI of style documentation
The
cs:linkelement may contain content describing the link.cs:published(optional)- May appear once. The contents of
cs:publishedmust be atimestamp,indicating when the style was initially created or made available. cs:rights(optional)- May appear once. The contents of
cs:rightsspecifies the license underwhich the style file is released. The element may carry alicenseattribute to specify the URI of the license. cs:summary(optional)- May appear once. The contents of
cs:summarygives a (short) descriptionof the style. cs:title- Must appear once. The contents of
cs:titleshould be the name of thestyle as shown to users. cs:title-short(optional)- May appear once. The contents of
cs:title-shortshould be a shortenedstyle name (e.g. “APA”). cs:updated- Must appear once. The contents of
cs:updatedmust be atimestamp that shows when thestyle was last updated.
Thecs:link,cs:rights,cs:summary,cs:title andcs:title-short elements may carry axml:lang attribute to specify thelanguage of the element’s content (the value must be anxsd:languagelocale code). Forcs:link, the attribute can also be used to indicate the language of the linktarget.
Independent styles,cs:link must be used withrel set to“independent-parent”, with the URI of the independent parent style set onhref. In addition,cs:link may not be used withrel set to“template”.
An example ofcs:info for an independent style:
<info><title>Style Title</title><id>http://www.zotero.org/styles/style-title</id><linkhref="http://www.zotero.org/styles/style-title"rel="self"/><linkhref="http://www.example.org/instructions-to-authors#references"rel="documentation"/><author><name>Author Name</name><email>name@example.org</email><uri>http://www.example.org/name</uri></author><categorycitation-format="author-date"/><categoryfield="zoology"/><updated>2011-10-29T21:01:24+00:00</updated><rightslicense="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights></info>
Citation¶
Thecs:citation element describes the formatting of citations, which consistof one or more references (“cites”) to bibliographic sources. Citations appearin the form of either in-text citations (in the author (e.g. “[Doe]”),author-date (“[Doe 1999]”), label (“[doe99]”) or number (“[1]”) format) ornotes. The requiredcs:layout child element describes what, and how,bibliographic data should be included in the citations (seeLayout).cs:layout may be preceded by acs:sort element, which canbe used to specify how cites within a citation should be sorted (seeSorting). Thecs:citation element may carry attributes forCitation-specific Options andInheritable Name Options. An example of acs:citation element:
<citation><sort><keyvariable="citation-number"/></sort><layout><textvariable="citation-number"/></layout></citation>
A note to CSL processor developers In note styles, a citation is often asentence by itself. Therefore, the first character of a citation shouldpreferably be uppercased when there is no preceding text in the note. In allother cases (e.g. when a citation is inserted into the middle of a pre-existingfootnote), the citation should be printed as is.
Bibliography¶
Thecs:bibliography element describes the formatting of bibliographies,which list one or more bibliographic sources. The requiredcs:layout childelement describes how each bibliographic entry should be formatted.cs:layout may be preceded by acs:sort element, which can be used tospecify how references within the bibliography should be sorted (seeSorting). Thecs:bibliography element may carry attributes forBibliography-specific Options andInheritable Name Options. An example ofacs:bibliography element:
<bibliography><sort><keymacro="author"/></sort><layout><groupdelimiter=". "><textmacro="author"/><textvariable="title"/></group></layout></bibliography>
Macro¶
Macros, defined withcs:macro elements, contain formatting instructions.Macros can be called withcs:text from within other macros and thecs:layout element ofcs:citation andcs:bibliography, and withcs:key from withincs:sort ofcs:citation andcs:bibliography.It is recommended to place macros after anycs:locale elements and beforethecs:citation element.
Macros are referenced by the value of the requiredname attribute oncs:macro. Thecs:macro element must contain one or morerenderingelements.
The use of macros can improve style readability, compactness andmaintainability. It is recommended to keep the contents ofcs:citation andcs:bibliography compact and agnostic of item types (e.g. books, journalarticles, etc.) by depending on macro calls. To allow for easy reuse of macrosin other styles, it is recommended to use common macro names.
In the example below, cites consist of the item title, rendered in italics whenthe item type is “book”:
<style><macroname="title"><choose><iftype="book"><textvariable="title"font-style="italic"/></if><else><textvariable="title"/></else></choose></macro><citation><layout><textmacro="title"/></layout></citation></style>
Delimiters from any ancestor delimiting element are not applied within the output of a<textmacro="..."> element (seedelimiter).
Locale¶
Localization data, by default drawn from the “locales-xx-XX.xml” locale files,may be redefined or supplemented withcs:locale elements, which should beplaced directly after thecs:info element.
The value of the optionalxml:lang attribute oncs:locale, which must beset to anxsd:language locale code, determines whichlanguages or language dialects are affected (seeLocale Fallback).
SeeTerms,Localized Date Formats andLocalized Options for furtherdetails on the use ofcs:locale.
An example ofcs:locale in a style:
<style><localexml:lang="en"><terms><termname="editortranslator"form="short"><single>ed.& trans.</single><multiple>eds.& trans.</multiple></term></terms></locale></style>
Locale Fallback¶
Locale files provide localization data for language dialects (e.g. “en-US” forAmerican English), whereas the optionalcs:locale elements in styles caneither lack thexml:lang attribute, or have it set to either a language(e.g. “en” for English) or dialect. Locale fallback is the mechanism determiningfrom which of these sources each localizable unit (a date format, localizedoption, or specific form of a term) is retrieved.
For dialects of the same language, one is designated the primary dialect. Allothers are secondaries. At the moment of writing, the available locale filesinclude:
| Primary dialect | Secondary dialect(s) |
|---|---|
| de-DE (German) | de-AT (Austria), de-CH (Switzerland) |
| en-US (English) | en-GB (UK) |
| es-ES (Spanish) | es-CL (Chile), es-MX (Mexico) |
| fr-FR (French) | fr-CA (Canada) |
| pt-PT (Portuguese) | pt-BR (Brazil) |
| zh-CN (Chinese) | zh-TW (Taiwan) |
Locale fallback is best described with an example. If the chosen output localeis “de-AT” (Austrian German), localizable units are individually drawn from thefollowing sources, in decreasing order of priority:
- In-style
cs:localeelementsxml:langset to chosen dialect, “de-AT”xml:langset to matching language, “de” (German)xml:langnot set
- Locale files
xml:langset to chosen dialect, “de-AT”xml:langset to matching primary dialect, “de-DE” (Standard German)(only applicable when the chosen locale is a secondary dialect)xml:langset to “en-US” (American English)
If the chosen output locale is a language (e.g. “de”), the (primary) dialect isused in step 1 (e.g. “de-DE”).
Fallback stops once a localizable unit has been found. For terms, this even isthe case when they are defined as empty strings (e.g.<termname="and"/> or<termname="and"></term>). Locale fallback takes precedence over fallback ofterm forms (seeTerms).
Locale Files - Structure¶
While localization data can be included in styles (seeLocale), locale filesconveniently provide sets of default localization data, consisting of terms,date formats and grammar options.
Each locale file contains localization data for a single language dialect. Thislocale code is set onthe requiredxml:lang attribute on thecs:locale root element. The samelocale code must also be used in the file name of the locale file (the “xx-XX”in “locales-xx-XX.xml”). The root element must carry theversion attribute,indicating the CSL version of the locale file (must be “1.0” for CSL1.0-compatible locale files). Locale files have the same requirements fornamespacing as styles. Thecs:locale element may containcs:info asits first child element, and requires the child elementscs:terms,cs:date andcs:style-options (these elements are described below). Anexample showing part of a locale file:
<?xml version="1.0" encoding="UTF-8"?><localexml:lang="en-US"version="1.0"xmlns="http://purl.org/net/xbiblio/csl"><style-optionspunctuation-in-quote="true"/><dateform="text"><date-partname="month"suffix=" "/><date-partname="day"suffix=", "/><date-partname="year"/></date><dateform="numeric"><date-partname="year"/><date-partname="month"form="numeric"prefix="-"range-delimiter="/"/><date-partname="day"prefix="-"range-delimiter="/"/></date><terms><termname="no date">n.d.</term><termname="et-al">et al.</term><termname="page"><single>page</single><multiple>pages</multiple></term><termname="page"form="short"><single>p.</single><multiple>pp.</multiple></term></terms></locale>
Info¶
Thecs:info element may be used to give metadata on the locale file. It hasthe following child elements:
cs:translator(optional)cs:translator, used to acknowledge locale translators, may be usedmultiple times. Within the element, the child elementcs:namemustappear once, whilecs:emailandcs:urieach may appear once. Thesechild elements should contain respectively the name, email address and URIof the translator.cs:rights(optional)- May appear once. The contents of
cs:rightsspecifies the license underwhich the locale file is released. The element may carry alicenseattribute to specify the URI of the license, and axml:langattribute tospecify the language of the element’s content (the value must be anxsd:language locale code). cs:updated(optional)- May appear once. The contents of
cs:updatedmust be atimestamp that shows when thelocale file was last updated.
Terms¶
Terms are localized strings (e.g. by using the “and” term, “Doe and Smith”automatically becomes “Doe und Smith” when the style locale is switched fromEnglish to German). Terms are defined withcs:term elements, child elementsofcs:terms. Eachcs:term element must carry aname attribute, setto one of the terms listed inAppendix II - Terms.
Terms are either directly defined in the content ofcs:term, or, in caseswhere singular and plural variants are needed (e.g. “page” and “pages”), in thecontent of the child elementscs:single andcs:multiple, respectively.
Terms may be defined for specific forms by usingcs:term with the optionalform attribute set to:
- “long” - (default), e.g. “editor” and “editors” for the “editor” term
- “short” - e.g. “ed.” and “eds.” for the term “editor”
- “verb” - e.g. “edited by” for the term “editor”
- “verb-short” - e.g. “ed.” for the term “editor”
- “symbol” - e.g. “§” and “§§” for the term “section”
If a style uses a term in a form that is undefined (even afterLocale Fallback), there is fallback to other forms:“verb-short” first falls back to “verb”, “symbol” first falls back to “short”, and “verb” and “short” both fall back to “long”.In addition, the terms “long-ordinal-01” to “long-ordinal-10” fall back to the set of ordinal suffix terms. If no locale or form fallback is available, the term is rendered as an empty string.
Thematch,gender, andgender-form attributes can be used oncs:term for the formatting of number variables rendered as ordinals (e.g.“first”, “2nd”). SeeOrdinal Suffixes andGender-specific Ordinals below.
Term content should not contain markup such as LaTeX or HTML.SuperscriptedUnicode characters can be used for superscripting.
Ordinal Suffixes¶
Number variables can be rendered withcs:number in the “ordinal” form, e.g.“2nd” (seeNumber). The ordinal suffixes (“nd” for “2nd”) are defined withterms.
The “ordinal” term defines the default ordinal suffix. This default suffix maybe overridden for certain numbers with the following terms:
- “ordinal-00” through “ordinal-09” - by default, a term in this group is usedwhen the last digit in the term name matches the last digit of the renderednumber. E.g. “ordinal-00” would match the numbers “0”, “10”, “20”, etc. Bysetting the optional
matchattribute to “last-two-digits” (“last-digit” isthe default), matches are limited to numbers where the two last digits agree(“0”, “100”, “200”, etc.). Whenmatchis set to “whole-number”, there isonly a match if the number is the same as that of the term. - “ordinal-10” through “ordinal-99” - by default, a term in this group is usedwhen the last two digits in the term name match the last two digits of therendered number. When the optional
matchattribute is set to“whole-number” (“last-two-digits” is the default), there is only a match ifthe number is the same as that of the term.
When a number has matching terms from both groups (e.g. “13” can match“ordinal-03” and “ordinal-13”), the term from the “ordinal-10” through“ordinal-99” group is used.
Ordinal terms work differently in CSL 1.0.1 and later than they did in CSL 1.0. Whenneither the style or locale file define the “ordinal” term, but do define theterms “ordinal-01” through “ordinal-04”, the original CSL 1.0 scheme is used:“ordinal-01” is used for numbers ending on a 1 (except those ending on 11),“ordinal-02” for those ending on a 2 (except those ending on 12), “ordinal-03”for those ending on a 3 (except those ending on 13) and “ordinal-04” for allother numbers.
The “ordinal” term, and “ordinal-00” through “ordinal-99” terms, behavedifferently from other terms when it comes toLocale Fallback. Whereas otherterms can be (re)defined individually, (re)defining any of the ordinal termsthroughcs:locale replaces all previously defined ordinal terms.
Long Ordinals¶
cs:number in the “long-ordinal” form, e.g. “second” (seeNumber).The long ordinal terms (e.g. “second” for “2”) are defined with the “long-ordinal-01” through “long-ordinal-10” terms.match attribute is always treated as “whole-number”.For other numbers rendered in “long-ordinal” form, the optionalmatch attribute follows the behavior described inOrdinal Suffixes (“last-two-digits” is the default).Gender-specific Ordinals¶
Some languages use gender-specific ordinals. For example, the English “1st” and“first” translate in French to “1er” and “premier” if the target nounis masculine, and “1re” and “première” if the noun is feminine.
Feminine and masculine variants of the ordinal terms (seeOrdinals) may bespecified by setting thegender-form attribute to “feminine” or “masculine”(the term withoutgender-form represents the neuter variant). There are twotypes of target nouns: a) the terms accompanying thenumber variables, and b)the month terms (seeMonths). The gender of these nouns may be specified onthe “long” (default) form of the term using thegender attribute (set to“feminine” or “masculine”). When a number variable is rendered withcs:number in the “ordinal” or “long-ordinal” form, the ordinal term of thesame gender is used, with a fallback to the neuter variant if the feminine ormasculine variant is undefined. When the “day” date-part is rendered in the“ordinal” form, the ordinal gender is matched against that of the month term.
The example below gives “1re éd.” (“1st ed.”), “1er janvier” (“January 1st”),and “3e édition” (“3rd edition”):
<?xml version="1.0" encoding="UTF-8"?><localexml:lang="fr-FR"><terms><termname="edition"gender="feminine"><single>édition</single><multiple>éditions</multiple></term><termname="edition"form="short">éd.</term><termname="month-01"gender="masculine">janvier</term><termname="ordinal">e</term><termname="ordinal-01"gender-form="feminine"match="whole-number">re</term><termname="ordinal-01"gender-form="masculine"match="whole-number">er</term></terms></locale>
Localized Date Formats¶
Two localized date formats can be defined withcs:date elements: a “numeric”(e.g. “12-15-2005”) and a “text” format (e.g. “December 15, 2005”). The formatis set oncs:date with the requiredform attribute.
A date format is constructed usingcs:date-part child elements (seeDate-part). With a requiredname attribute set to eitherday,month oryear, the order of these elements reflects the display order ofrespectively the day, month, and year. The date can be formatted withformatting andtext-case attributes on thecs:date andcs:date-part elements. Thedelimiter attribute may be set oncs:dateto specify the delimiter for thecs:date-part elements, andaffixes maybe applied to thecs:date-part elements.
Note Affixes are not allowed oncs:date when defining localized dateformats. This restriction is in place to separate locale-specific affixes (seton thecs:date-part elements) from any style-specific affixes (set on thecallingcs:date element), such as parentheses. An example of a macro callinga localized date format:
<macroname="issued"><datevariable="issued"form="numeric"prefix="("suffix=")"/></macro>
Localized Options¶
There are two localized options,limit-day-ordinals-to-day-1 andpunctuation-in-quote (seeLocale Options). These global options (whichaffect both citations and the bibliography) are set as optional attributes oncs:style-options.
Rendering Elements¶
Rendering elements specify which, and in what order, pieces of bibliographicmetadata are included in citations and bibliographies, and offer control overtheir formatting.
Layout¶
Thecs:layout rendering element is a required child element ofcs:citation andcs:bibliography. It must contain one or more of theother rendering elements described below, and may carryaffixes andformatting attributes. When used withincs:citation, thedelimiterattribute may be used to specify a delimiter for cites within a citation. Forexample, a citation like “(1, 2)” can be achieved with:
<citation><layoutprefix="("suffix=")"delimiter=", "><textvariable="citation-number"/></layout></citation>
Text¶
Thecs:text rendering element outputs text. It must carry one of thefollowing attributes to select what should be rendered:
variable- renders the text contents of a variable. Attribute value mustbe one of thestandard variables. May be accompanied by theformattribute to select the “long” (default) or “short” form of a variable (e.g.the full or short title). If the “short” form is selected but unavailable,the “long” form is rendered instead.macro- renders the text output of a macro. Attribute value must matchthe value of thenameattribute of acs:macroelement (seeMacro).term- renders a term. Attribute value must be one of the terms listed inAppendix II - Terms. May be accompanied by thepluralattribute toselect the singular (“false”, default) or plural (“true”) variant of a term,and by theformattribute to select the “long” (default), “short”,“verb”, “verb-short” or “symbol” form variant (see alsoTerms).value- renders the attribute value itself.
An example ofcs:text rendering the “title” variable:
<textvariable="title"/>
cs:text may also carryaffixes,display,formatting,quotes,strip-periods andtext-case attributes.
Date¶
Thecs:date rendering element outputs the date selected from the list ofdate variables with the requiredvariable attribute. A date can berendered in either a localized or non-localized format.
Localized date formats are selected with the optionalform attribute,which must be set to either “numeric” (for fully numeric formats, e.g.“12-15-2005”), or “text” (for formats with a non-numeric month, e.g. “December15, 2005”). Localized date formats can be customized in two ways. First, thedate-parts attribute may be used to show fewer date parts. The possiblevalues are:
- “year-month-day” - (default), renders the year, month and day
- “year-month” - renders the year and month
- “year” - renders the year
Secondly,cs:date may have one or morecs:date-part child elements (seeDate-part). The attributes set on these elements override those specified forthe localized date formats (e.g. to get abbreviated months for all locales, theform attribute on the month-cs:date-part element can be set to “short”).Thesecs:date-part elements do not affect which, or in what order, dateparts are rendered.Affixes, which are very locale-specific, are not allowedon thesecs:date-part elements.
In the absence of theform attribute,cs:date describes a self-containednon-localized date format. In this case, the date format is constructed usingcs:date-part child elements. With a requiredname attribute set toeitherday,month oryear, the order of these elements reflects thedisplay order of respectively the day, month, and year. The date can beformatted withformatting attributes on thecs:date-part elements, aswell as severalcs:date-part-specific attributes (seeDate-part). Thedelimiter attribute may be set oncs:date to specify the delimiter forthecs:date-part elements, andaffixes may be applied to thecs:date-part elements.
For both localized and non-localized dates,cs:date may carryaffixes,display,formatting andtext-case attributes.
Date-part¶
Thecs:date-part elements control how date parts are rendered. Unless theparentcs:date element calls a localized date format, they also determinewhich, and in what order, date parts appear. Acs:date-part elementdescribes the date part selected with the requiredname attribute:
- “day”
For “day”,
cs:date-partmay carry theformattribute, with values:- “numeric” - (default), e.g. “1”
- “numeric-leading-zeros” - e.g. “01”
- “ordinal” - e.g. “1st”
Some languages, such as French, only use the “ordinal” form for the firstday of the month (“1er janvier”, “2 janvier”, “3 janvier”, etc.). Suchoutput can be achieved with the “ordinal” form and use of the
limit-day-ordinals-to-day-1attribute (seeLocale Options).- “month”
For “month”,
cs:date-partmay carry thestrip-periods andformattributes. In locale files, month abbreviations (the “short” form of themonthterms) should be defined with periods if applicable (e.g. “Jan.”,“Feb.”, etc.). These periods can be removed by settingstrip-periods to“true” (“false” is the default). Theformattribute can be set to:- “long” - (default), e.g. “January”
- “short” - e.g. “Jan.”
- “numeric” - e.g. “1”
- “numeric-leading-zeros” - e.g. “01”
- “year”
For “year”,
cs:date-partmay carry theformattribute, with values:- “long” - (default), e.g. “2005”
- “short” - e.g. “05”
cs:date-part may also carryformatting,text-case andrange-delimiter (seeDate Ranges) attributes. Attributes foraffixesare allowed, unlesscs:date calls a localized date format.
Date Ranges¶
The default delimiter for dates in a date range is an en-dash (e.g. “May–July 2008”). Custom range delimiters can be set oncs:date-part elementswith the optionalrange-delimiter attribute. When a date range is rendered,the range delimiter is drawn from thecs:date-part element matching thelargest date part (“year”, “month”, or “day”) that differs between the twodates. For example,
<style><citation><layout><datevariable="issued"><date-partname="day"suffix=" "range-delimiter="-"/><date-partname="month"suffix=" "/><date-partname="year"range-delimiter="/"/></date></layout></citation></style>
would result in “1-4 May 2008”, “May–July 2008” and “May 2008/June 2009”.
AD and BC¶
The “ad” term (Anno Domini) is automatically appended to positive years of lessthan four digits (e.g. “79” becomes “79AD”). The “bc” term (Before Christ) isautomatically appended to negative years (e.g. “-2500” becomes “2500BC”).
Seasons¶
If a date includes a season instead of a month, a season term (“season-01” to“season-04”, respectively Spring, Summer, Autumn and Winter) take the place ofthe month term. E.g.,
<style><citation><layout><datevariable="issued"><date-partname="month"suffix=" "/><date-partname="year"/></date></layout></citation></style>
would result in “May 2008” and “Winter 2009”.
Approximate Dates¶
Approximate dates test “true” for theis-uncertain-date conditional (seeChoose). For example,
<style><citation><layout><choose><ifis-uncertain-date="issued"><textterm="circa"form="short"suffix=" "/></if></choose><datevariable="issued"><date-partname="year"/></date></layout></citation></style>
would result in “2005” (normal date) and “ca. 2003” (approximate date).
Number¶
Thecs:number rendering element outputs the number variable selected withthe requiredvariable attribute.Number variables are a subset of thelist ofstandard variables.
If a number variable is rendered withcs:number and only contains numericcontent (as determined by the rules foris-numeric, seeChoose), thenumber(s) are extracted. Variable content is rendered “as is” when the variablecontains any non-numeric content (e.g. “Special edition”).
During the extraction, numbers separated by a hyphen are stripped of interveningspaces (“2 - 4” becomes “2-4”). Numbers separated by a comma receive one spaceafter the comma (“2,3” and “2 , 3” become “2, 3”), while numbers separated by anampersand receive one space before and one after the ampersand (“2&3” becomes“2 & 3”).
Extracted numbers can be formatted via the optionalform attribute, withvalues:
- “numeric” - (default), e.g. “1”, “2”, “3”
- “ordinal” - e.g. “1st”, “2nd”, “3rd”. Ordinal suffixes are defined withterms (seeOrdinal Suffixes).
- “long-ordinal” - e.g. “first”, “second”, “third”. Long ordinals are definedwith theterms “long-ordinal-01” to “long-ordinal-10”, which are used forthe numbers 1 through 10. For other numbers “long-ordinal” falls back to“ordinal”.
- “roman” - e.g. “i”, “ii”, “iii”
Numbers with prefixes or suffixes are never ordinalized or rendered in romannumerals (e.g. “2E” remains “2E). Numbers without affixes are individuallytransformed (“2, 3” can become “2nd, 3rd”, “second, third” or “ii, iii”).
cs:number may carryaffixes,display,formatting andtext-caseattributes.
Names¶
Thecs:names rendering element outputs the contents of one or morenamevariables (selected with the requiredvariable attribute), each of whichcan contain multiple names (e.g. the “author” variable contains all the authornames of the cited item). If multiple variables are selected (separated bysingle spaces, see example below), each variable is independently rendered inthe order specified, with one exception: when the selection consists of “editor”and “translator”, and when the contents of these two name variables isidentical, then the contents of only one name variable is rendered. In addition,the “editortranslator” term is used if thecs:names element contains acs:label element, replacing the default “editor” and “translator” terms(e.g. resulting in “Doe (editor & translator)”). Thedelimiter attribute maybe set oncs:names to separate the names of the different name variables(e.g. the semicolon in “Doe, Smith (editors); Johnson (translator)”).
<namesvariable="editor translator"delimiter="; "><labelprefix=" ("suffix=")"/></names>
cs:names has four child elements (discussed below):cs:name,cs:et-al,cs:substitute andcs:label. Thecs:names element maycarryaffixes,display andformatting attributes.
Name¶
Thecs:name element, an optional child element ofcs:names, can be usedto describe the formatting of individual names, and the separation of nameswithin a name variable.cs:name may carry the following attributes:
and- Specifies the delimiter between the second to last and last name of thenames in a name variable. Allowed values are “text” (selects the “and” term,e.g. “Doe, Johnson and Smith”) and “symbol” (selects the ampersand, e.g.“Doe, Johnson & Smith”).
delimiter- Specifies the text string used to separate names in a name variable. Defaultis “, ” (e.g. “Doe, Smith”).
delimiter-precedes-et-alDetermines when the name delimiter or a space is used between a truncatedname list and the “et-al” (or “and others”) term in case of et-alabbreviation. Allowed values:
- “contextual” - (default), name delimiter is only used for name liststruncated to two or more names
- 1 name: “J. Doe et al.”
- 2 names: “J. Doe, S. Smith, et al.”
- “after-inverted-name” - name delimiter is only used if the preceding nameis inverted as a result of the
name-as-sort-orderattribute. E.g.withname-as-sort-orderset to “first”:- “Doe, J., et al.”
- “Doe, J., S. Smith et al.”
- “always” - name delimiter is always used
- 1 name: “J. Doe, et al.”
- 2 names: “J. Doe, S. Smith, et al.”
- “never” - name delimiter is never used
- 1 name: “J. Doe et al.”
- 2 names: “J. Doe, S. Smith et al.”
- “contextual” - (default), name delimiter is only used for name liststruncated to two or more names
delimiter-precedes-lastDetermines when the name delimiter is used to separate the second to lastand the last name in name lists (if
andis not set, the name delimiteris always used, regardless of the value ofdelimiter-precedes-last).Allowed values:- “contextual” - (default), name delimiter is only used for name listswith three or more names
- 2 names: “J. Doe and T. Williams”
- 3 names: “J. Doe, S. Smith, and T. Williams”
- “after-inverted-name” - name delimiter is only used if the preceding nameis inverted as a result of the
name-as-sort-orderattribute. E.g.withname-as-sort-orderset to “first”:- “Doe, J., and T. Williams”
- “Doe, J., S. Smith and T. Williams”
- “always” - name delimiter is always used
- 2 names: “J. Doe, and T. Williams”
- 3 names: “J. Doe, S. Smith, and T. Williams”
- “never” - name delimiter is never used
- 2 names: “J. Doe and T. Williams”
- 3 names: “J. Doe, S. Smith and T. Williams”
- “contextual” - (default), name delimiter is only used for name listswith three or more names
et-al-min/et-al-use-first- Use of these two attributes enables et-al abbreviation. If the number ofnames in a name variable matches or exceeds the number set on
et-al-min,the rendered name list is truncated after reaching the number of names setonet-al-use-first. The “et-al” (or “and others”) term is appended totruncated name lists (see alsoEt-al). By default, when a name list istruncated to a single name, the name and the “et-al” (or “and others”) termare separated by a space (e.g. “Doe et al.”). When a name list is truncatedto two or more names, the name delimiter is used (e.g. “Doe, Smith, etal.”). This behavior can be changed with thedelimiter-precedes-et-alattribute. et-al-subsequent-min/et-al-subsequent-use-first- If used, the values of these attributes replace those of respectively
et-al-minandet-al-use-firstfor subsequent cites (citesreferencing earlier cited items). et-al-use-lastWhen set to “true” (the default is “false”), name lists truncated by et-alabbreviation are followed by the name delimiter, the ellipsis character, andthe last name of the original name list. This is only possible when theoriginal name list has at least two more names than the truncated name list(for this the value of
et-al-use-first/et-al-subsequent-minmust beat least 2 less than the value ofet-al-min/et-al-subsequent-use-first). An example:A. Goffeau, B. G. Barrell, H. Bussey, R. W. Davis, B. Dujon, H.Feldmann, … S. G. Oliver
The remaining attributes, discussed below, only affect personal names. Personalnames require a “family” name-part, and may also contain “given”, “suffix”,“non-dropping-particle” and “dropping-particle” name-parts. These name-parts aredefined as:
- “family” - surname minus any particles and suffixes
- “given” - given names, either full (“John Edward”) or initialized (“J. E.”)
- “suffix” - name suffix, e.g. “Jr.” in “John Smith Jr.” and “III” in “BillGates III”
- “non-dropping-particle” - name particles that are not dropped when only thesurname is shown (“van” in the Dutch surname “van Gogh”) but which may betreated separately from the family name, e.g. for sorting
- “dropping-particle” - name particles that are dropped when only the surnameis shown (“van” in “Ludwig van Beethoven”, which becomes “Beethoven”, or“von” in “Alexander von Humboldt”, which becomes “Humboldt”)
The attributes affecting personal names:
form- Specifies whether all the name-parts of personal names should be displayed(value “long”, the default), or only the family name and thenon-dropping-particle (value “short”). A third value, “count”, returns thetotal number of names that would otherwise be rendered by the use of the
cs:nameselement (taking into account the effects of et-al abbreviationand editor/translator collapsing), which allows for advancedsorting. initialize- When set to “false” (the default is “true”), given names are no longerinitialized when “initialize-with” is set. However, the value of“initialize-with” is still added after initials present in the full name(e.g. with
initializeset to “false”, andinitialize-withset to“.”, “James T Kirk” becomes “James T. Kirk”). initialize-with- When set, given names are converted to initials. The attribute value isadded after each initial (“.” results in “J. J. Doe”). For compound givennames (e.g. “Jean-Luc”), hyphenation of the initials can be controlled withthe global
initialize-with-hyphenoption (seeHyphenation ofInitialized Names). name-as-sort-orderSpecifies that names should be displayed with the given name following thefamily name (e.g. “John Doe” becomes “Doe, John”). The attribute has twopossible values:
- “first” - attribute only has an effect on the first name of each namevariable
- “all” - attribute has an effect on all names
Note that even when
name-as-sort-orderchanges the name-part order, thedisplay order is not necessarily the same as the sorting order for namescontaining particles and suffixes (seeName-part order). Also,name-as-sort-orderonly affects names written in scripts where the givenname typically precedes the family name, such as Latin, Greek, Cyrillic andArabic. In contrast, names written in Asian scripts are always displayedwith the family name preceding the given name.sort-separator- Sets the delimiter for name-parts that have switched positions as a resultof
name-as-sort-order. The default value is “, ” (“Doe, John”). As isthe case forname-as-sort-order, this attribute only affects namesin scripts that know “given-name family-name” order.
cs:name may also carryaffixes andformatting attributes.
Name-part Order¶
The order of name-parts depends on the values of theform andname-as-sort-order attributes oncs:name, the value of thedemote-non-dropping-particle attribute oncs:style (one of theglobaloptions), and the script of the individual name. Note that the display andsorting order of name-parts often differs. An overview of the possible orders:
Display order of names in “given-name family-name” scripts (Latin, etc.)
| Conditions: |
|
|---|---|
| Order: |
|
| Example: | [Vincent] [] [van] [Gogh] [III] |
| Example: | [Alexander] [von] [] [Humboldt] [Jr.] |
| Conditions: |
|
|---|---|
| Order: |
|
| Example: | [van] [Gogh], [Vincent] [], [III] |
| Conditions: |
|
|---|---|
| Order: |
|
| Example: | [Gogh], [Vincent] [] [van], [III] |
| Conditions: |
|
|---|---|
| Order: |
|
| Example: | [van] [Gogh] |
Sorting order of names in “given-name family-name” scripts (Latin, etc.)
N.B. The sort keys are listed in descending order of priority.
| Conditions: |
|
|---|---|
| Order: |
|
| Example: | [van Gogh] [] [Vincent] [III] |
| Conditions: |
|
|---|---|
| Order: |
|
| Example: | [Gogh] [van] [Vincent] [III] |
Display and sorting order of names in “family-name given-name” scripts (Chinese, etc.)
| Conditions: |
|
|---|---|
| Order: |
|
| Example: | 毛泽东 [Mao Zedong] |
| Conditions: |
|
|---|---|
| Order: |
|
| Example: | 毛 [Mao] |
Non-personal names lack name-parts and are sorted as is, although Englisharticles (“a”, “an” and “the”) at the start of the name are stripped. Forexample, “The New York Times” sorts as “New York Times”.
Name-part Formatting¶
Thecs:name element may contain one or twocs:name-part child elementsfor name-part-specific formatting.cs:name-part must carry thenameattribute, set to either “given” or “family”.
If set to “given”,formatting andtext-case attributes oncs:name-partaffect the “given” and “dropping-particle” name-parts.affixes surround the“given” name-part, enclosing any demoted name particles for inverted names.
If set to “family”,formatting andtext-case attributes affect the“family” and “non-dropping-particle” name-parts.affixes surround the“family” name-part, enclosing any preceding name particles, as well as the“suffix” name-part for non-inverted names.
The “suffix” name-part is not subject to name-part formatting. The use ofcs:name-part elements does not influence which, or in what order, name-partsare rendered. An example, yielding names like “Jane DOE”:
<namesvariable="author"><name><name-partname="family"text-case="uppercase"/></name></names>
Et-al¶
Et-al abbreviation, controlled via theet-al-… attributes (seeName),can be further customized with the optionalcs:et-al element, which mustfollow thecs:name element (if present).
Theformatting attributes may be used oncs:et-al, for example to italicize the “et-al”term:
<namesvariable="author"><et-alfont-style="italic"/></names>
Theterm attribute may also be set, to either “et-al” (the default) or “and others”, to use either term:
<namesvariable="author"><et-alterm="and others"/></names>
Substitute¶
The optionalcs:substitute element, which must be included as the last childelement ofcs:names, adds substitution in case thename variablesspecified in the parentcs:names element are empty. The substitutions arespecified as child elements ofcs:substitute, and must consist of one ormorerendering elements (with the exception ofcs:layout). A shorthandversion ofcs:names without child elements, which inherits the attributesvalues set on thecs:name andcs:et-al child elements of the originalcs:names element, may also be used. Ifcs:substitute contains multiplechild elements, the first element to return a non-empty result is used forsubstitution. Substituted variables are suppressed in the rest of the output toprevent duplication. Substituted variables are considered empty for the purposesof determining whether to suppress an enclosingcs:group. If the variablewas rendered earlier in the citation, before the “substitute” element, it is notsuppressed. An example, where an empty “author” name variable is substituted bythe “editor” name variable, or, when no editors exist, by the “title” macro:
<macroname="author"><namesvariable="author"><substitute><namesvariable="editor"/><textmacro="title"/></substitute></names></macro>
Label incs:names¶
Acs:label element (seelabel) may optionally be included incs:names. It must appear before thecs:substitute element. The positionofcs:label relative tocs:name determines the order of the name andlabel in the rendered text. When used as a child element ofcs:names,cs:label does not carry thevariable attribute; it uses the variable(s)set on the parentcs:names element instead. A second difference is that theform attribute may also be set to “verb” or “verb-short”, so that theallowed values are:
- “long” - (default), e.g. “editor” and “editors” for the “editor” term
- “short” - e.g. “ed.” and “eds.” for the term “editor”
- “verb” - e.g. “edited by” for the term “editor”
- “verb-short” - e.g. “ed.” for the term “editor”
- “symbol” - e.g. “§” and “§§” for the term “section”
Label¶
Thecs:label rendering element outputs the term matching the variableselected with the requiredvariable attribute, which must be set to“locator”, “page”, or one of thenumber variables. The term is only renderedif the selected variable is non-empty. For example,
<groupdelimiter=" "><labelvariable="page"/><textvariable="page"/></group>
can result in “page 3” or “pages 5-7”.cs:label may carry the followingattributes:
formSelects the form of the term, with allowed values:
- “long” - (default), e.g. “page”/”pages” for the “page” term
- “short” - e.g. “p.”/”pp.” for the “page” term
- “symbol” - e.g. “§”/”§§” for the “section” term
pluralSets pluralization of the term, with allowed values:
- “contextual” - (default), the term plurality matches that of the variablecontent. Content is considered plural when it contains multiple numbers(e.g. “page 1”, “pages 1-3”, “volume 2”, “volumes 2 & 4”), or, in thecase of the “number-of-pages” and “number-of-volumes” variables, when thenumber is higher than 1 (“1 volume” and “3 volumes”).
- “always” - always use the plural form, e.g. “pages 1” and “pages 1-3”
- “never” - always use the singular form, e.g. “page 1” and “page 1-3”
cs:label may also carryaffixes,formatting,text-case andstrip-periods attributes.
Group¶
Thecs:group rendering element must contain one or morerenderingelements (with the exception ofcs:layout).cs:group may carry thedelimiter attribute to separate its child elements, as well asaffixes,display, andformatting attributes (applied to the output of the group as a whole).cs:group implicitly acts as a conditional:cs:group and its child elements aresuppressed if a) at least one rendering element incs:group calls a variable(either directly or via a macro), and b) all variables that are called areempty. This accommodates descriptivecs:text and`cs:label`elements. For example,
<layout><groupdelimiter=" "><textterm="retrieved"/><textterm="from"/><textvariable="URL"/></group></layout>
can result in “retrieved fromhttps://doi.org/10.1128/AEM.02591-07”, butdoesn’t generate output when the “URL” variable is empty.
If acs:group is nested within anothercs:group, the inner group isevaluated first: a non-empty nestedcs:group is treated as a non-emptyvariable for the puropses of determining suppression of the outercs:group.
When acs:group contains a childcs:macro, if thecs:macro isnon-empty, it is treated as a non-empty variable for the purposes of determiningsuppression of the outercs:group.
Choose¶
Thecs:choose rendering element allows for conditional rendering ofrendering elements. An example that renders the “issued” date variable whenit exists, and the “no date” term when it doesn’t:
<choose><ifvariable="issued"><datevariable="issued"form="numeric"/></if><else><textterm="no date"/></else></choose>
cs:choose requires acs:if child element, which may be followed by oneor morecs:else-if child elements, and an optional closingcs:else childelement. Thecs:if andcs:else-if elements may contain any number ofrendering elements (except forcs:layout). As an emptycs:elseelement would be superfluous,cs:else must contain at least one renderingelement.cs:if andcs:else-if elements must carry one or moreconditions, which are set with the attributes:
disambiguate- When set to “true” (the only allowed value), the element content is onlyrendered if it disambiguates two otherwise identical citations. This attemptatdisambiguation is only made when all other disambiguation methods havefailed to uniquely identify the target source.
is-numeric- Tests whether the given variables (Appendix IV - Variables) containnumeric content. Content is considered numeric if it solely consists ofnumbers. Numbers may have prefixes and suffixes (“D2”, “2b”, “L2d”), and maybe separated by a comma, hyphen, or ampersand, with or without spaces (“2,3”, “2-4”, “2 & 4”). For example, “2nd” tests “true” whereas “second” and“2nd edition” test “false”.
is-uncertain-date- Tests whether the givendate variables containapproximate dates.
locator- Tests whether the locator matches the given locator types (seeLocators).Use “sub-verbo” to test for the “sub verbo” locator type.
positionTests whether the cite position matches the given positions (terminology:citations consist of one or more cites to individual items). When calledwithin the scope of cs:bibliography,
positiontests “false”. Thepositions that can be tested are:“first”: position of cites that are the first to reference an item
“ibid”/”ibid-with-locator”/”subsequent”: cites referencing previouslycited items have the “subsequent” position. Such cites may also have the“ibid” or “ibid-with-locator” position when:
- the current cite immediately follows on another cite, within the samecitation, that references the same item
or
- the current cite is the first cite in the citation, and the previouscitation consists of a single cite referencing the same item
If either requirement is met, the presence of locators determines whichposition is assigned:
- Preceding cite does not have a locator: if the current cite has alocator, the position of the current cite is “ibid-with-locator”.Otherwise the position is “ibid”.
- Preceding cite does have a locator: if the current cite has the samelocator, the position of the current cite is “ibid”. If the locatordiffers the position is “ibid-with-locator”. If the current cite lacks alocator its only position is “subsequent”.
“near-note”: position of a cite following another cite referencing thesame item. Both cites have to be located in foot or endnotes, and thedistance between both cites may not exceed the maximum distance (measuredin number of foot or endnotes) set with the
near-note-distanceoption(seeNote Distance).
Whenever position=”ibid-with-locator” tests true, position=”ibid” also teststrue. And whenever position=”ibid” or position=”near-note” test true,position=”subsequent” also tests true.
type- Tests whether the item matches the given types (Appendix III - Types).
variable- Tests whether the default (long) forms of the given variables (Appendix IV- Variables) contain non-empty values.
With the exception ofdisambiguate, all conditions allow for multiple testvalues (separated with spaces, e.g. “book thesis”).
Thecs:if andcs:else-if elements may carry thematch attribute tocontrol the testing logic, with allowed values:
- “all” - (default), element only tests “true” when all conditions test “true”for all given test values
- “any” - element tests “true” when any condition tests “true” for any giventest value
- “none” - element only tests “true” when none of the conditions test “true”for any given test value
Delimiters from the nearest delimiters from the nearest ancestor delimiting elementare applied within the output ofcs:choose (i.e., the output of the matchingcs:if,cs:else-if, orcs:else; seedelimiter).
Style Behavior¶
Options¶
Styles may be configured withcitation-specific options, set as attributes onset oncs:citation,bibliography-specific options, set oncs:bibliography, andglobal options (these affect both citations and thebibliography), set oncs:style.Inheritable name options may be set oncs:style,cs:citation andcs:bibliography. Finally,localeoptions may be set oncs:locale elements.
Citation-specific Options¶
Disambiguation¶
A cite is ambiguous when it matches multiple bibliographic entries[1].Four methods are available to eliminate such ambiguity, which are always tried in the following order:
- Expand names (adding initials or full given names)
- Show more names
- Render the cite with the
disambiguateattribute ofcs:chooseconditions testing “true” - Add a year-suffix
Method 1 can also be used for the separate purpose of globalname disambiguation, covering both ambiguous and unambiguous cites throughout the document.
The four disambiguation methods can be individually activated with the following optional attributes:
disambiguate-add-givenname[Method (1)]If set to “true” (“false” is the default), ambiguous names (names that are identical in their “short” or initialized “long” form, but differ when initials are added or the full given name is shown) are expanded.Name expansion can be configured with
givenname-disambiguation-rule.An example of cite disambiguation:Original ambiguous cites Disambiguated cites (Simpson 2005; Simpson 2005) (H. Simpson 2005; B. Simpson 2005) (Doe 1950; Doe 1950) (John Doe 1950; Jane Doe 1950) givenname-disambiguation-ruleSpecifies(a) whether the purpose of name expansion is limited to disambiguating cites, or has the additional goal of disambiguating names (only in the latter case are ambiguous names in unambiguous cites expanded, e.g. from “(Doe 1950; Doe 2000)” to “(Jane Doe 1950; John Doe 2000)”),(b) whether name expansion targets all, or just the first name of each cite, and(c) the method by which each name is expanded.
- Expansion of Individual Names
The steps for expanding individual names are:
If
initialize-withis set andinitializehas its default value of “true”, then:(a) Initials can be shown by rendering the name with a
formvalue of “long” instead of “short” (e.g. “Doe” becomes “J. Doe”).(b) Full given names can be shown instead of initials by rendering the name with
initializeset to “false” (e.g. “J. Doe” becomes “John Doe”).If
initialize-withisnot set, full given names can be shown by rendering the name with aformvalue of “long” instead of “short” (e.g. “Doe” becomes “John Doe”).
- Given Name Disambiguation Rules
Allowed values of
givenname-disambiguation-rule:- “all-names”
- Name expansion has the dual purpose of disambiguating cites and names.All rendered ambiguous names, in both ambiguous and unambiguous cites, are subject to disambiguation.Each name is progressively transformed until it is disambiguated.Names that cannot be disambiguated remain in their original form.
- “all-names-with-initials”
- As “all-names”, but name expansion is limited to showing initials (see step 1(a) above).No disambiguation attempt is made when
initialize-withis not set or wheninitializeis set to “false”. - “primary-name”
- As “all-names”, but disambiguation is limited to the first name of each cite.
- “primary-name-with-initials”
- As “all-names-with-initials”, but disambiguation is limited to the first name of each cite.
- “by-cite”
- Default. As “all-names”, but the goal of name expansion is limited to disambiguating cites.Only ambiguous names in ambiguous cites are affected, and disambiguation stops after the first name that eliminates cite ambiguity.
disambiguate-add-names[Method (2)]- If set to “true” (“false” is the default), names that would otherwise be hidden as a result of et-al abbreviation are added one by one to all members of a set of ambiguous cites, until no more cites in the set can be disambiguated by adding names.
If bothdisambiguate-add-givenname anddisambiguate-add-names are set to “true”, given name expansion is applied to rendered names first.If cites cannot be (fully) disambiguated by expanding the rendered names, then the names still hidden as a result of et-al abbreviation are added one by one to all members of a set of ambiguous cites.Added names are expanded if doing so would disambiguate the ambiguous cites.This process contines until no more cites in the set can be disambiguated by adding expanded names.
In the description of disambiguation methods (1) and (2) above, we assumed that each (disambiguated) cite has an unambiguous link to its bibliographic entry.To assure that each cite does in fact uniquely identify its entry in the bibliography, detail that distinguishes cites (such as names, initials, and full given names) must be shown in the corresponding bibliography entries.If this is not the case, disambiguation methods (1) and (2) also act on all members of a set of ambiguously cited bibliographic entries, until no more entries in the set can be unambiguously cited by adding (expanded) names.Each method only takes effect on the involved bibliographic entries after it has been used to disambiguate cites.
disambiguatecondition [Method (3)]- A disambiguation attempt can also be made by rendering ambiguous cites with the
disambiguatecondition testing “true” (seeChoose). disambiguate-add-year-suffix[Method (4)]- If set to “true” (“false” is the default), an alphabetic year-suffix is added to ambiguous cites (e.g. “Doe 2007, Doe 2007” becomes “Doe 2007a, Doe 2007b”) and to their corresponding bibliographic entries.This final disambiguation method is always successful.The assignment of year-suffixes follows the order of the bibliographies entries, and additional letters are used once “z” is reached (“z”, “aa”, “ab”, …, “az”, “ba”, etc.).By default, the year-suffix is appended the first year rendered through
cs:datein the cite and in the bibliographic entry,but its location can be controlled by explicitly rendering the “year-suffix” variable usingcs:text.If “year-suffix” is rendered throughcs:textin the scope ofcs:citation, it is suppressed forcs:bibliography, unless it is also rendered throughcs:textin the scope ofcs:bibliography, and vice versa.
| [1] | Including uncited entries in the bibliography can make cites in the document ambiguous.To make sure such cites are disambiguated, the CSL processor should include (invisible) cites for such uncited bibliographic entries in the disambiguation process. |
Cite Grouping¶
With cite grouping, cites in in-text citations with identical rendered names aregrouped together, e.g. the year-sorted “(Doe 1999; Smith 2002; Doe 2006; Doe etal. 2007)” becomes “(Doe 1999; Doe 2006; Smith 2002; Doe et al. 2007)”. Thecomparison is limited to the output of the (first)cs:names element, butincludes output rendered throughcs:substitute. Cite grouping takes placesafter cite sorting and disambiguation. Grouped cites maintain their relativeorder, and are moved to the original location of the first cite of the group.
Cite grouping can be activated by setting thecite-group-delimiter attributeor thecollapse attributes oncs:citation (see alsoCite Collapsing).
cite-group-delimiter- Activates cite grouping and specifies the delimiter for cites within a citegroup. Defaults to “, “. E.g. with
delimiteroncs:layoutincs:citationset to “; “,collapseset to “year”, andcite-group-delimiterset to “,”, citations look like “(Doe 1999,2001;Jones 2000)”.
Cite Collapsing¶
Cite groups (author and author-date styles), and numeric cite ranges (numericstyles) can be collapsed through the use of thecollapse attribute.Delimiters for collapsed cite groups can be customized with theyear-suffix-delimiter andafter-collapse-delimiter attributes:
collapseActivates cite grouping and collapsing. Allowed values:
- “citation-number” - collapses ranges of cite numbers (rendered throughthe “citation-number” variable) in citations for “numeric” styles (e.g.from “[1, 2, 3, 5]” to “[1–3, 5]”). Only increasing ranges collapse,e.g. “[3, 2, 1]” will not collapse (to see how to sort cites by“citation-number”, seeSorting).
- “year” - collapses cite groups by suppressing the output of the
cs:nameselement for subsequent cites in the group, e.g. “(Doe 2000,Doe 2001)” becomes “(Doe 2000, 2001)”. - “year-suffix” - collapses as “year”, but also suppresses repeating yearswithin the cite group, e.g. “(Doe 2000a, b)” instead of “(Doe 2000a,2000b)”.
- “year-suffix-ranged” - collapses as “year-suffix”, but also collapsesranges of year-suffixes, e.g. “(Doe 2000a–c,e)” instead of “(Doe2000a, b, c, e)”.
“year-suffix” and “year-suffix-ranged” fall back to “year” when
disambiguate-add-year-suffixis “false” (seeDisambiguation), or whena cite has a locator (e.g. “(Doe 2000a-c, 2000d, p. 5, 2000e,f)”, where thecite for “Doe 2000d” has a locator that prevents the cite from furthercollapsing).year-suffix-delimiter- Specifies the delimiter for year-suffixes. Defaults to the delimiter set on
cs:layoutincs:citation. E.g. withcollapseset to“year-suffix”,delimiteroncs:layoutincs:citationset to “;“, andyear-suffix-delimiterset to “,”, citations look like “(Doe1999a,b; Jones 2000)”. after-collapse-delimiter- Specifies the cite delimiter to be usedafter a collapsed cite group.Defaults to the delimiter set on
cs:layoutincs:citation. E.g. withcollapseset to “year”,delimiteroncs:layoutincs:citationset to “, “, andafter-collapse-delimiterset to “; “,citations look like “(Doe 1999, 2001; Jones 2000, Brown 2001)”.
Note Distance¶
near-note-distance- A cite tests true for the “near-note” position (seeChoose) when apreceding note exists that a) refers to the same item and b) does notprecede the current note by more footnotes or endnotes than the value of
near-note-distance(default value is “5”).
Bibliography-specific Options¶
Whitespace¶
hanging-indent- If set to “true” (“false” is the default), bibliographic entries arerendered with hanging-indents.
second-field-alignIf set, subsequent lines of bibliographic entries are aligned along thesecond field. With “flush”, the first field is flush with the margin. With“margin”, the first field is put in the margin, and subsequent lines arealigned with the margin. An example, where the first field is
<textvariable="citation-number"suffix="."/>:9.Adams,D.(2002).TheUltimateHitchhiker's Guide to theGalaxy(1sted.).10.Asimov,I.(1951).Foundation.
line-spacing- Specifies vertical line distance. Defaults to “1” (single-spacing), and canbe set to any positive integer to specify a multiple of the standard unit ofline height (e.g. “2” for double-spacing).
entry-spacing- Specifies vertical distance between bibliographic entries. By default (witha value of “1”), entries are separated by a single additional line-height(as set by the line-spacing attribute). Can be set to any non-negativeinteger to specify a multiple of this amount.
Reference Grouping¶
subsequent-author-substitute- If set, the value of this attribute replaces names in a bibliographic entrythat also occur in the preceding entry. The exact method of substitutiondepends on the value of the
subsequent-author-substitute-ruleattribute.Substitution is limited to the names of the firstcs:nameselementrendered. subsequent-author-substitute-ruleSpecifies when and how names are substituted as a result of
subsequent-author-substitute. Allowed values:- “complete-all” - (default), when all names of the name variablematch those in the preceding bibliographic entry, the value of
subsequent-author-substitutereplaces the entire name list (includingpunctuation and terms like “et al” and “and”), except for the affixes seton thecs:nameselement. - “complete-each” - requires a complete match like “complete-all”, but nowthe value of
subsequent-author-substitutesubstitutes for eachrendered name. - “partial-each” - when one or more rendered names in the name variablematch those in the preceding bibliographic entry, the value of
subsequent-author-substitutesubstitutes for each matching name.Matching starts with the first name, and continues up to the firstmismatch. - “partial-first” - as “partial-each”, but substitution is limited to thefirst name of the name variable.
For example, take the following bibliographic entries:
Doe.1999.Doe.2000.Doe,Johnson&Williams.2001.Doe&Smith.2002.Doe,Stevens&Miller.2003.Doe,Stevens&Miller.2004.Doe,Williamsetal.2005.Doe,Williamsetal.2006.
With
subsequent-author-substituteset to “—”, andsubsequent-author-substitute-ruleset to “complete-all”, this becomes:Doe.1999.---.2000.Doe,Johnson&Williams.2001.Doe&Smith.2002.Doe,Stevens&Miller.2003.---.2004.Doe,Williamsetal.2005.---.2005.
With
subsequent-author-substitute-ruleset to “complete-each”, thisbecomes:Doe.1999.---.2000.Doe,Johnson&Williams.2001.Doe&Smith.2002.Doe,Stevens&Miller.2003.---,---&---.2004.Doe,Williamsetal.2005.---,---etal.2006.
With
subsequent-author-substitute-ruleset to “partial-each”, thisbecomes:Doe.1999.---.2000.Doe,Johnson&Williams.2001.---&Smith.2002.Doe,Stevens&Miller.2003.---,---&---.2004.Doe,Williamsetal.2005.---,---etal.2005.
With
subsequent-author-substitute-ruleset to “partial-first”, thisbecomes:Doe.1999.---.2000.Doe,Johnson&Williams.2001.---&Smith.2002.Doe,Stevens&Miller.2003.---,Stevens&Miller.2004.Doe,Williamsetal.2005.---,Williamsetal.2005.
- “complete-all” - (default), when all names of the name variablematch those in the preceding bibliographic entry, the value of
Global Options¶
Hyphenation of Initialized Names¶
initialize-with-hyphen- Specifies whether compound given names (e.g. “Jean-Luc”) should beinitialized with a hyphen (“J.-L.”, value “true”, default) or without(“J. L.”, value “false”).
Page Ranges¶
page-range-format- Activates expansion or collapsing of page ranges: “chicago” (“321–28”),“expanded” (e.g. “321–328”), “minimal” (“321–8”), or “minimal-two”(“321–28”) (see alsoAppendix V - Page Range Formats). Delimits pageranges with the “page-range-delimiter” term (introduced with CSL 1.0.1, anddefaults to an en-dash). If the attribute is not set, page ranges arerendered without reformatting.
Name Particles¶
Western names frequently contain one or more name particles (e.g. “van” in theDutch name “Vincent van Gogh”). These name particles can be either kept ordropped when only the surname is shown: these two types are referred to asnon-dropping and dropping particles, respectively. Theoretically, a single namemight contain particles of both types (with non-dropping particles alwaysfollowing dropping particles), though currently we are not aware of anyreal-life examples. For example, the Dutch name “Vincent van Gogh”, the Germanname “Alexander von Humboldt”, and the Arabic name “Tawfiq al-Hakim” can bedeconstructed into:
{"author":[{"given":"Vincent","non-dropping-particle":"van","family":"Gogh"},{"given":"Alexander","dropping-particle":"von","family":"Humboldt"}{"given":"Tawfiq","non-dropping-particle":"al-","family":"Hakim"}]}
When just the surname is shown, only the non-dropping-particle is kept: “VanGogh” and “al-Hakim”, but “Humboldt”.
In the case of inverted names, where the family name precedes the given name,the dropping-particle is always appended to the family name, but thenon-dropping-particle can be either prepended (e.g. “van Gogh, Vincent”) orappended (after initials or given names, e.g. “Gogh, Vincent van”). For invertednames where the non-dropping-particle is prepended, names can either be sortedby keeping the non-dropping-particle together with the family name as part ofthe primary sort key (sort order A), or by separating the non-dropping-particlefrom the family name and have it become (part of) a secondary sort key, joiningthe dropping-particle, if available (sort order B):
Sort order A: non-dropping-particle not demoted
- primary sort key: “van Gogh”
- secondary sort key: “”
- tertiary sort key: “Vincent”
Sort order B: non-dropping-particle demoted
- primary sort key: “Gogh”
- secondary sort key: “van”
- tertiary sort key: “Vincent”
The handling of the non-dropping-particle can be customized with thedemote-non-dropping-particle option:
demote-non-dropping-particleSets the display and sorting behavior of the non-dropping-particle ininverted names (e.g. “Gogh, Vincent van”). Allowed values:
- “never”: the non-dropping-particle is treated as part of the family name,whereas the dropping-particle is appended (e.g. “van Gogh, Vincent”,“Humboldt, Alexander von”). The non-dropping-particle is part of theprimary sort key (sort order A, e.g. “van Gogh, Vincent” appears under“V”).
- “sort-only”: same display behavior as “never”, but thenon-dropping-particle is demoted to a secondary sort key (sort order B,e.g. “van Gogh, Vincent” appears under “G”).
- “display-and-sort” (default): the dropping and non-dropping-particle areappended (e.g. “Gogh, Vincent van” and “Humboldt, Alexander von”). For namesorting, all particles are part of the secondary sort key (sort order B,e.g. “Gogh, Vincent van” appears under “G”).
Some names include a particle that should never be demoted. For these cases theparticle should just be included in the family name field, for example for theFrench general Charles de Gaulle and the writer Jean de La Fontaine:
{"author":[{"given":"Charles""family":"de Gaulle",},{"given":"Jean""dropping-particle":"de","family":"La Fontaine",}]}
Inheritable Name Options¶
Attributes for thecs:names andcs:name elements may also be set oncs:style,cs:citation andcs:bibliography. This eliminates the needto repeat the same attributes and attribute values for every occurrence of thecs:names andcs:name elements.
The available inheritable attributes forcs:name areand,delimiter-precedes-et-al,delimiter-precedes-last,et-al-min,et-al-use-first,et-al-use-last,et-al-subsequent-min,et-al-subsequent-use-first,initialize,initialize-with,name-as-sort-order andsort-separator. The attributesname-form andname-delimiter correspond to theform anddelimiter attributes oncs:name. Similarly,names-delimiter corresponds to thedelimiterattribute oncs:names.
When an inheritable name attribute is set oncs:style,cs:citation orcs:bibliography, its value is used for allcs:names elements within thescope of the element carrying the attribute. If an attribute is set on multiplehierarchical levels, the value set at the lowest level is used.
Locale Options¶
limit-day-ordinals-to-day-1- Date formats are defined by the
cs:dateelement and itscs:date-partchild elements (seeDate). By default, when thecs:date-partelementwithnameset to “day” hasformset to “ordinal”, all days (1 through31) are rendered in the ordinal form, e.g. “January 1st”, “January 2nd”, etc.By settinglimit-day-ordinals-to-day-1to “true” (“false” is thedefault), the “ordinal” form is limited to the first day of each month (otherdays will use the “numeric” form). This is desirable for some languages, suchas French: “1er janvier”, but “2 janvier”, “3 janvier”, etc. punctuation-in-quote- For
cs:textelements rendered with thequotesattribute set to“true” (seeFormatting), and for which the output is followed by a commaor period,punctuation-in-quotespecifies whether this punctuation isplaced outside (value “false”, default) or inside (value “true”) the closingquotation mark.
Sorting¶
cs:citation andcs:bibliography may include acs:sort child elementbefore thecs:layout element to specify the sorting order of respectivelycites within citations, and bibliographic entries within the bibliography. Inthe absence ofcs:sort, cites and bibliographic entries appear in the orderin which they are cited.
Thecs:sort element must contain one or morecs:key child elements. Thesort key, set as an attribute oncs:key, must be a variable (seeAppendixIV - Variables) or macro name. For eachcs:key element, the sort directioncan be set to either “ascending” (default) or “descending” with thesortattribute. Sorting is case-insensitive. The attributesnames-min,names-use-first, andnames-use-last may be used to override the valuesof the correspondinget-al-min/et-al-subsequent-min,et-al-use-first/et-al-subsequent-use-first andet-al-use-lastattributes, and affect all names generated via macros called bycs:key.
Sort keys are evaluated in sequence. A primary sort is performed on all itemsusing the first sort key. A secondary sort, using the second sort key, isapplied to items sharing the first sort key value. A tertiary sort, using thethird sort key, is applied to items sharing the first and second sort keyvalues. Sorting continues until either the order of all items is fixed, or untilthe sort keys are exhausted. Items with an empty sort key value are placed atthe end of the sort, both for ascending and descending sorts.
An example, where cites are first sorted by the output of the “author” macro,with overriding settings for et-al abbreviation. Cites sharing the primary sortkey are subsequently sorted in descending order by the “issued” date variable.
<citation><sort><keymacro="author"names-min="3"names-use-first="3"/><keyvariable="issued"sort="descending"/></sort><layout><!-- rendering elements --></layout></citation>
The sort key value of a variable or macro can differ from the “normal” renderedoutput. The specifics of sorting variables and macros:
Sorting Variables¶
The sort key value for a variable called bycs:key via thevariableattribute consists of the string value, without rich text markup. Exceptions arename, date and numeric variables:
names:Name variables called via thevariable attribute (e.g.<keyvariable="author"/>) are returned as a name list string, with thecs:nameattributesform set to “long”, andname-as-sort-order set to “all”.
dates:Date variables called via thevariable attribute are returnedin the YYYYMMDD format, with zeros substituted for any missing date-parts (e.g.20001200 for December 2000). As a result, less specific dates precede morespecific dates in ascending sorts, e.g. “2000, May 2000, May 1st 2000”. Negativeyears are sorted inversely, e.g. “100BC, 50BC, 50AD, 100AD”. Seasons are ignoredfor sorting, as the chronological order of the seasons differs between thenorthern and southern hemispheres. In the case of date ranges, the start date isused for the primary sort, and the end date is used for a secondary sort, e.g.“2000–2001, 2000–2005, 2002–2003, 2002–2009”. Date rangesare placed after single dates when they share the same (start) date, e.g. “2000,2000–2002”.
numbers:Number variables called via thevariable attribute arereturned as integers (form is “numeric”). If the original variable valueonly consists of non-numeric text, the value is returned as a text string.
Sorting Macros¶
The sort key value for a macro called viacs:key via themacro attributegenerally consists of the string value the macro would ordinarily generate,without rich text markup (exceptions are discussed below).
When sorting byname variables rendered within the macro, anycs:label elements are excluded from the sort key values.Name variables are also returned with thecs:name attributename-as-sort-order set to “all”.When et-al abbreviation occurs, the “et-al” and “and others” terms are excluded from the sort key values.
There are four advantages in using the same macro for rendering and sorting, instead of sorting directly on the name variable.First, substitution is available (e.g. the “editor” variable might substitute for an empty “author” variable).Second, et-al abbreviation can be used (using either theet-al-min/et-al-subsequent-min,et-al-use-first/et-al-subsequent-use-first, andet-al-use-last options defined for the macro, or the overridingnames-min,names-use-first andnames-use-last attributes set oncs:key).Third, names can be sorted by just the surname (using a macro for which theform attribute oncs:name is set to “short”).Fourth, it is possible to sort by the number of names in a name list, by calling a macro for which theform attribute oncs:name is set to “count”.
Number variables rendered within the macro withcs:number anddatevariables are treated the same as when they are called viavariable. Theonly exception is that the complete date is returned if a date variable iscalled via thevariable attribute. In contrast, macros return only thosedate-parts that would otherwise be rendered (respecting the value of thedate-parts attribute for localized dates, or the listing ofcs:date-partelements for non-localized dates).
Range Delimiters¶
Collapsed ranges for the “citation-number” and “year-suffix” variables aredelimited by an en-dash (e.g. “(1–3, 5)” and “(Doe 2000a–c,e)”).
The “locator” variable is always rendered with an en-dash replacing any hyphens.For the “page” variable, this replacement is only performed if thepage-range-format attribute is set oncs:style (seePage Ranges).
Formatting¶
The following formatting attributes may be set oncs:date,cs:date-part,cs:et-al,cs:group,cs:label,cs:layout,cs:name,cs:name-part,cs:names,cs:number andcs:text:
font-styleSets the font style, with values:
- “normal” (default)
- “italic”
- “oblique” (i.e. slanted)
font-variantAllows for the use of small capitals, with values:
- “normal” (default)
- “small-caps”
font-weightSets the font weight, with values:
- “normal” (default)
- “bold”
- “light”
text-decorationAllows for the use of underlining, with values:
- “none” (default)
- “underline”
vertical-alignSets the vertical alignment, with values:
- “baseline” (default)
- “sup” (superscript)
- “sub” (subscript)
Affixes¶
The affixes attributesprefix andsuffix may be set oncs:date(except whencs:date defines a localized date format),cs:date-part(except when the parentcs:date element calls a localized date format),cs:group,cs:label,cs:layout,cs:name,cs:name-part,cs:names,cs:number andcs:text. The attribute value is either addedbefore (prefix) or after (suffix) the output of the element carrying theattribute, but affixes are only rendered if the element produces output. Withthe exception of affixes set oncs:layout, affixes are outside the scope offormatting,quotes,strip-periods andtext-case attributes set onthe same element (as a workaround, these attributes take effect on affixes whenset on a parentcs:group element).
Delimiter¶
Thedelimiter attribute, whose value delimits non-empty pieces of output,may be set oncs:date (delimiting the date-parts;delimiter is notallowed whencs:date calls a localized date format),cs:names(delimiting name lists from differentname variables),cs:name(delimiting names within name lists),cs:group andcs:layout (delimitingthe output of the child elements).
A delimiting element is any element as above which takes adelimiter attribute, whether the attribute is supplied or not.
Delimiters from any ancestor delimiting element are not applied within the output of a delimiting element. The following producesretrieved:<http://example.com>:
<groupdelimiter=": "><textterm="retrieved"/><group><textvalue="<"/><textvariable="URL"/><textvalue=">"/></group></group>
Display¶
Thedisplay attribute (similar the “display” property in CSS) may be used tostructure individual bibliographic entries into one or more text blocks. Ifused, all rendering elements should be under the control of a display attribute.The allowed values:
- “block” - block stretching from margin to margin.
- “left-margin” - block starting at the left margin. If followed by a“right-inline” block, the “left-margin” blocks of all bibliographic entriesare set to a fixed width to accommodate the longest content string found amongthese “left-margin” blocks. In the absence of a “right-inline” block the“left-margin” block extends to the right margin.
- “right-inline” - block starting to the right of a preceding “left-margin”block (behaves as “block” in the absence of such a “left-margin” block).Extends to the right margin.
- “indent” - block indented to the right by a standard amount. Extends to theright margin.
Examples
Instead of using
second-field-align(seeWhitespace), a similarlayout can be achieved with a “left-margin” and “right-inline” block. Apotential benefit is that the styling of blocks can be further controlled inthe final output (e.g. using CSS for HTML, styles for Word, etc.).<bibliography><layout><textdisplay="left-margin"variable="citation-number"prefix="["suffix="]"/><groupdisplay="right-inline"><!-- rendering elements --></group></layout></bibliography>
A per-author publication listing. With
subsequent-author-substitute(seeReference Grouping) set to an empty string, the block with the authornames is only rendered once for items by the same authors.<bibliographysubsequent-author-substitute=""><sort><keyvariable="author"/><keyvariable="issued"/></sort><layout><groupdisplay="block"><namesvariable="author"/></group><groupdisplay="left-margin"><datevariable="issued"><date-partname="year"/></date></group><groupdisplay="right-inline"><textvariable="title"/></group></layout></bibliography>
The output of this example would look like:
Author1 year-publication1 title-publication1 year-publication2 title-publication2 Author2 year-publication3 title-publication3 year-publication4 title-publication4
An annotated bibliography, where the annotation appears in an indented blockbelow the reference.
<bibliography><layout><groupdisplay="block"><!-- rendering elements --></group><textdisplay="indent"variable="abstract"/></layout></bibliography>
Quotes¶
Thequotes attribute may set oncs:text. When set to “true” (“false” isdefault), the rendered text is wrapped in quotes (the quotation marks used areterms). The localizedpunctuation-in-quote option controls whetheran adjoining comma or period appears outside (default) or inside the closingquotation mark (seeLocale Options).
Strip-periods¶
Thestrip-periods attribute may be set oncs:date-part (but only ifname is set to “month”),cs:label andcs:text. When set to “true”(“false” is the default), any periods in the rendered text are removed.
Text-case¶
Thetext-case attribute may be set oncs:date,cs:date-part,cs:label,cs:name-part,cs:number andcs:text. The allowedvalues:
- “lowercase”: renders text in lowercase
- “uppercase”: renders text in uppercase
- “capitalize-first”: capitalizes the first character of the first word, if theword is lowercase
- “capitalize-all”: capitalizes the first character of every lowercase word
- “sentence”: renders text in sentence case (deprecated; do not use)
- “title”: renders text in title case
Sentence Case Conversion¶
Sentence case conversion (withtext-case set to “sentence”) is performed by:
- For uppercase strings, the first character of the string remains capitalized.All other letters are lowercased.
- For lower or mixed case strings, the first character of the first word iscapitalized if the word is lowercase. The case of all other words stays thesame.
CSL processors don’t recognize proper nouns. As a result, strings in sentencecase can be accurately converted to title case, but not vice versa. For thisreason, it is generally preferable to store strings such as titles in sentencecase, and only usetext-case if a style desires another case.
Sentence case conversion is deprecated and will be removed in a future version.
Title Case Conversion¶
Title case conversion (withtext-case set to “title”) for English-languageitems is performed by:
- For uppercase strings, the first character of each word remains capitalized.All other letters are lowercased.
- For lower or mixed case strings, the first character of each lowercase wordis capitalized. The case of words in mixed or uppercase stays the same.
In both cases, stop words are lowercased, unless they are the first or last word in the string, or follow a colon.The stop words are listed in the CSL Schema filestop-words.json.Hyphenated word parts are treated as distinct words (e.g., “two-thirds” becomes “Two-Thirds”).
Non-English Items¶
As many languages do not use title case, title case conversion (withtext-case set to “title”) only affects English-language items.
If thedefault-locale attribute oncs:style isn’t set, or set to alocale code with a primary language tag of “en” (English), items are assumed tobe English. An item is only considered to be non-English if its metadatacontains alanguage field with a non-nil value that doesn’t start with the“en” primary language tag.
Ifdefault-locale is set to a locale code with a primary language tag otherthan “en”, items are assumed to be non-English. An item is only considered to beEnglish if the value of itslanguage field starts with the “en” primarylanguage tag.
Appendix I - Categories¶
- anthropology
- astronomy
- biology
- botany
- chemistry
- communications
- engineering
- generic-base - used for generic styles like Harvard and APA
- geography
- geology
- history
- humanities
- law
- linguistics
- literature
- math
- medicine
- philosophy
- physics
- political_science
- psychology
- science
- social_science
- sociology
- theology
- zoology
Appendix II - Terms¶
Type Terms¶
For each item type listed inAppendix III - Types, there is a corresponding term.
Name Variable Terms¶
For each of theName Variables listed inAppendix IV - Variables, there is a corresponding term.
Number Variable Terms¶
For each of theNumber Variables listed inAppendix IV - Variables, there is a corresponding term.
Locators¶
- appendix
- article-locator
- book
- canon
- chapter
- column
- elocation
- equation
- figure
- folio
- issue
- line
- note
- opus
- page
- paragraph
- part
- rule
- section
- sub-verbo
- supplement
- table
- timestamp
- title
- verse
- volume
Months¶
- month-01
- month-02
- month-03
- month-04
- month-05
- month-06
- month-07
- month-08
- month-09
- month-10
- month-11
- month-12
Ordinals¶
- ordinal
- ordinal-00 through ordinal-99
- long-ordinal-01
- long-ordinal-02
- long-ordinal-03
- long-ordinal-04
- long-ordinal-05
- long-ordinal-06
- long-ordinal-07
- long-ordinal-08
- long-ordinal-09
- long-ordinal-10
Punctuation¶
- open-quote
- close-quote
- open-inner-quote
- close-inner-quote
- page-range-delimiter
- colon
- comma
- semicolon
Miscellaneous¶
- accessed
- ad
- advance-online-publication
- album
- and
- and others
- anonymous
- at
- audio-recording
- available at
- bc
- bce
- by
- ce
- circa
- cited
- et-al
- film
- forthcoming
- from
- henceforth
- ibid
- in
- in press
- internet
- interview
- letter
- loc-cit
- no date
- no-place
- no-publisher
- on
- online
- op-cit
- original-work-published
- personal-communication
- podcast
- podcast-episode
- preprint
- presented at
- radio-broadcast
- radio-series
- radio-series-episode
- reference
- retrieved
- review-of
- scale
- special-issue
- special-section
- television-broadcast
- television-series
- television-series-episode
- video
- working-paper
Appendix III - Types¶
- article
- A self-contained work made widely available but not published in a journal or other publication;Use for preprints, working papers, and similar works posted on a platform where some level of persistence or stewardship is expected (e.g. arXiv or other preprint repositories, working paper series);For unpublished works not made widely available or only hosted on personal websites, use
manuscript - article-journal
- An article published in an academic journal
- article-magazine
- An article published in a non-academic magazine
- article-newspaper
- An article published in a newspaper
- bill
- A proposed piece of legislation
- book
- A book or similar work;Can be an authored book or an edited collection of self-contained chapters;Can be a physical book or an ebook;The format for an ebook may be specified using
medium;Can be a single-volume work, a multivolume work, or one volume of a multivolume work;If acontainer-titleis present, the item is interpreted as a book republished in a collection or anthology;Also used for whole conference proceedings volumes or exhibition catalogs by specifyingeventand related variables - broadcast
- A recorded work broadcast over an electronic medium (e.g. a radio broadcast, a television show, a podcast);The type of broadcast may be specified using
genre;Ifcontainer-titleis present, the item is interpreted as an episode contained within a larger broadcast series (e.g. an episode in a television show or an episode of a podcast) - chapter
- A part of a book cited separately from the book as a whole (e.g. a chapter in an edited book);Also used for introductions, forewords, and similar supplemental components of a book
- classic
- A classical or ancient work, sometimes cited using a common abbreviation
- collection
- An archival collection in a museum or other institution
- dataset
- A data set or a similar collection of (mostly) raw data
- document
- A catch-all category for items not belonging to other types;Use a more specific type when appropriate
- entry
- An entry in a database, directory, or catalog;For entries in a dictionary, use
entry-dictionary;For entries in an encyclopedia, useentry-encyclopedia - entry-dictionary
- An entry in a dictionary
- entry-encyclopedia
- An entry in an encyclopedia or similar reference work
- event
- An organized event (e.g., an exhibition or conference);Use for direct citations to the event, rather than to works contained within an event (e.g. a
presentationin a conference, agraphicin an exhibition) or based on an event (e.g. apaper-conferencepublished in a proceedings, an exhibition catalog) - figure
- A illustration or representation of data, typically as part of a journal article or other larger work;May be in any format (e.g. image, video, audio recording, 3D model);The format of the item can be specified using
medium - graphic
- A still visual work;Can be used for artwork or other works (e.g. journalistic or historical photographs);Can be used for any still visual work (e.g. photographs, drawings, paintings, sculptures, clothing);The format of the item can be specified using
medium - hearing
- A hearing by a government committee or transcript thereof
- interview
- An interview of a person;Also used for a recording or transcript of an interview;
authoris interpreted as the interviewee - legal_case
- A legal case
- legislation
- A law or resolution enacted by a governing body
- manuscript
- An unpublished manuscript;Use for both modern unpublished works and classical manuscripts;For working papers, preprints, and similar works posted to a repository, use
article - map
- A geographic map
- motion_picture
- A video or visual recording;If a
container-titleis present, the item is interpreted as a part contained within a larger compilation of recordings (e.g. a part of a multipart documentary)) - musical_score
- The printed score for a piece of music;For a live performance of the music, use
performance;For recordings of the music, usesong(for audio recordings) ormotion_picture(for video recordings) - pamphlet
- A fragment, historical document, or other unusually-published or ephemeral work (e.g. a sales brochure)
- paper-conference
- A paper formally published in conference proceedings;For papers presented at a conference, but not published in a proceedings, use
speech - patent
- A patent for an invention
- performance
- A live performance of an artistic work;For non-artistic presentations, use
speech;For recordings of a performance, usesongormotion_picture - periodical
- A full issue or run of issues in a periodical publication (e.g. a special issue of a journal)
- personal_communication
- Personal communications between multiple parties;May be unpublished (e.g. private correspondence between two researchers) or collected/published (e.g. a letter published in a collection)
- post
- A post on a online forum, social media platform, or similar platform;Also used for comments posted to online items
- post-weblog
- A blog post
- regulation
- An administrative order from any level of government
- report
- A technical report, government report, white paper, brief, or similar work distributed by an institution;Also used for manuals and similar technical documentation (e.g. a software, instrument, or test manual);If a
container-titleis present, the item is interpreted as a chapter contained within a larger report - review
- A review of an item other than a book (e.g. a film review, posted peer review of an article);If
reviewed-titleis absent,titleis taken to be the title of the reviewed item - review-book
- A review of a book;If
reviewed-titleis absent,titleis taken to be the title of the reviewed book - software
- A computer program, app, or other piece of software
- song
- An audio recording;Can be used for any audio recording (not only music);If a
container-titleis present, the item is interpreted as a track contained within a larger album or compilation of recordings - speech
- A speech or other presentation (e.g. a paper, talk, poster, or symposium at a conference);Use
genreto specify the type of presentation;Useeventto indicate the event where the presentation was made (e.g. the conference name);Usecontainer-titleif the presentation is part of a larger session (e.g. a paper in a symposium);For papers published in conference proceedings, usepaper-conference;For artistic performances, useperformance - standard
- A technical standard or similar set of rules or norms
- thesis
- A thesis written to satisfy requirements for a degree;Use
genreto specify the type of thesis - treaty
- A treaty agreement among political authorities
- webpage
- A website or page on a website;Intended for sources which are intrinsically online; use a more specific type when appropriate (e.g.
article-journal,post-weblog,report,entry);If acontainer-titleis present, the item is interpreted as a page contained within a larger website
Appendix IV - Variables¶
Standard Variables¶
- abstract
- Abstract of the item (e.g. the abstract of a journal article)
- annote
- Short markup, decoration, or annotation to the item (e.g., to indicate items included in a review);For descriptive text (e.g., in an annotated bibliography), use
noteinstead - archive
- Archive storing the item
- archive_collection
- Collection the item is part of within an archive
- archive_location
- Storage location within an archive (e.g. a box and folder number)
- archive-place
- Geographic location of the archive
- authority
- Issuing or judicial authority (e.g. “USPTO” for a patent, “Fairfax Circuit Court” for a legal case)
- call-number
- Call number (to locate the item in a library)
- citation-key
- Identifier of the item in the input data file (analogous to BibTeX entrykey);Use this variable to facilitate conversion between word-processor and plain-text writing systems;For an identifer intended as formatted output label for a citation (e.g. “Ferr78”), use
citation-labelinstead - citation-label
- Label identifying the item in in-text citations of label styles (e.g. “Ferr78”);May be assigned by the CSL processor based on item metadata;For the identifier of the item in the input data file, use
citation-keyinstead - collection-title
- Title of the collection holding the item (e.g. the series title for a book; the lecture series title for a presentation)
- container-title
- Title of the container holding the item (e.g. the book title for a book chapter, the journal title for a journal article; the album title for a recording; the session title for multi-part presentation at a conference)
- container-title-short
- Short/abbreviated form of
container-title;Deprecated; usevariable="container-title"form="short"instead - dimensions
- Physical (e.g. size) or temporal (e.g. running time) dimensions of the item
- division
- Minor subdivision of a court with a
jurisdictionfor a legal item - DOI
- Digital Object Identifier (e.g. “10.1128/AEM.02591-07”)
- event
- Deprecated legacy variant of
event-title - event-title
- Name of the event related to the item (e.g. the conference name when citing a conference paper; the meeting where presentation was made)
- event-place
- Geographic location of the event related to the item (e.g. “Amsterdam, The Netherlands”)
- genre
- Type, class, or subtype of the item (e.g. “Doctoral dissertation” for a PhD thesis; “NIH Publication” for an NIH technical report);Do not use for topical descriptions or categories (e.g. “adventure” for an adventure movie)
- ISBN
- International Standard Book Number (e.g. “978-3-8474-1017-1”)
- ISSN
- International Standard Serial Number
- jurisdiction
- Geographic scope of relevance (e.g. “US” for a US patent; the court hearing a legal case)
- keyword
- Keyword(s) or tag(s) attached to the item
- language
- The language of the item;Should be entered as an ISO 639-1 two-letter language code (e.g. “en”, “zh”), optionally with a two-letter locale code (e.g. “de-DE”, “de-AT”)
- license
- The license information applicable to an item (e.g. the license an article or software is released under; the copyright information for an item; the classification status of a document)
- medium
- Description of the item’s format or medium (e.g. “CD”, “DVD”, “Album”, etc.)
- note
- Descriptive text or notes about an item (e.g. in an annotated bibliography)
- original-publisher
- Original publisher, for items that have been republished by a different publisher
- original-publisher-place
- Geographic location of the original publisher (e.g. “London, UK”)
- original-title
- Title of the original version (e.g. “Война и мир”, the untranslated Russian title of “War and Peace”)
- part-title
- Title of the specific part of an item being cited
- PMCID
- PubMed Central reference number
- PMID
- PubMed reference number
- publisher
- Publisher
- publisher-place
- Geographic location of the publisher
- references
- Resources related to the procedural history of a legal case or legislation;Can also be used to refer to the procedural history of other items (e.g. “Conference canceled” for a presentation accepted as a conference that was subsequently canceled; details of a retraction or correction notice)
- reviewed-genre
- Type of the item being reviewed by the current item (e.g. book, film)
- reviewed-title
- Title of the item reviewed by the current item
- scale
- Scale of e.g. a map or model
- source
- Source from whence the item originates (e.g. a library catalog or database)
- status
- Publication status of the item (e.g. “forthcoming”; “in press”; “advance online publication”; “retracted”)
- title
- Primary title of the item
- title-short
- Short/abbreviated form of
title;Deprecated; usevariable="title"form="short"instead - URL
- Uniform Resource Locator (e.g. “https://aem.asm.org/cgi/content/full/74/9/2766”)
- volume-title
- Title of the volume of the item or container holding the item;Also use for titles of periodical special issues, special sections, and the like
- year-suffix
- Disambiguating year suffix in author-date styles (e.g. “a” in “Doe, 1999a”)
Number Variables¶
Number variables are a subset of theStandard Variables.
- chapter-number
- Chapter number (e.g. chapter number in a book; track number on an album)
- citation-number
- Index (starting at 1) of the cited reference in the bibliography (generated by the CSL processor)
- collection-number
- Number identifying the collection holding the item (e.g. the series number for a book)
- edition
- (Container) edition holding the item (e.g. “3” when citing a chapter in the third edition of a book)
- first-reference-note-number
- Number of a preceding note containing the first reference to the item;Assigned by the CSL processor;Empty in non-note-based styles or when the item hasn’t been cited in any preceding notes in a document
- issue
- Issue number of the item or container holding the item (e.g. “5” when citing a journal article from journal volume 2, issue 5);Use
volume-titlefor the title of the issue, if any - locator
- A cite-specific pinpointer within the item (e.g. a page number within a book, or a volume in a multi-volume work);Must be accompanied in the input data by a label indicating the locator type (see theLocators term list), which determines which term is rendered by
cs:labelwhen thelocatorvariable is selected. - number
- Number identifying the item (e.g. a report number)
- number-of-pages
- Total number of pages of the cited item
- number-of-volumes
- Total number of volumes, used when citing multi-volume books and such
- page
- Range of pages the item (e.g. a journal article) covers in a container (e.g. a journal issue)
- page-first
- First page of the range of pages the item (e.g. a journal article) covers in a container (e.g. a journal issue)
- part-number
- Number of the specific part of the item being cited (e.g. part 2 of a journal article);Use
part-titlefor the title of the part, if any - printing-number
- Printing number of the item or container holding the item
- section
- Section of the item or container holding the item (e.g. “§2.0.1” for a law; “politics” for a newspaper article)
- supplement-number
- Supplement number of the item or container holding the item (e.g. for secondary legal items that are regularly updated between editions)
- version
- Version of the item (e.g. “2.0.9” for a software program)
- volume
- Volume number of the item (e.g. “2” when citing volume 2 of a book) or the container holding the item (e.g. “2” when citing a chapter from volume 2 of a book);Use
volume-titlefor the title of the volume, if any
Date Variables¶
- accessed
- Date the item has been accessed
- available-date
- Date the item was initially available (e.g. the online publication date of a journal article before its formal publication date; the date a treaty was made available for signing)
- event-date
- Date the event related to an item took place
- issued
- Date the item was issued/published
- original-date
- Issue date of the original version
- submitted
- Date the item (e.g. a manuscript) was submitted for publication
Name Variables¶
- author
- Author
- chair
- The person leading the session containing a presentation (e.g. the organizer of the
container-titleof aspeech) - collection-editor
- Editor of the collection holding the item (e.g. the series editor for a book)
- compiler
- Person compiling or selecting material for an item from the works of various persons or bodies (e.g. for an anthology)
- composer
- Composer (e.g. of a musical score)
- container-author
- Author of the container holding the item (e.g. the book author for a book chapter)
- contributor
- A minor contributor to the item; typically cited using “with” before the name when listed in a bibliography
- curator
- Curator of an exhibit or collection (e.g. in a museum)
- director
- Director (e.g. of a film)
- editor
- Editor
- editorial-director
- Managing editor (“Directeur de la Publication” in French)
- editor-translator
- Combined editor and translator of a work;The citation processory must be automatically generate if
editorandtranslatorvariables are identical;May also be provided directly in item data - executive-producer
- Executive producer (e.g. of a television series)
- guest
- Guest (e.g. on a TV show or podcast)
- host
- Host (e.g. of a TV show or podcast)
- illustrator
- Illustrator (e.g. of a children’s book or graphic novel)
- interviewer
- Interviewer (e.g. of an interview)
- narrator
- Narrator (e.g. of an audio book)
- organizer
- Organizer of an event (e.g. organizer of a workshop or conference)
- original-author
- The original creator of a work (e.g. the form of the author name listed on the original version of a book; the historical author of a work; the original songwriter or performer for a musical piece; the original developer or programmer for a piece of software; the original author of an adapted work such as a book adapted into a screenplay)
- performer
- Performer of an item (e.g. an actor appearing in a film; a muscian performing a piece of music)
- producer
- Producer (e.g. of a television or radio broadcast)
- recipient
- Recipient (e.g. of a letter)
- reviewed-author
- Author of the item reviewed by the current item
- script-writer
- Writer of a script or screenplay (e.g. of a film)
- series-creator
- Creator of a series (e.g. of a television series)
- translator
- Translator
Appendix V - Page Range Formats¶
The page abbreviation rules for the different values of thepage-range-format attribute oncs:style are:
- “chicago”
- Alias for “chicago-15”; will change to be an alias for “chicago-16” in CSL v1.1.
- “chicago-15”
Page ranges are abbreviated according to the`Chicago Manual of Style (15th ed and earlier) rules`_ (see 15th ed, section 9.64):
First number Second number Examples Less than 100 Use all digits 3–10; 71–72 100 or multiple of 100 Use all digits 100–104;600–613;1100–1123 101 through 109 (inmultiples of 100) Use changed part only,omitting unneeded zeros 107–8; 505–17;1002–6 110 through 199 (inmultiples of 100) Use two digits, or moreas needed 321–25;415–532;11564–68;13792–803 4 digits If numbers are fourdigits long and threedigits change, use alldigits 1496–1504;2787–2816 - “chicago-16”
Page ranges are abbreviated according to theChicago Manual of Style (16th ed and later) rules (see 16th ed, section 9.61):
First number Second number Examples Less than 100 Use all digits 3–10;71–72;92–113; 100 or multiple of 100 Use all digits 100–104;600–613;1100–1123 101 through 109,201 through 209, etc.(for each multiple of 100) Use changed part only,omitting unneeded zeros 107–8;505–17;1002–6 Everything else(110 through 199,
210 through 299, etc.;for each multiple of 100)Use two digits, unlessmore digits are neededto show the changed part 321–25;415–532;1087–89;1496–500;11564–68;13792–80312991–3001 - “expanded”
- Abbreviated page ranges are expanded to their non-abbreviated form: 42–45, 321–328, 2787–2816
- “minimal”
- All digits repeated in the second number are left out: 42–5, 321–8, 2787–816
- “minimal-two”
- As “minimal”, but at least two digits are kept in the second number when it has two or more digits long.
Appendix VI: Links¶
The CSL syntax does not have support for configuration of links. However, processors should include links on bibliographic references, using the following rules:
If the bibliography entry for an item renders any of the following identifiers, the identifier should be anchored as a link, with the target of the link as follows:
url: output as isdoi: prepend with “https://doi.org/”pmid: prepend with “https://www.ncbi.nlm.nih.gov/pubmed/”pmcid: prepend with “https://www.ncbi.nlm.nih.gov/pmc/articles/”
If the identifier is rendered as a URI, include rendered URI components (e.g. “https://doi.org/”) in the link anchor. Do not include any other affix text in the link anchor (e.g. “Available from: “, “doi: “, “PMID: “).
Citation processors should include an option flag for calling applications to disable bibliography linking behavior.
