diff --git a/CHANGELOG.md b/CHANGELOG.md index 7aa86b4b..db814dbb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] -## [v0.1.0] +## [v0.1.0] - 2022-01-22 ### Added diff --git a/README.md b/README.md index 358245cf..a03a10da 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,22 @@ # citeproc-lua -The [Citation Style Language](https://citationstyles.org/)} (CSL) is an XML-based language that defines the formats of citations and bibliography. -There are currently thousands of styles in CSL including the most widely used APA, Chicago, Vancouver, etc. -The `citeproc-lua` project is a Lua implementation of CSL v1.0.1 processor that is aimed for use with LaTeX. -The engine reads bibliographic metadata and performs sorting and formatting on both citations and bibliography according to the selected CSL style. -A LaTeX package (`citation-style-language.sty`) is provided to communicate with the processor. - -This project is in early development stage and some feature of CSL (especially collapsing and disambiguation) are not implemented yet. Comments, suggestions and bug reports are welcome. +The [Citation Style Language](https://citationstyles.org/) (CSL) is an +XML-based language that defines the formats of citations and bibliography. +There are currently thousands of styles in CSL including the most widely used +APA, Chicago, Vancouver, etc. +The `citeproc-lua` project is a Lua implementation of CSL v1.0.1 processor +that is aimed for use with LaTeX. +The engine reads bibliographic metadata and performs sorting and formatting on +both citations and bibliography according to the selected CSL style. +A LaTeX package (`citation-style-language.sty`) is provided to communicate with +the processor. + +This project is in early development stage and some features of CSL (especially +collapsing and disambiguation) are not implemented yet. Comments, suggestions +and bug reports are welcome. ## LaTeX example + A full LaTeX example is in the [`example/`](example) directory. - LaTeX document example.tex diff --git a/build.lua b/build.lua index b411d46d..6140578e 100644 --- a/build.lua +++ b/build.lua @@ -33,6 +33,7 @@ tagfiles = { "doc/citeproc.1", "CHANGELOG.md", } +textfiles = {"doc/README.md", "CHANGELOG.md"} typesetfiles = {"*.tex"} includetests = {} @@ -76,12 +77,12 @@ function update_tag(file, content, tagname, tagdate) local previous = string.match(content, "compare/(v" .. version_pattern .. ")%.%.%.HEAD") if tagname == previous then return content end content = string.gsub(content, - "## %[Unreleased%]", - "## [Unreleased]\n\n## [" .. tagname .."]") - return string.gsub(content, + "## %[Unreleased%]", "## [Unreleased]\n\n## [" .. tagname .. "] - " .. tagdate) + content = string.gsub(content, "v" .. version_pattern .. "%.%.%.HEAD", tagname .. "...HEAD\n[" .. tagname .. "]: " .. url_prefix .. previous .. "..." .. tagname) + return content end return content end diff --git a/doc/README.md b/doc/README.md new file mode 100644 index 00000000..74c27590 --- /dev/null +++ b/doc/README.md @@ -0,0 +1,59 @@ +# citation-style-language + +The [Citation Style Language](https://citationstyles.org/) (CSL) is an +XML-based language that defines the formats of citations and bibliography. +There are currently thousands of styles in CSL including the most widely used +APA, Chicago, Vancouver, etc. +The `citation-style-language` package is aimed to provide another reference +formatting method for LaTeX that utilizes the CSL styles. +It contains a citation processor implemented in pure Lua (`citeproc-lua`) +which reads bibliographic metadata and performs sorting and formatting on both +citations and bibliography according to the selected CSL style. +A LaTeX package (`citation-style-language.sty`) is provided to communicate +with the processor. + +This project is in early development stage and some features of CSL (especially +collapsing and disambiguation) are not implemented yet. Comments, suggestions +and bug reports are welcome. + +## LaTeX example + +A full LaTeX example is in the [`example/`](example) directory. + +- LaTeX document example.tex + +```latex +\documentclass{article} + +\usepackage{citation-style-language} +\cslsetup{style = apa} +\addbibresource{example.bib} + +\begin{document} + +\cite{ITEM-1} +\printbibliography + +\end{document} +``` + +- Compiling with LuaTeX + +```bash +lualatex example.tex +lualatex example.tex +``` + +- Compiling with other TeX engines + +```bash +pdflatex example.tex +citeproc example.aux +pdflatex example.tex +``` + + +## License + +The LaTeX package and Lua library are released under MIT license. +The CSL locale files and styles are redistributed under the [Creative Commons Attribution-ShareAlike 3.0 Unported license](https://creativecommons.org/licenses/by-sa/3.0/). diff --git a/doc/citation-style-language-doc.tex b/doc/citation-style-language-doc.tex index 92e44dda..87bdfacb 100644 --- a/doc/citation-style-language-doc.tex +++ b/doc/citation-style-language-doc.tex @@ -43,7 +43,7 @@ }% } -\date{2021-12-18 v0.1.0} +\date{2022-01-22 v0.1.0} \maketitle @@ -66,7 +66,7 @@ \section{Introduction} citations and bibliography according to the selected CSL style. A LaTeX package (\file{citation-style-language.sty}) is provided to communicate with the processor. -Note that this project is in early development stage and some feature of CSL +Note that this project is in early development stage and some features of CSL are not implemented yet (especially collapsing and disambiguation). Comments, suggestions, and bug reports are welcome. @@ -166,8 +166,8 @@ \section{Package commands} \DescribeOption{locale} The \opt{locale} option receives an ISO 639-1 two-letter language code -(e.g. ``\opt{en}'', ``\opt{zh}''), optionally with a two-letter locale code -(e.g. ``\opt{de-DE}'', ``\opt{de-AT}''). +(e.g., ``\opt{en}'', ``\opt{zh}''), optionally with a two-letter locale code +(e.g., ``\opt{de-DE}'', ``\opt{de-AT}''). This option affects sorting of the entries and the output of dates, numbers, and terms (e.g., ``et al.''). It may also be set \opt{auto} (default) and the \opt{default-locale} attribute in @@ -344,7 +344,7 @@ \section{Known issues} This is because little care has been taken in the development so far. Optimization is needed in the future. \item When used with \pkg{hyperref}, the citations are not correctly rendered - as hyper links. + as hyperlinks. \item The Unicode sorting method is provided by \pkg{lua-uca} package and CJK scripts are not supported so far. \end{itemize} diff --git a/latex/citation-style-language.sty b/latex/citation-style-language.sty index d01e095e..117e9c84 100644 --- a/latex/citation-style-language.sty +++ b/latex/citation-style-language.sty @@ -5,7 +5,7 @@ \NeedsTeXFormat{LaTeX2e} \RequirePackage{expl3} \RequirePackage{xparse} -\ProvidesExplPackage {citation-style-language} {2021-12-18} {v0.1.0} +\ProvidesExplPackage {citation-style-language} {2022-01-22} {v0.1.0} {Citation Style Language for LaTeX} % \msg_new:nnn { citation-style-language } { require-luatex }