summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/citation-style-language/citation-style-language-doc.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/citation-style-language/citation-style-language-doc.tex')
-rw-r--r--Master/texmf-dist/doc/latex/citation-style-language/citation-style-language-doc.tex95
1 files changed, 65 insertions, 30 deletions
diff --git a/Master/texmf-dist/doc/latex/citation-style-language/citation-style-language-doc.tex b/Master/texmf-dist/doc/latex/citation-style-language/citation-style-language-doc.tex
index 87bdfacb79c..538aaae00ac 100644
--- a/Master/texmf-dist/doc/latex/citation-style-language/citation-style-language-doc.tex
+++ b/Master/texmf-dist/doc/latex/citation-style-language/citation-style-language-doc.tex
@@ -1,3 +1,9 @@
+%
+% Copyright (c) 2021-2022 Zeping Lee
+% Released under the MIT License.
+% Repository: https://github.com/zepinglee/citeproc-lua
+%
+
\documentclass{l3doc}
\usepackage{mathpazo}
@@ -43,7 +49,7 @@
}%
}
-\date{2022-01-22 v0.1.0}
+\date{2022-03-21 v0.1.1}
\maketitle
@@ -205,22 +211,24 @@ By default, it is 1 em (with respect to the \opt{bib-font} size if set).
\begin{function}{\addbibresource}
\begin{syntax}
- \cs{addbibresource}\oarg{options}\marg{resouce}
+ \cs{addbibresource}\oarg{options}\marg{resource}
\end{syntax}
\end{function}
The \cs{addbibresource} command adds the contents of \meta{resource} into the
bibliographic metadata.
-Currently, only Bib(La)TeX \file{.bib} format is supported.
-
-and Bib(La)TeX \file{.bib} are supported.
-It is internally converted to CSL-JSON\footnote{\url{https://github.com/citation-style-language/schema\#csl-json-schema}}, the data model defined with CSL
-and the mapping of entry-types and fields from \file{.bib} to CSL-JSON is detailed
-in GitHub wiki
+The \meta{resource} may be a CSL-JSON file or the Bib(La)TeX \file{.bib} file.
+CSL-JSON \footnote{\url{https://github.com/citation-style-language/schema\#csl-json-schema}}
+is the default data model defined by CSL.
+Its contents are usually exported from Zotero.
+The traditional \file{.bib} file is converted to CSL-JSON internally for
+further processing.
+The mapping of entry-types and fields between them is detailed in the GitHub wiki
page\footnote{\url{https://github.com/zepinglee/citeproc-lua/wiki/Bib-CSL-mapping}}.
-Note that only UTF-8 encoding is supported for the \meta{resource} file.
+Note that only UTF-8 encoding is supported in the \meta{resource} file.
\begin{LaTeXdemo}
- \addbibresource{bibfile.bib}
+ \addbibresource{data-file.json}
+ \addbibresource{bib-file.bib}
\end{LaTeXdemo}
@@ -232,28 +240,38 @@ Note that only UTF-8 encoding is supported for the \meta{resource} file.
The citation command is similar to the one in standard LaTeX except that the
\meta{options} is in key-value style.
-The \meta{options} can be \opt{prefix}, \opt{suffix} or one of the locators:
-\opt{book},
-\opt{chapter},
-\opt{column},
-\opt{figure},
-\opt{folio},
-\opt{issue},
-\opt{line},
-\opt{note},
-\opt{opus},
-\opt{page},
-\opt{paragraph},
-\opt{part},
-\opt{section},
-\opt{sub-verbo},
-\opt{verse},
-and \opt{volume}.
+\DescribeOption{prefix}
+\DescribeOption{suffix}
+\DescribeOption{page}
+\DescribeOption{figure}
+The \meta{options} can be \opt{prefix}, \opt{suffix} or one of locators like
+\opt{page} or \opt{figure}.
+The full list of supported locators is detailed in Table~\ref{tab:locators}.
An example is as follows.
\begin{LaTeXdemo}
\cite[prefix = {See }, page = 42]{ITEM-1}
\end{LaTeXdemo}
+\begin{table}
+ \centering
+ \caption{The locators supported in CSL v1.0.2.}
+ \label{tab:locators}
+ \begin{tabular}{lll}
+ \toprule
+ \opt{act} & \opt{folio} & \opt{section} \\
+ \opt{appendix} & \opt{issue} & \opt{sub-verbo} \\
+ \opt{article-locator} & \opt{line} & \opt{supplement} \\
+ \opt{book} & \opt{note} & \opt{table} \\
+ \opt{canon} & \opt{opus} & \opt{timestamp} \\
+ \opt{chapter} & \opt{page} & \opt{title-locator} \\
+ \opt{column} & \opt{paragraph} & \opt{verse} \\
+ \opt{elocation} & \opt{part} & \opt{version} \\
+ \opt{equation} & \opt{rule} & \opt{volume} \\
+ \opt{figure} & \opt{scene} & \\
+ \bottomrule
+ \end{tabular}
+\end{table}
+
The traditional form \cs{cite}\oarg{prenote}\oarg{postnote}\marg{keys}
introduced in \pkg{natbib} and \pkg{biblatex} is also supported but not
recommended.
@@ -263,11 +281,27 @@ The \meta{postnote} is used as a page locator if it consists of only digits.
In other packages, several commands are provided for producing citations in
different styles such as \cs{citet}, \cs{citep}, \cs{parencite}, and
\cs{footnotecite}.
-In \pkg{citation-style-language} package, however, the format of citations is fixed as formatted
-in CSL style and it is impossible to select another format without modifying
-the \file{.csl} style file.
+In \pkg{citation-style-language} package, however, the format of citations is
+fixed as defined in CSL style and it is impossible to select another format
+without modifying the \file{.csl} style file.
Note that narrative citation (like ``Doe (2018)'') will be supported in CSL 1.1.
+\begin{function}{\cites}
+ \begin{syntax}
+ \cs{cites}\oarg{options}\marg{key}...[options]\marg{key}
+ \end{syntax}
+\end{function}
+
+The \cs{cites} accepts multiple cite items in a single citation.
+This command scans greedily for arguments and a following bracket may be
+mistakenly recognized as a delimiter.
+To prevent this, an explicit \cs{relax} command is required to terminate the
+scanning process. The following example illustrates its usage.
+
+\begin{LaTeXdemo}
+ \cites[prefix = {See }, page = 6]{key1}[section = 2.3]{key2}\relax [Text]
+\end{LaTeXdemo}
+
\begin{function}{\printbibliography}
@@ -297,6 +331,7 @@ Currently no options are available.
\paragraph{\pkg{babel}}
The main language set by \pkg{babel} is used as the locale for \pkg{citation-style-language}.
+In general, \pkg{babel} is supposed to be loaded before \pkg{citation-style-language}.
\paragraph{\pkg{hyperref}}