Skip to content

Commit

Permalink
Add README.md for CTAN
Browse files Browse the repository at this point in the history
  • Loading branch information
zepinglee committed Jan 21, 2022
1 parent 283fbae commit b748585
Show file tree
Hide file tree
Showing 6 changed files with 85 additions and 17 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
22 changes: 15 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
7 changes: 4 additions & 3 deletions build.lua
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ tagfiles = {
"doc/citeproc.1",
"CHANGELOG.md",
}
textfiles = {"doc/README.md", "CHANGELOG.md"}
typesetfiles = {"*.tex"}

includetests = {}
Expand Down Expand Up @@ -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
59 changes: 59 additions & 0 deletions doc/README.md
Original file line number Diff line number Diff line change
@@ -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/).
10 changes: 5 additions & 5 deletions doc/citation-style-language-doc.tex
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
}%
}

\date{2021-12-18 v0.1.0}
\date{2022-01-22 v0.1.0}

\maketitle

Expand All @@ -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.

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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}
Expand Down
2 changes: 1 addition & 1 deletion latex/citation-style-language.sty
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down

0 comments on commit b748585

Please sign in to comment.