summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-04-14 03:01:48 +0000
committerNorbert Preining <norbert@preining.info>2023-04-14 03:01:48 +0000
commitb17717e3829bc08efb71ec2537d9d894c8b82d45 (patch)
tree42351b1c085da8ee5f80387c2fb9ee00b7a7767a
parentc6d2f94d04f69bb5b2143ef62e7ab90bd3b60212 (diff)
CTAN sync 202304140301
-rw-r--r--FILES.byname383
-rw-r--r--FILES.byname.gzbin2523321 -> 2523377 bytes
-rw-r--r--FILES.last07days304
-rw-r--r--biblio/citation-style-language/CHANGELOG.md16
-rw-r--r--biblio/citation-style-language/citation-style-language-bib.sty714
-rw-r--r--biblio/citation-style-language/citation-style-language-cite.sty524
-rw-r--r--biblio/citation-style-language/citation-style-language-compatible.sty102
-rw-r--r--biblio/citation-style-language/citation-style-language-data.sty10
-rw-r--r--biblio/citation-style-language/citation-style-language-doc.pdfbin231012 -> 231014 bytes
-rw-r--r--biblio/citation-style-language/citation-style-language-doc.tex2
-rw-r--r--biblio/citation-style-language/citation-style-language-init.sty306
-rw-r--r--biblio/citation-style-language/citation-style-language.sty1470
-rw-r--r--biblio/citation-style-language/citeproc-bibtex-data.lua1182
-rw-r--r--biblio/citation-style-language/citeproc-bibtex-parser.lua54
-rw-r--r--biblio/citation-style-language/citeproc-bibtex2csl.lua259
-rw-r--r--biblio/citation-style-language/citeproc-cli.lua90
-rw-r--r--biblio/citation-style-language/citeproc-context.lua22
-rw-r--r--biblio/citation-style-language/citeproc-element.lua21
-rw-r--r--biblio/citation-style-language/citeproc-engine.lua58
-rw-r--r--biblio/citation-style-language/citeproc-ir-node.lua8
-rw-r--r--biblio/citation-style-language/citeproc-latex-core.lua87
-rw-r--r--biblio/citation-style-language/citeproc-latex-data.lua599
-rw-r--r--biblio/citation-style-language/citeproc-latex-parser.lua75
-rw-r--r--biblio/citation-style-language/citeproc-lua.12
-rw-r--r--biblio/citation-style-language/citeproc-node-bibliography.lua44
-rw-r--r--biblio/citation-style-language/citeproc-node-choose.lua19
-rw-r--r--biblio/citation-style-language/citeproc-node-citation.lua57
-rw-r--r--biblio/citation-style-language/citeproc-node-date.lua28
-rw-r--r--biblio/citation-style-language/citeproc-node-group.lua19
-rw-r--r--biblio/citation-style-language/citeproc-node-label.lua26
-rw-r--r--biblio/citation-style-language/citeproc-node-layout.lua19
-rw-r--r--biblio/citation-style-language/citeproc-node-locale.lua14
-rw-r--r--biblio/citation-style-language/citeproc-node-names.lua45
-rw-r--r--biblio/citation-style-language/citeproc-node-number.lua17
-rw-r--r--biblio/citation-style-language/citeproc-node-sort.lua40
-rw-r--r--biblio/citation-style-language/citeproc-node-style.lua38
-rw-r--r--biblio/citation-style-language/citeproc-node-text.lua28
-rw-r--r--biblio/citation-style-language/citeproc-nodes.lua57
-rw-r--r--biblio/citation-style-language/citeproc-output.lua63
-rw-r--r--biblio/citation-style-language/citeproc-unicode.lua107
-rw-r--r--biblio/citation-style-language/citeproc-util.lua192
-rw-r--r--biblio/citation-style-language/citeproc.lua13
-rw-r--r--biblio/ctan-bibdata/ctan.bib16
-rw-r--r--biblio/ctan-bibdata/ctan.pdfbin3665236 -> 3664255 bytes
-rw-r--r--macros/latex/contrib/siunitx/CHANGELOG.md11
-rw-r--r--macros/latex/contrib/siunitx/siunitx-code.pdfbin642304 -> 642810 bytes
-rw-r--r--macros/latex/contrib/siunitx/siunitx-unit.dtx14
-rw-r--r--macros/latex/contrib/siunitx/siunitx.dtx2
-rw-r--r--macros/latex/contrib/siunitx/siunitx.pdfbin691514 -> 691511 bytes
-rw-r--r--macros/luatex/latex/lua-typo/README.md4
-rw-r--r--macros/luatex/latex/lua-typo/doc/lua-typo-demo.pdfbin16859 -> 16859 bytes
-rw-r--r--macros/luatex/latex/lua-typo/doc/lua-typo-fr.pdfbin106404 -> 106400 bytes
-rw-r--r--macros/luatex/latex/lua-typo/doc/lua-typo.pdfbin179022 -> 205259 bytes
-rw-r--r--macros/luatex/latex/lua-typo/lua-typo-2023-03-08.sty1345
-rw-r--r--macros/luatex/latex/lua-typo/source/lua-typo.dtx561
-rw-r--r--systems/texlive/tlnet/tlpkg/installer/ctan-mirrors.pl5
-rw-r--r--systems/texlive/tlnet/tlpkg/texlive.tlpdb63
-rw-r--r--systems/texlive/tlnet/tlpkg/texlive.tlpdb.md52
-rw-r--r--systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha5122
-rw-r--r--systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512.asc14
-rw-r--r--systems/texlive/tlnet/tlpkg/texlive.tlpdb.xzbin2440348 -> 2440632 bytes
-rw-r--r--timestamp2
62 files changed, 6386 insertions, 2769 deletions
diff --git a/FILES.byname b/FILES.byname
index a3a582a813..69c680ecef 100644
--- a/FILES.byname
+++ b/FILES.byname
@@ -86,7 +86,7 @@
2022/09/02 | 16825 | biblio/bibtex/bibtex-x/bibtex.c
2022/05/17 | 68194 | biblio/bibtex/bibtex-x/bibtex.h
2023/02/25 | 4015 | biblio/bibtex/bibtex-x/bibtexu.1
-2023/04/10 | 20399 | biblio/bibtex/bibtex-x/ChangeLog
+2023/04/12 | 20637 | biblio/bibtex/bibtex-x/ChangeLog
2021/06/30 | 4848 | biblio/bibtex/bibtex-x/config.h.in
2007/07/03 | 710 | biblio/bibtex/bibtex-x/configure
2022/04/29 | 1499 | biblio/bibtex/bibtex-x/configure.ac
@@ -113,13 +113,13 @@
2022/04/29 | 10689 | biblio/bibtex/bibtex-x/sysdep.h
2022/05/08 | 1362 | biblio/bibtex/bibtex-x/tests/bibtex8-char.test
2022/04/16 | 847 | biblio/bibtex/bibtex-x/tests/bibtex8-sort.test
-2022/05/08 | 562 | biblio/bibtex/bibtex-x/tests/bibtex8.test
+2023/04/12 | 614 | biblio/bibtex/bibtex-x/tests/bibtex8.test
2022/04/16 | 1531 | biblio/bibtex/bibtex-x/tests/bibtex8u-mem.test
2021/06/21 | 750 | biblio/bibtex/bibtex-x/tests/bibtexu-basic.test
2023/01/29 | 1698 | biblio/bibtex/bibtex-x/tests/bibtexu-char.test
2021/06/21 | 617 | biblio/bibtex/bibtex-x/tests/bibtexu-range.test
2023/01/29 | 896 | biblio/bibtex/bibtex-x/tests/bibtexu-sort.test
-2022/05/08 | 559 | biblio/bibtex/bibtex-x/tests/bibtexu.test
+2023/04/12 | 611 | biblio/bibtex/bibtex-x/tests/bibtexu.test
2021/08/21 | 704 | biblio/bibtex/bibtex-x/tests/bibtexu-yannis.test
2022/04/16 | 61 | biblio/bibtex/bibtex-x/tests/casea.aux
2022/05/08 | 487 | biblio/bibtex/bibtex-x/tests/casea.bbl
@@ -204,7 +204,7 @@
2022/05/22 | 94162 | biblio/bibtex/bibtex-x/utils.c
2022/04/29 | 5163 | biblio/bibtex/bibtex-x/utils.h
2022/05/22 | 3731 | biblio/bibtex/bibtex-x/version.h
-2023/04/11 | 518368 | biblio/bibtex/bibtex-x.zip
+2023/04/13 | 518491 | biblio/bibtex/bibtex-x.zip
1991/09/08 | 918 | biblio/bibtex/contrib/abstyles/a4c.sty
1991/09/28 | 1000 | biblio/bibtex/contrib/abstyles/a4c.tex
1992/05/25 | 17727 | biblio/bibtex/contrib/abstyles/aabbrv.bst
@@ -1942,121 +1942,126 @@
1995/06/20 | 49681 | biblio/bibtex/vms/bibtex.vms-changes
1995/04/14 | 620 | biblio/bibtex/vms/link_bibtex.com
1995/04/14 | 1316 | biblio/bibtex/vms/make_bibtex.com
-2023/04/02 | 10588 | biblio/citation-style-language/american-chemical-society.csl
-2023/04/02 | 11033 | biblio/citation-style-language/american-medical-association.csl
-2023/04/02 | 8052 | biblio/citation-style-language/american-political-science-association.csl
-2023/04/02 | 11456 | biblio/citation-style-language/american-sociological-association.csl
-2023/04/02 | 70022 | biblio/citation-style-language/apa.csl
-2023/04/02 | 4616 | biblio/citation-style-language/CHANGELOG.md
-2023/04/02 | 22973 | biblio/citation-style-language/chicago-author-date.csl
-2023/04/02 | 48969 | biblio/citation-style-language/chicago-fullnote-bibliography.csl
-2023/04/02 | 47419 | biblio/citation-style-language/chicago-note-bibliography.csl
-2023/04/02 | 231012 | biblio/citation-style-language/citation-style-language-doc.pdf
-2023/04/02 | 16634 | biblio/citation-style-language/citation-style-language-doc.tex
-2023/04/02 | 47065 | biblio/citation-style-language/citation-style-language.sty
-2023/04/02 | 8379 | biblio/citation-style-language/citeproc-bibtex2csl.lua
-2023/04/02 | 55944 | biblio/citation-style-language/citeproc-bibtex-data.lua
-2023/04/02 | 13164 | biblio/citation-style-language/citeproc-bibtex-parser.lua
-2023/04/02 | 5588 | biblio/citation-style-language/citeproc-cli.lua
-2023/04/02 | 8442 | biblio/citation-style-language/citeproc-context.lua
-2023/04/02 | 16684 | biblio/citation-style-language/citeproc-element.lua
-2023/04/02 | 29774 | biblio/citation-style-language/citeproc-engine.lua
-2023/04/02 | 4741 | biblio/citation-style-language/citeproc-ir-node.lua
-2023/04/02 | 14774984 | biblio/citation-style-language/citeproc-journal-data.lua
-2023/04/02 | 10978 | biblio/citation-style-language/citeproc-latex-core.lua
-2023/04/02 | 21837 | biblio/citation-style-language/citeproc-latex-data.lua
-2023/04/02 | 4359 | biblio/citation-style-language/citeproc-latex.lua
-2023/04/02 | 17195 | biblio/citation-style-language/citeproc-latex-parser.lua
-2023/04/02 | 344 | biblio/citation-style-language/citeproc.lua
-2023/04/02 | 617 | biblio/citation-style-language/citeproc-lua.1
-2023/04/02 | 256 | biblio/citation-style-language/citeproc-lua.lua
-2023/04/02 | 10962 | biblio/citation-style-language/citeproc-node-bibliography.lua
-2023/04/02 | 7485 | biblio/citation-style-language/citeproc-node-choose.lua
-2023/04/02 | 47944 | biblio/citation-style-language/citeproc-node-citation.lua
-2023/04/02 | 13594 | biblio/citation-style-language/citeproc-node-date.lua
-2023/04/02 | 904 | biblio/citation-style-language/citeproc-node-group.lua
-2023/04/02 | 2766 | biblio/citation-style-language/citeproc-node-label.lua
-2023/04/02 | 1782 | biblio/citation-style-language/citeproc-node-layout.lua
-2023/04/02 | 6123 | biblio/citation-style-language/citeproc-node-locale.lua
-2023/04/02 | 33851 | biblio/citation-style-language/citeproc-node-names.lua
-2023/04/02 | 1675 | biblio/citation-style-language/citeproc-node-number.lua
-2023/04/02 | 1688 | biblio/citation-style-language/citeproc-nodes.lua
-2023/04/02 | 6283 | biblio/citation-style-language/citeproc-node-sort.lua
-2023/04/02 | 4760 | biblio/citation-style-language/citeproc-node-style.lua
-2023/04/02 | 5769 | biblio/citation-style-language/citeproc-node-text.lua
-2023/04/02 | 58721 | biblio/citation-style-language/citeproc-output.lua
-2023/04/02 | 8101 | biblio/citation-style-language/citeproc-unicode.lua
-2023/04/02 | 24528 | biblio/citation-style-language/citeproc-util.lua
-2023/04/02 | 21532 | biblio/citation-style-language/csl-locales-af-ZA.xml
-2023/04/02 | 19916 | biblio/citation-style-language/csl-locales-ar.xml
-2023/04/02 | 24565 | biblio/citation-style-language/csl-locales-bg-BG.xml
-2023/04/02 | 21401 | biblio/citation-style-language/csl-locales-ca-AD.xml
-2023/04/02 | 21678 | biblio/citation-style-language/csl-locales-cs-CZ.xml
-2023/04/02 | 21675 | biblio/citation-style-language/csl-locales-cy-GB.xml
-2023/04/02 | 21569 | biblio/citation-style-language/csl-locales-da-DK.xml
-2023/04/02 | 22317 | biblio/citation-style-language/csl-locales-de-AT.xml
-2023/04/02 | 21780 | biblio/citation-style-language/csl-locales-de-CH.xml
-2023/04/02 | 22242 | biblio/citation-style-language/csl-locales-de-DE.xml
-2023/04/02 | 23123 | biblio/citation-style-language/csl-locales-el-GR.xml
-2023/04/02 | 22454 | biblio/citation-style-language/csl-locales-en-GB.xml
-2023/04/02 | 22609 | biblio/citation-style-language/csl-locales-en-US.xml
-2023/04/02 | 21505 | biblio/citation-style-language/csl-locales-es-CL.xml
-2023/04/02 | 21429 | biblio/citation-style-language/csl-locales-es-ES.xml
-2023/04/02 | 22536 | biblio/citation-style-language/csl-locales-es-MX.xml
-2023/04/02 | 21360 | biblio/citation-style-language/csl-locales-et-EE.xml
-2023/04/02 | 21670 | biblio/citation-style-language/csl-locales-eu.xml
-2023/04/02 | 22436 | biblio/citation-style-language/csl-locales-fa-IR.xml
-2023/04/02 | 21722 | biblio/citation-style-language/csl-locales-fi-FI.xml
-2023/04/02 | 22197 | biblio/citation-style-language/csl-locales-fr-CA.xml
-2023/04/02 | 22444 | biblio/citation-style-language/csl-locales-fr-FR.xml
-2023/04/02 | 21921 | biblio/citation-style-language/csl-locales-he-IL.xml
-2023/04/02 | 24444 | biblio/citation-style-language/csl-locales-hi-IN.xml
-2023/04/02 | 21462 | biblio/citation-style-language/csl-locales-hr-HR.xml
-2023/04/02 | 21565 | biblio/citation-style-language/csl-locales-hu-HU.xml
-2023/04/02 | 21753 | biblio/citation-style-language/csl-locales-id-ID.xml
-2023/04/02 | 21568 | biblio/citation-style-language/csl-locales-is-IS.xml
-2023/04/02 | 23692 | biblio/citation-style-language/csl-locales-it-IT.xml
-2023/04/02 | 21581 | biblio/citation-style-language/csl-locales-ja-JP.xml
-2023/04/02 | 22065 | biblio/citation-style-language/csl-locales-km-KH.xml
-2023/04/02 | 21513 | biblio/citation-style-language/csl-locales-ko-KR.xml
-2023/04/02 | 21401 | biblio/citation-style-language/csl-locales-la.xml
-2023/04/02 | 22851 | biblio/citation-style-language/csl-locales-lt-LT.xml
-2023/04/02 | 23592 | biblio/citation-style-language/csl-locales-lv-LV.xml
-2023/04/02 | 22040 | biblio/citation-style-language/csl-locales-mn-MN.xml
-2023/04/02 | 18699 | biblio/citation-style-language/csl-locales-nb-NO.xml
-2023/04/02 | 22456 | biblio/citation-style-language/csl-locales-nl-NL.xml
-2023/04/02 | 18645 | biblio/citation-style-language/csl-locales-nn-NO.xml
-2023/04/02 | 21545 | biblio/citation-style-language/csl-locales-pl-PL.xml
-2023/04/02 | 22865 | biblio/citation-style-language/csl-locales-pt-BR.xml
-2023/04/02 | 22715 | biblio/citation-style-language/csl-locales-pt-PT.xml
-2023/04/02 | 21561 | biblio/citation-style-language/csl-locales-ro-RO.xml
-2023/04/02 | 25814 | biblio/citation-style-language/csl-locales-ru-RU.xml
-2023/04/02 | 21673 | biblio/citation-style-language/csl-locales-sk-SK.xml
-2023/04/02 | 21429 | biblio/citation-style-language/csl-locales-sl-SI.xml
-2023/04/02 | 22221 | biblio/citation-style-language/csl-locales-sr-RS.xml
-2023/04/02 | 21814 | biblio/citation-style-language/csl-locales-sv-SE.xml
-2023/04/02 | 23566 | biblio/citation-style-language/csl-locales-th-TH.xml
-2023/04/02 | 21734 | biblio/citation-style-language/csl-locales-tr-TR.xml
-2023/04/02 | 20846 | biblio/citation-style-language/csl-locales-uk-UA.xml
-2023/04/02 | 21911 | biblio/citation-style-language/csl-locales-vi-VN.xml
-2023/04/02 | 19161 | biblio/citation-style-language/csl-locales-zh-CN.xml
-2023/04/02 | 19522 | biblio/citation-style-language/csl-locales-zh-TW.xml
-2023/04/02 | 221 | biblio/citation-style-language/DEPENDS.txt
-2023/04/02 | 8128 | biblio/citation-style-language/elsevier-harvard.csl
-2023/04/02 | 10723 | biblio/citation-style-language/harvard-cite-them-right.csl
-2023/04/02 | 15952 | biblio/citation-style-language/ieee.csl
-2023/04/02 | 16063 | biblio/citation-style-language/modern-humanities-research-association.csl
-2023/04/02 | 11209 | biblio/citation-style-language/modern-language-association.csl
-2023/04/02 | 5288 | biblio/citation-style-language/nature.csl
-2023/04/02 | 1675 | biblio/citation-style-language/README.md
-2023/04/02 | 11957 | biblio/citation-style-language/vancouver.csl
-2023/04/03 | 4503971 | biblio/citation-style-language.zip
-2023/04/12 | 1678 | biblio/ctan-bibdata/biblatex-ctan/ctan.bbx
+2023/04/13 | 10588 | biblio/citation-style-language/american-chemical-society.csl
+2023/04/13 | 11033 | biblio/citation-style-language/american-medical-association.csl
+2023/04/13 | 8052 | biblio/citation-style-language/american-political-science-association.csl
+2023/04/13 | 11456 | biblio/citation-style-language/american-sociological-association.csl
+2023/04/13 | 70022 | biblio/citation-style-language/apa.csl
+2023/04/13 | 5131 | biblio/citation-style-language/CHANGELOG.md
+2023/04/13 | 22973 | biblio/citation-style-language/chicago-author-date.csl
+2023/04/13 | 48969 | biblio/citation-style-language/chicago-fullnote-bibliography.csl
+2023/04/13 | 47419 | biblio/citation-style-language/chicago-note-bibliography.csl
+2023/04/13 | 21405 | biblio/citation-style-language/citation-style-language-bib.sty
+2023/04/13 | 17680 | biblio/citation-style-language/citation-style-language-cite.sty
+2023/04/13 | 2634 | biblio/citation-style-language/citation-style-language-compatible.sty
+2023/04/13 | 263 | biblio/citation-style-language/citation-style-language-data.sty
+2023/04/13 | 231014 | biblio/citation-style-language/citation-style-language-doc.pdf
+2023/04/13 | 16634 | biblio/citation-style-language/citation-style-language-doc.tex
+2023/04/13 | 8672 | biblio/citation-style-language/citation-style-language-init.sty
+2023/04/13 | 3814 | biblio/citation-style-language/citation-style-language.sty
+2023/04/13 | 12889 | biblio/citation-style-language/citeproc-bibtex2csl.lua
+2023/04/13 | 90472 | biblio/citation-style-language/citeproc-bibtex-data.lua
+2023/04/13 | 13576 | biblio/citation-style-language/citeproc-bibtex-parser.lua
+2023/04/13 | 6392 | biblio/citation-style-language/citeproc-cli.lua
+2023/04/13 | 8686 | biblio/citation-style-language/citeproc-context.lua
+2023/04/13 | 16885 | biblio/citation-style-language/citeproc-element.lua
+2023/04/13 | 30278 | biblio/citation-style-language/citeproc-engine.lua
+2023/04/13 | 4805 | biblio/citation-style-language/citeproc-ir-node.lua
+2023/04/13 | 14774984 | biblio/citation-style-language/citeproc-journal-data.lua
+2023/04/13 | 12063 | biblio/citation-style-language/citeproc-latex-core.lua
+2023/04/13 | 23895 | biblio/citation-style-language/citeproc-latex-data.lua
+2023/04/13 | 4359 | biblio/citation-style-language/citeproc-latex.lua
+2023/04/13 | 18504 | biblio/citation-style-language/citeproc-latex-parser.lua
+2023/04/13 | 454 | biblio/citation-style-language/citeproc.lua
+2023/04/13 | 617 | biblio/citation-style-language/citeproc-lua.1
+2023/04/13 | 256 | biblio/citation-style-language/citeproc-lua.lua
+2023/04/13 | 11266 | biblio/citation-style-language/citeproc-node-bibliography.lua
+2023/04/13 | 7698 | biblio/citation-style-language/citeproc-node-choose.lua
+2023/04/13 | 48147 | biblio/citation-style-language/citeproc-node-citation.lua
+2023/04/13 | 13836 | biblio/citation-style-language/citeproc-node-date.lua
+2023/04/13 | 1117 | biblio/citation-style-language/citeproc-node-group.lua
+2023/04/13 | 3028 | biblio/citation-style-language/citeproc-node-label.lua
+2023/04/13 | 1995 | biblio/citation-style-language/citeproc-node-layout.lua
+2023/04/13 | 6262 | biblio/citation-style-language/citeproc-node-locale.lua
+2023/04/13 | 34070 | biblio/citation-style-language/citeproc-node-names.lua
+2023/04/13 | 1886 | biblio/citation-style-language/citeproc-node-number.lua
+2023/04/13 | 2341 | biblio/citation-style-language/citeproc-nodes.lua
+2023/04/13 | 6535 | biblio/citation-style-language/citeproc-node-sort.lua
+2023/04/13 | 5121 | biblio/citation-style-language/citeproc-node-style.lua
+2023/04/13 | 6011 | biblio/citation-style-language/citeproc-node-text.lua
+2023/04/13 | 58886 | biblio/citation-style-language/citeproc-output.lua
+2023/04/13 | 9361 | biblio/citation-style-language/citeproc-unicode.lua
+2023/04/13 | 25270 | biblio/citation-style-language/citeproc-util.lua
+2023/04/13 | 21532 | biblio/citation-style-language/csl-locales-af-ZA.xml
+2023/04/13 | 19916 | biblio/citation-style-language/csl-locales-ar.xml
+2023/04/13 | 24565 | biblio/citation-style-language/csl-locales-bg-BG.xml
+2023/04/13 | 21401 | biblio/citation-style-language/csl-locales-ca-AD.xml
+2023/04/13 | 21678 | biblio/citation-style-language/csl-locales-cs-CZ.xml
+2023/04/13 | 21675 | biblio/citation-style-language/csl-locales-cy-GB.xml
+2023/04/13 | 21569 | biblio/citation-style-language/csl-locales-da-DK.xml
+2023/04/13 | 22317 | biblio/citation-style-language/csl-locales-de-AT.xml
+2023/04/13 | 21780 | biblio/citation-style-language/csl-locales-de-CH.xml
+2023/04/13 | 22242 | biblio/citation-style-language/csl-locales-de-DE.xml
+2023/04/13 | 23123 | biblio/citation-style-language/csl-locales-el-GR.xml
+2023/04/13 | 22454 | biblio/citation-style-language/csl-locales-en-GB.xml
+2023/04/13 | 22609 | biblio/citation-style-language/csl-locales-en-US.xml
+2023/04/13 | 21505 | biblio/citation-style-language/csl-locales-es-CL.xml
+2023/04/13 | 21429 | biblio/citation-style-language/csl-locales-es-ES.xml
+2023/04/13 | 22536 | biblio/citation-style-language/csl-locales-es-MX.xml
+2023/04/13 | 21360 | biblio/citation-style-language/csl-locales-et-EE.xml
+2023/04/13 | 21670 | biblio/citation-style-language/csl-locales-eu.xml
+2023/04/13 | 22436 | biblio/citation-style-language/csl-locales-fa-IR.xml
+2023/04/13 | 21722 | biblio/citation-style-language/csl-locales-fi-FI.xml
+2023/04/13 | 22197 | biblio/citation-style-language/csl-locales-fr-CA.xml
+2023/04/13 | 22444 | biblio/citation-style-language/csl-locales-fr-FR.xml
+2023/04/13 | 21921 | biblio/citation-style-language/csl-locales-he-IL.xml
+2023/04/13 | 24444 | biblio/citation-style-language/csl-locales-hi-IN.xml
+2023/04/13 | 21462 | biblio/citation-style-language/csl-locales-hr-HR.xml
+2023/04/13 | 21565 | biblio/citation-style-language/csl-locales-hu-HU.xml
+2023/04/13 | 21753 | biblio/citation-style-language/csl-locales-id-ID.xml
+2023/04/13 | 21568 | biblio/citation-style-language/csl-locales-is-IS.xml
+2023/04/13 | 23692 | biblio/citation-style-language/csl-locales-it-IT.xml
+2023/04/13 | 21581 | biblio/citation-style-language/csl-locales-ja-JP.xml
+2023/04/13 | 22065 | biblio/citation-style-language/csl-locales-km-KH.xml
+2023/04/13 | 21513 | biblio/citation-style-language/csl-locales-ko-KR.xml
+2023/04/13 | 21401 | biblio/citation-style-language/csl-locales-la.xml
+2023/04/13 | 22851 | biblio/citation-style-language/csl-locales-lt-LT.xml
+2023/04/13 | 23592 | biblio/citation-style-language/csl-locales-lv-LV.xml
+2023/04/13 | 22040 | biblio/citation-style-language/csl-locales-mn-MN.xml
+2023/04/13 | 18699 | biblio/citation-style-language/csl-locales-nb-NO.xml
+2023/04/13 | 22456 | biblio/citation-style-language/csl-locales-nl-NL.xml
+2023/04/13 | 18645 | biblio/citation-style-language/csl-locales-nn-NO.xml
+2023/04/13 | 21545 | biblio/citation-style-language/csl-locales-pl-PL.xml
+2023/04/13 | 22865 | biblio/citation-style-language/csl-locales-pt-BR.xml
+2023/04/13 | 22715 | biblio/citation-style-language/csl-locales-pt-PT.xml
+2023/04/13 | 21561 | biblio/citation-style-language/csl-locales-ro-RO.xml
+2023/04/13 | 25814 | biblio/citation-style-language/csl-locales-ru-RU.xml
+2023/04/13 | 21673 | biblio/citation-style-language/csl-locales-sk-SK.xml
+2023/04/13 | 21429 | biblio/citation-style-language/csl-locales-sl-SI.xml
+2023/04/13 | 22221 | biblio/citation-style-language/csl-locales-sr-RS.xml
+2023/04/13 | 21814 | biblio/citation-style-language/csl-locales-sv-SE.xml
+2023/04/13 | 23566 | biblio/citation-style-language/csl-locales-th-TH.xml
+2023/04/13 | 21734 | biblio/citation-style-language/csl-locales-tr-TR.xml
+2023/04/13 | 20846 | biblio/citation-style-language/csl-locales-uk-UA.xml
+2023/04/13 | 21911 | biblio/citation-style-language/csl-locales-vi-VN.xml
+2023/04/13 | 19161 | biblio/citation-style-language/csl-locales-zh-CN.xml
+2023/04/13 | 19522 | biblio/citation-style-language/csl-locales-zh-TW.xml
+2023/04/13 | 221 | biblio/citation-style-language/DEPENDS.txt
+2023/04/13 | 8128 | biblio/citation-style-language/elsevier-harvard.csl
+2023/04/13 | 10723 | biblio/citation-style-language/harvard-cite-them-right.csl
+2023/04/13 | 15952 | biblio/citation-style-language/ieee.csl
+2023/04/13 | 16063 | biblio/citation-style-language/modern-humanities-research-association.csl
+2023/04/13 | 11209 | biblio/citation-style-language/modern-language-association.csl
+2023/04/13 | 5288 | biblio/citation-style-language/nature.csl
+2023/04/13 | 1675 | biblio/citation-style-language/README.md
+2023/04/13 | 11957 | biblio/citation-style-language/vancouver.csl
+2023/04/13 | 4516625 | biblio/citation-style-language.zip
+2023/04/13 | 1678 | biblio/ctan-bibdata/biblatex-ctan/ctan.bbx
2022/10/08 | 127 | biblio/ctan-bibdata/biblatex-ctan/ctan.cbx
-2023/04/12 | 2777638 | biblio/ctan-bibdata/ctan.bib
-2023/04/12 | 3663764 | biblio/ctan-bibdata/ctan.pdf
+2023/04/13 | 2778051 | biblio/ctan-bibdata/ctan.bib
+2023/04/13 | 3665236 | biblio/ctan-bibdata/ctan.pdf
2023/01/16 | 1489 | biblio/ctan-bibdata/README
-2023/04/12 | 4060985 | biblio/ctan-bibdata.zip
+2023/04/13 | 4062923 | biblio/ctan-bibdata.zip
2023/02/23 | 3126 | biblio/pbibtex/pbibtex-base/cpp.awk
2023/02/23 | 1009 | biblio/pbibtex/pbibtex-base/generate.sh
2023/02/23 | 22362 | biblio/pbibtex/pbibtex-base/jabbrv.bst
@@ -5412,7 +5417,7 @@
1990/10/02 | 5440 | dviware/vutex/vaxvms.hlp
1990/10/02 | 812 | dviware/vutex/vaxvms.ins
1990/10/02 | 127576 | dviware/vutex/vutex.web
-2023/04/12 | 155328 | FILES.last07days
+2023/04/13 | 152418 | FILES.last07days
2021/07/24 | 1139410 | fonts/aboensis/Aboensis.glyphs
2021/07/24 | 18907382 | fonts/aboensis/aboensis.pdf
2021/07/24 | 137860 | fonts/aboensis/Aboensis-Regular.otf
@@ -193604,7 +193609,7 @@
2023/02/02 | 138956 | info/yet-another-guide-latex2e/Yet-Another-Guide-LaTeX2e_v11.tex
2023/02/02 | 914364 | info/yet-another-guide-latex2e.zip
2021/02/04 | 4944311 | install/biblio/bibtex/contrib/gost.tds.zip
-2023/04/02 | 4512654 | install/biblio/citation-style-language.tds.zip
+2023/04/13 | 4525526 | install/biblio/citation-style-language.tds.zip
2022/10/28 | 795249 | install/fonts/accanthis.tds.zip
2009/05/23 | 246025 | install/fonts/ae.tds.zip
2022/09/14 | 38525814 | install/fonts/alegreya.tds.zip
@@ -194049,7 +194054,7 @@
2021/11/10 | 657160 | install/macros/latex/contrib/sdaps.tds.zip
2023/01/27 | 1454133 | install/macros/latex/contrib/se2thesis.tds.zip
2019/12/10 | 544332 | install/macros/latex/contrib/selinput.tds.zip
-2023/04/04 | 1566342 | install/macros/latex/contrib/siunitx.tds.zip
+2023/04/13 | 1566859 | install/macros/latex/contrib/siunitx.tds.zip
2019/10/15 | 315856 | install/macros/latex/contrib/skmath.tds.zip
2019/10/16 | 345652 | install/macros/latex/contrib/skrapport.tds.zip
2016/02/18 | 469004 | install/macros/latex/contrib/splitindex.tds.zip
@@ -201606,7 +201611,7 @@
2013/04/01 | 14776 | macros/context/contrib/context-visualcounter/tex/context/third/visualcounter/t-visualcounter.mkvi
2018/03/05 | 11 | macros/context/contrib/context-visualcounter/VERSION
2018/03/22 | 276789 | macros/context/contrib/context-visualcounter.zip
-2023/04/01 | 113866713 | macros/context/latest/cont-tmf.zip
+2023/04/11 | 113888499 | macros/context/latest/cont-tmf.zip
2016/04/21 | 32846 | macros/cstex/base/cmexb.tar.gz
2016/06/26 | 1728262 | macros/cstex/base/csfonts-t1.tar.gz
2007/03/01 | 187106 | macros/cstex/base/csfonts.tar.gz
@@ -235809,33 +235814,33 @@
2007/12/02 | 2971 | macros/latex/contrib/SIunits/SIunits.ins
2007/12/02 | 328621 | macros/latex/contrib/SIunits/SIunits.pdf
2007/12/02 | 296391 | macros/latex/contrib/SIunits.zip
-2023/04/04 | 72210 | macros/latex/contrib/siunitx/CHANGELOG.md
-2023/04/04 | 996 | macros/latex/contrib/siunitx/README.md
-2023/04/04 | 10931 | macros/latex/contrib/siunitx/siunitx-abbreviation.dtx
-2023/04/04 | 4748 | macros/latex/contrib/siunitx/siunitx-abbreviations.cfg
-2023/04/04 | 17885 | macros/latex/contrib/siunitx/siunitx-angle.dtx
-2023/04/04 | 1729 | macros/latex/contrib/siunitx/siunitx-binary.cfg
-2023/04/04 | 2951 | macros/latex/contrib/siunitx/siunitx-binary.dtx
-2023/04/04 | 642304 | macros/latex/contrib/siunitx/siunitx-code.pdf
-2023/04/04 | 2636 | macros/latex/contrib/siunitx/siunitx-code.tex
-2023/04/04 | 8866 | macros/latex/contrib/siunitx/siunitx-command.dtx
-2023/04/04 | 38160 | macros/latex/contrib/siunitx/siunitx-complex.dtx
-2023/04/04 | 33867 | macros/latex/contrib/siunitx/siunitx-compound.dtx
-2023/04/04 | 21746 | macros/latex/contrib/siunitx/siunitx.dtx
-2023/04/04 | 31776 | macros/latex/contrib/siunitx/siunitx-emulation.dtx
-2023/04/04 | 3687 | macros/latex/contrib/siunitx/siunitx.ins
-2023/04/04 | 5544 | macros/latex/contrib/siunitx/siunitx-locale.dtx
-2023/04/04 | 153028 | macros/latex/contrib/siunitx/siunitx-number.dtx
-2023/04/04 | 691514 | macros/latex/contrib/siunitx/siunitx.pdf
-2023/04/04 | 35994 | macros/latex/contrib/siunitx/siunitx-print.dtx
-2023/04/04 | 14969 | macros/latex/contrib/siunitx/siunitx-quantity.dtx
-2023/04/04 | 9198 | macros/latex/contrib/siunitx/siunitx-symbol.dtx
-2023/04/04 | 54007 | macros/latex/contrib/siunitx/siunitx-table.dtx
-2023/04/04 | 160377 | macros/latex/contrib/siunitx/siunitx.tex
-2023/04/04 | 103304 | macros/latex/contrib/siunitx/siunitx-unit.dtx
-2023/04/04 | 273398 | macros/latex/contrib/siunitx/siunitx-v2.sty
-2023/04/04 | 31738 | macros/latex/contrib/siunitx/siunitx-version-1.cfg
-2023/04/04 | 1520898 | macros/latex/contrib/siunitx.zip
+2023/04/13 | 72443 | macros/latex/contrib/siunitx/CHANGELOG.md
+2023/04/13 | 996 | macros/latex/contrib/siunitx/README.md
+2023/04/13 | 10931 | macros/latex/contrib/siunitx/siunitx-abbreviation.dtx
+2023/04/13 | 4748 | macros/latex/contrib/siunitx/siunitx-abbreviations.cfg
+2023/04/13 | 17885 | macros/latex/contrib/siunitx/siunitx-angle.dtx
+2023/04/13 | 1729 | macros/latex/contrib/siunitx/siunitx-binary.cfg
+2023/04/13 | 2951 | macros/latex/contrib/siunitx/siunitx-binary.dtx
+2023/04/13 | 642810 | macros/latex/contrib/siunitx/siunitx-code.pdf
+2023/04/13 | 2636 | macros/latex/contrib/siunitx/siunitx-code.tex
+2023/04/13 | 8866 | macros/latex/contrib/siunitx/siunitx-command.dtx
+2023/04/13 | 38160 | macros/latex/contrib/siunitx/siunitx-complex.dtx
+2023/04/13 | 33867 | macros/latex/contrib/siunitx/siunitx-compound.dtx
+2023/04/13 | 21746 | macros/latex/contrib/siunitx/siunitx.dtx
+2023/04/13 | 31776 | macros/latex/contrib/siunitx/siunitx-emulation.dtx
+2023/04/13 | 3687 | macros/latex/contrib/siunitx/siunitx.ins
+2023/04/13 | 5544 | macros/latex/contrib/siunitx/siunitx-locale.dtx
+2023/04/13 | 153028 | macros/latex/contrib/siunitx/siunitx-number.dtx
+2023/04/13 | 691511 | macros/latex/contrib/siunitx/siunitx.pdf
+2023/04/13 | 35994 | macros/latex/contrib/siunitx/siunitx-print.dtx
+2023/04/13 | 14969 | macros/latex/contrib/siunitx/siunitx-quantity.dtx
+2023/04/13 | 9198 | macros/latex/contrib/siunitx/siunitx-symbol.dtx
+2023/04/13 | 54007 | macros/latex/contrib/siunitx/siunitx-table.dtx
+2023/04/13 | 160377 | macros/latex/contrib/siunitx/siunitx.tex
+2023/04/13 | 103395 | macros/latex/contrib/siunitx/siunitx-unit.dtx
+2023/04/13 | 273398 | macros/latex/contrib/siunitx/siunitx-v2.sty
+2023/04/13 | 31738 | macros/latex/contrib/siunitx/siunitx-version-1.cfg
+2023/04/13 | 1521403 | macros/latex/contrib/siunitx.zip
2011/06/03 | 662398 | macros/latex/contrib/skb/doc/skb.pdf
2011/03/15 | 1485 | macros/latex/contrib/skb/doc/user-guide/database/acronyms.tex
2011/03/15 | 722 | macros/latex/contrib/skb/doc/user-guide/database/bibliography.tex
@@ -244430,14 +244435,15 @@
2022/09/14 | 17200 | macros/luatex/latex/luatruthtable/luatruthtable.tex
2022/09/14 | 1383 | macros/luatex/latex/luatruthtable/README.txt
2022/09/25 | 101701 | macros/luatex/latex/luatruthtable.zip
-2023/03/09 | 16859 | macros/luatex/latex/lua-typo/doc/lua-typo-demo.pdf
-2021/03/03 | 2997 | macros/luatex/latex/lua-typo/doc/lua-typo-demo.tex
-2023/03/09 | 106404 | macros/luatex/latex/lua-typo/doc/lua-typo-fr.pdf
-2023/03/09 | 179022 | macros/luatex/latex/lua-typo/doc/lua-typo.pdf
-2021/05/22 | 25642 | macros/luatex/latex/lua-typo/lua-typo-2021-04-18.sty
-2023/03/04 | 2904 | macros/luatex/latex/lua-typo/README.md
-2023/03/09 | 113341 | macros/luatex/latex/lua-typo/source/lua-typo.dtx
-2023/03/09 | 299787 | macros/luatex/latex/lua-typo.zip
+2023/04/13 | 16859 | macros/luatex/latex/lua-typo/doc/lua-typo-demo.pdf
+2023/04/13 | 2997 | macros/luatex/latex/lua-typo/doc/lua-typo-demo.tex
+2023/04/13 | 106400 | macros/luatex/latex/lua-typo/doc/lua-typo-fr.pdf
+2023/04/13 | 205259 | macros/luatex/latex/lua-typo/doc/lua-typo.pdf
+2023/04/13 | 25642 | macros/luatex/latex/lua-typo/lua-typo-2021-04-18.sty
+2023/04/13 | 41743 | macros/luatex/latex/lua-typo/lua-typo-2023-03-08.sty
+2023/04/13 | 3005 | macros/luatex/latex/lua-typo/README.md
+2023/04/13 | 116701 | macros/luatex/latex/lua-typo/source/lua-typo.dtx
+2023/04/13 | 333903 | macros/luatex/latex/lua-typo.zip
2022/06/01 | 1432 | macros/luatex/latex/lua-ul/docstrip-luacode.sty
2022/06/01 | 43771 | macros/luatex/latex/lua-ul/lua-ul.dtx
2022/06/01 | 109525 | macros/luatex/latex/lua-ul/lua-ul.pdf
@@ -284486,7 +284492,7 @@
2021/05/03 | 629 | support/TeX4ht/doc/README
2020/08/24 | 358454 | support/TeX4ht/doc/TeX4ht-doc.tex
2021/05/11 | 262 | support/TeX4ht/README
-2023/04/11 | 221829 | support/TeX4ht/source/ChangeLog
+2023/04/12 | 222037 | support/TeX4ht/source/ChangeLog
2021/05/03 | 1375 | support/TeX4ht/source/checklog.lua
2021/05/03 | 1189 | support/TeX4ht/source/common-code.tex
2021/05/03 | 2727 | support/TeX4ht/source/common-info.tex
@@ -284494,11 +284500,11 @@
2021/05/06 | 15 | support/TeX4ht/source/extra-bin/vcss
2021/05/06 | 15 | support/TeX4ht/source/extra-bin/xmllint
2023/02/12 | 28067 | support/TeX4ht/source/Makefile
-2023/04/04 | 8518 | support/TeX4ht/source/mktex4ht-cnf.tex
+2023/04/12 | 8538 | support/TeX4ht/source/mktex4ht-cnf.tex
2021/05/03 | 1121 | support/TeX4ht/source/README
2021/05/03 | 1744 | support/TeX4ht/source/t1fontmake.lua
2021/05/03 | 297 | support/TeX4ht/source/t1fontsample.tex
-2023/04/11 | 1157234 | support/TeX4ht/source/tex4ht-4ht.tex
+2023/04/12 | 1158030 | support/TeX4ht/source/tex4ht-4ht.tex
2021/05/03 | 7127 | support/TeX4ht/source/tex4ht-auto-script.tex
2021/05/16 | 1539 | support/TeX4ht/source/tex4ht-bibtex2.tex
2022/06/05 | 21307 | support/TeX4ht/source/tex4ht-cond4ht.tex
@@ -284527,7 +284533,7 @@
2021/05/03 | 14218 | support/TeX4ht/source/tex4ht-htcmd.tex
2021/05/03 | 70683 | support/TeX4ht/source/tex4ht-html0.tex
2021/05/03 | 164748 | support/TeX4ht/source/tex4ht-html32.tex
-2023/04/08 | 623774 | support/TeX4ht/source/tex4ht-html4.tex
+2023/04/12 | 624141 | support/TeX4ht/source/tex4ht-html4.tex
2023/01/10 | 12023 | support/TeX4ht/source/tex4ht-html5.tex
2021/06/17 | 648233 | support/TeX4ht/source/tex4ht-html-speech.tex
2021/05/03 | 59483 | support/TeX4ht/source/tex4ht-html-speech-xtpipes.tex
@@ -290634,6 +290640,9 @@
2022/01/24 | 386944 | systems/texlive/tlnet/archive/cleveref.doc.r61719.tar.xz
2022/01/24 | 28472 | systems/texlive/tlnet/archive/cleveref.r61719.tar.xz
2022/01/24 | 77476 | systems/texlive/tlnet/archive/cleveref.source.r61719.tar.xz
+2023/04/13 | 312296 | systems/texlive/tlnet/archive/cleveref-usedon.doc.r66833.tar.xz
+2023/04/13 | 3460 | systems/texlive/tlnet/archive/cleveref-usedon.r66833.tar.xz
+2023/04/13 | 8008 | systems/texlive/tlnet/archive/cleveref-usedon.source.r66833.tar.xz
2022/10/05 | 244252 | systems/texlive/tlnet/archive/clicks.doc.r64602.tar.xz
2022/10/05 | 1592 | systems/texlive/tlnet/archive/clicks.r64602.tar.xz
2022/10/05 | 3212 | systems/texlive/tlnet/archive/clicks.source.r64602.tar.xz
@@ -290802,7 +290811,7 @@
2020/03/04 | 408 | systems/texlive/tlnet/archive/collection-langpolish.r54074.tar.xz
2020/03/04 | 392 | systems/texlive/tlnet/archive/collection-langportuguese.r54074.tar.xz
2020/03/07 | 380 | systems/texlive/tlnet/archive/collection-langspanish.r54141.tar.xz
-2023/04/03 | 6844 | systems/texlive/tlnet/archive/collection-latexextra.r66744.tar.xz
+2023/04/13 | 6852 | systems/texlive/tlnet/archive/collection-latexextra.r66833.tar.xz
2022/06/10 | 700 | systems/texlive/tlnet/archive/collection-latex.r63515.tar.xz
2023/01/11 | 744 | systems/texlive/tlnet/archive/collection-latexrecommended.r65512.tar.xz
2023/04/06 | 984 | systems/texlive/tlnet/archive/collection-luatex.r66777.tar.xz
@@ -291696,8 +291705,8 @@
2019/02/28 | 768 | systems/texlive/tlnet/archive/dickimaw.r32925.tar.xz
2019/02/28 | 19784 | systems/texlive/tlnet/archive/dictsym.doc.r20031.tar.xz
2019/02/28 | 31568 | systems/texlive/tlnet/archive/dictsym.r20031.tar.xz
-2023/01/30 | 1328268 | systems/texlive/tlnet/archive/diffcoeff.doc.r65676.tar.xz
-2023/01/30 | 11108 | systems/texlive/tlnet/archive/diffcoeff.r65676.tar.xz
+2023/04/13 | 1335424 | systems/texlive/tlnet/archive/diffcoeff.doc.r66834.tar.xz
+2023/04/13 | 11336 | systems/texlive/tlnet/archive/diffcoeff.r66834.tar.xz
2022/12/06 | 340 | systems/texlive/tlnet/archive/digestif.aarch64-linux.r65210.tar.xz
2022/12/06 | 344 | systems/texlive/tlnet/archive/digestif.amd64-freebsd.r65210.tar.xz
2022/12/06 | 344 | systems/texlive/tlnet/archive/digestif.amd64-netbsd.r65210.tar.xz
@@ -297266,9 +297275,9 @@
2019/02/28 | 3824 | systems/texlive/tlnet/archive/papercdcase.r15878.tar.xz
2019/02/28 | 10444 | systems/texlive/tlnet/archive/papercdcase.source.r15878.tar.xz
2019/02/28 | 128876 | systems/texlive/tlnet/archive/paper.doc.r34521.tar.xz
-2019/02/28 | 409740 | systems/texlive/tlnet/archive/papermas.doc.r23667.tar.xz
-2019/02/28 | 3648 | systems/texlive/tlnet/archive/papermas.r23667.tar.xz
-2019/02/28 | 14044 | systems/texlive/tlnet/archive/papermas.source.r23667.tar.xz
+2023/04/13 | 413200 | systems/texlive/tlnet/archive/papermas.doc.r66835.tar.xz
+2023/04/13 | 3936 | systems/texlive/tlnet/archive/papermas.r66835.tar.xz
+2023/04/13 | 13084 | systems/texlive/tlnet/archive/papermas.source.r66835.tar.xz
2019/02/28 | 8144 | systems/texlive/tlnet/archive/paper.r34521.tar.xz
2019/02/28 | 16644 | systems/texlive/tlnet/archive/paper.source.r34521.tar.xz
2019/02/28 | 437088 | systems/texlive/tlnet/archive/papertex.doc.r19230.tar.xz
@@ -299942,13 +299951,13 @@
2022/02/27 | 108804 | systems/texlive/tlnet/archive/tex4ht.amd64-freebsd.r62206.tar.xz
2023/02/20 | 87356 | systems/texlive/tlnet/archive/tex4ht.amd64-netbsd.r65923.tar.xz
2022/04/21 | 69948 | systems/texlive/tlnet/archive/tex4ht.armhf-linux.r63092.tar.xz
-2023/04/11 | 136384 | systems/texlive/tlnet/archive/tex4ht.doc.r66823.tar.xz
+2023/04/13 | 136384 | systems/texlive/tlnet/archive/tex4ht.doc.r66831.tar.xz
2022/02/27 | 93760 | systems/texlive/tlnet/archive/tex4ht.i386-freebsd.r62206.tar.xz
2022/02/27 | 91280 | systems/texlive/tlnet/archive/tex4ht.i386-linux.r62210.tar.xz
2023/02/20 | 76164 | systems/texlive/tlnet/archive/tex4ht.i386-netbsd.r65923.tar.xz
2022/02/27 | 83964 | systems/texlive/tlnet/archive/tex4ht.i386-solaris.r62206.tar.xz
-2023/04/11 | 1133984 | systems/texlive/tlnet/archive/tex4ht.r66823.tar.xz
-2023/04/11 | 1447948 | systems/texlive/tlnet/archive/tex4ht.source.r66823.tar.xz
+2023/04/13 | 1134256 | systems/texlive/tlnet/archive/tex4ht.r66831.tar.xz
+2023/04/13 | 1451516 | systems/texlive/tlnet/archive/tex4ht.source.r66831.tar.xz
2023/02/20 | 184636 | systems/texlive/tlnet/archive/tex4ht.universal-darwin.r65895.tar.xz
2023/02/20 | 62196 | systems/texlive/tlnet/archive/tex4ht.windows.r65891.tar.xz
2023/03/11 | 58016 | systems/texlive/tlnet/archive/tex4ht.x86_64-cygwin.r66544.tar.xz
@@ -300208,7 +300217,7 @@
2022/09/13 | 600 | systems/texlive/tlnet/archive/texlive-scripts.amd64-freebsd.r64356.tar.xz
2022/09/13 | 596 | systems/texlive/tlnet/archive/texlive-scripts.amd64-netbsd.r64356.tar.xz
2022/09/13 | 596 | systems/texlive/tlnet/archive/texlive-scripts.armhf-linux.r64356.tar.xz
-2023/04/12 | 423760 | systems/texlive/tlnet/archive/texlive-scripts.doc.r66825.tar.xz
+2023/04/13 | 423760 | systems/texlive/tlnet/archive/texlive-scripts.doc.r66830.tar.xz
2020/01/27 | 916 | systems/texlive/tlnet/archive/texlive-scripts-extra.aarch64-linux.r53577.tar.xz
2020/01/27 | 924 | systems/texlive/tlnet/archive/texlive-scripts-extra.amd64-freebsd.r53577.tar.xz
2020/01/27 | 916 | systems/texlive/tlnet/archive/texlive-scripts-extra.amd64-netbsd.r53577.tar.xz
@@ -300230,7 +300239,7 @@
2022/09/13 | 592 | systems/texlive/tlnet/archive/texlive-scripts.i386-linux.r64356.tar.xz
2022/09/13 | 596 | systems/texlive/tlnet/archive/texlive-scripts.i386-netbsd.r64356.tar.xz
2022/09/13 | 596 | systems/texlive/tlnet/archive/texlive-scripts.i386-solaris.r64356.tar.xz
-2023/04/12 | 114020 | systems/texlive/tlnet/archive/texlive-scripts.r66825.tar.xz
+2023/04/13 | 114032 | systems/texlive/tlnet/archive/texlive-scripts.r66830.tar.xz
2022/09/13 | 580 | systems/texlive/tlnet/archive/texlive-scripts.universal-darwin.r64356.tar.xz
2023/03/08 | 60300 | systems/texlive/tlnet/archive/texlive-scripts.windows.r66427.tar.xz
2022/09/13 | 596 | systems/texlive/tlnet/archive/texlive-scripts.x86_64-cygwin.r64356.tar.xz
@@ -302086,16 +302095,16 @@
2020/07/18 | 47816 | systems/texlive/tlnet/archive/zztex.doc.r55862.tar.xz
2020/07/18 | 101724 | systems/texlive/tlnet/archive/zztex.r55862.tar.xz
2023/03/12 | 125532 | systems/texlive/tlnet/install-tl
-2023/04/12 | 5735802 | systems/texlive/tlnet/install-tl-unx.tar.gz
-2023/04/12 | 152 | systems/texlive/tlnet/install-tl-unx.tar.gz.sha512
-2023/04/12 | 455 | systems/texlive/tlnet/install-tl-unx.tar.gz.sha512.asc
+2023/04/13 | 5735793 | systems/texlive/tlnet/install-tl-unx.tar.gz
+2023/04/13 | 152 | systems/texlive/tlnet/install-tl-unx.tar.gz.sha512
+2023/04/13 | 455 | systems/texlive/tlnet/install-tl-unx.tar.gz.sha512.asc
2023/02/19 | 5098 | systems/texlive/tlnet/install-tl-windows.bat
-2023/04/12 | 21037008 | systems/texlive/tlnet/install-tl-windows.exe
-2023/04/12 | 153 | systems/texlive/tlnet/install-tl-windows.exe.sha512
-2023/04/12 | 455 | systems/texlive/tlnet/install-tl-windows.exe.sha512.asc
-2023/04/12 | 26025653 | systems/texlive/tlnet/install-tl.zip
-2023/04/12 | 145 | systems/texlive/tlnet/install-tl.zip.sha512
-2023/04/12 | 455 | systems/texlive/tlnet/install-tl.zip.sha512.asc
+2023/04/13 | 21036879 | systems/texlive/tlnet/install-tl-windows.exe
+2023/04/13 | 153 | systems/texlive/tlnet/install-tl-windows.exe.sha512
+2023/04/13 | 455 | systems/texlive/tlnet/install-tl-windows.exe.sha512.asc
+2023/04/13 | 26025656 | systems/texlive/tlnet/install-tl.zip
+2023/04/13 | 145 | systems/texlive/tlnet/install-tl.zip.sha512
+2023/04/13 | 455 | systems/texlive/tlnet/install-tl.zip.sha512.asc
2023/03/19 | 1229 | systems/texlive/tlnet/README.md
2023/03/19 | 0 | systems/texlive/tlnet/TEXLIVE_2023
2023/01/17 | 8401 | systems/texlive/tlnet/tlpkg/gpg/pubring.gpg
@@ -302105,7 +302114,7 @@
2023/01/17 | 1280 | systems/texlive/tlnet/tlpkg/gpg/trustdb.gpg
2023/01/17 | 49938 | systems/texlive/tlnet/tlpkg/installer/config.guess
2010/11/11 | 11651 | systems/texlive/tlnet/tlpkg/installer/COPYING.MinGW-runtime.txt
-2023/04/11 | 7199 | systems/texlive/tlnet/tlpkg/installer/ctan-mirrors.pl
+2023/04/12 | 7194 | systems/texlive/tlnet/tlpkg/installer/ctan-mirrors.pl
2023/01/11 | 216583 | systems/texlive/tlnet/tlpkg/installer/curl/curl-ca-bundle.crt
2020/04/15 | 2606592 | systems/texlive/tlnet/tlpkg/installer/curl/curl.exe
2017/04/16 | 2629 | systems/texlive/tlnet/tlpkg/installer/installer-options.txt
@@ -302147,12 +302156,12 @@
2023/02/21 | 20371 | systems/texlive/tlnet/tlpkg/TeXLive/TLCrypto.pm
2021/12/21 | 5429 | systems/texlive/tlnet/tlpkg/TeXLive/TLDownload.pm
2023/04/08 | 28167 | systems/texlive/tlnet/tlpkg/TeXLive/TLPaper.pm
-2023/04/12 | 18038055 | systems/texlive/tlnet/tlpkg/texlive.tlpdb
-2023/04/12 | 48 | systems/texlive/tlnet/tlpkg/texlive.tlpdb.md5
+2023/04/13 | 18040801 | systems/texlive/tlnet/tlpkg/texlive.tlpdb
+2023/04/13 | 48 | systems/texlive/tlnet/tlpkg/texlive.tlpdb.md5
2023/02/20 | 86803 | systems/texlive/tlnet/tlpkg/TeXLive/TLPDB.pm
-2023/04/12 | 144 | systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512
-2023/04/12 | 455 | systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512.asc
-2023/04/12 | 2440232 | systems/texlive/tlnet/tlpkg/texlive.tlpdb.xz
+2023/04/13 | 144 | systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512
+2023/04/13 | 455 | systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512.asc
+2023/04/13 | 2440348 | systems/texlive/tlnet/tlpkg/texlive.tlpdb.xz
2023/02/20 | 58928 | systems/texlive/tlnet/tlpkg/TeXLive/TLPOBJ.pm
2023/02/26 | 42350 | systems/texlive/tlnet/tlpkg/TeXLive/TLPSRC.pm
2023/02/21 | 16138 | systems/texlive/tlnet/tlpkg/TeXLive/TLTREE.pm
@@ -312556,7 +312565,7 @@
2014/07/05 | 611 | systems/win32/yandy/README
2014/07/05 | 1004628 | systems/win32/yandy/yandy-src.tar.xz
2014/07/05 | 1012416 | systems/win32/yandy.zip
-2023/04/13 | 186 | timestamp
+2023/04/14 | 186 | timestamp
2002/08/26 | 61898 | usergrps/dante/antrag.pdf
2002/08/26 | 118217 | usergrps/dante/antrag.ps
2021/11/11 | 917 | usergrps/dante/dtk/doc/beispiel.bib
diff --git a/FILES.byname.gz b/FILES.byname.gz
index d4ca56892d..a47260c340 100644
--- a/FILES.byname.gz
+++ b/FILES.byname.gz
Binary files differ
diff --git a/FILES.last07days b/FILES.last07days
index 4214b79aa4..6c3f3c9c0c 100644
--- a/FILES.last07days
+++ b/FILES.last07days
@@ -1,25 +1,206 @@
+2023/04/13 | 996 | macros/latex/contrib/siunitx/README.md
+2023/04/13 | 9361 | biblio/citation-style-language/citeproc-unicode.lua
+2023/04/13 | 9198 | macros/latex/contrib/siunitx/siunitx-symbol.dtx
+2023/04/13 | 90472 | biblio/citation-style-language/citeproc-bibtex-data.lua
+2023/04/13 | 8866 | macros/latex/contrib/siunitx/siunitx-command.dtx
+2023/04/13 | 8686 | biblio/citation-style-language/citeproc-context.lua
+2023/04/13 | 8672 | biblio/citation-style-language/citation-style-language-init.sty
+2023/04/13 | 8128 | biblio/citation-style-language/elsevier-harvard.csl
+2023/04/13 | 8052 | biblio/citation-style-language/american-political-science-association.csl
+2023/04/13 | 8008 | systems/texlive/tlnet/archive/cleveref-usedon.source.r66833.tar.xz
+2023/04/13 | 7698 | biblio/citation-style-language/citeproc-node-choose.lua
+2023/04/13 | 72443 | macros/latex/contrib/siunitx/CHANGELOG.md
+2023/04/13 | 70022 | biblio/citation-style-language/apa.csl
+2023/04/13 | 691511 | macros/latex/contrib/siunitx/siunitx.pdf
+2023/04/13 | 6852 | systems/texlive/tlnet/archive/collection-latexextra.r66833.tar.xz
+2023/04/13 | 6535 | biblio/citation-style-language/citeproc-node-sort.lua
+2023/04/13 | 642810 | macros/latex/contrib/siunitx/siunitx-code.pdf
+2023/04/13 | 6392 | biblio/citation-style-language/citeproc-cli.lua
+2023/04/13 | 6262 | biblio/citation-style-language/citeproc-node-locale.lua
+2023/04/13 | 617 | biblio/citation-style-language/citeproc-lua.1
+2023/04/13 | 6011 | biblio/citation-style-language/citeproc-node-text.lua
+2023/04/13 | 58886 | biblio/citation-style-language/citeproc-output.lua
+2023/04/13 | 5735793 | systems/texlive/tlnet/install-tl-unx.tar.gz
+2023/04/13 | 5544 | macros/latex/contrib/siunitx/siunitx-locale.dtx
+2023/04/13 | 54007 | macros/latex/contrib/siunitx/siunitx-table.dtx
+2023/04/13 | 5288 | biblio/citation-style-language/nature.csl
+2023/04/13 | 518491 | biblio/bibtex/bibtex-x.zip
+2023/04/13 | 5131 | biblio/citation-style-language/CHANGELOG.md
+2023/04/13 | 5121 | biblio/citation-style-language/citeproc-node-style.lua
+2023/04/13 | 48 | systems/texlive/tlnet/tlpkg/texlive.tlpdb.md5
+2023/04/13 | 48969 | biblio/citation-style-language/chicago-fullnote-bibliography.csl
+2023/04/13 | 48147 | biblio/citation-style-language/citeproc-node-citation.lua
+2023/04/13 | 4805 | biblio/citation-style-language/citeproc-ir-node.lua
+2023/04/13 | 4748 | macros/latex/contrib/siunitx/siunitx-abbreviations.cfg
+2023/04/13 | 47419 | biblio/citation-style-language/chicago-note-bibliography.csl
+2023/04/13 | 455 | systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512.asc
+2023/04/13 | 455 | systems/texlive/tlnet/install-tl.zip.sha512.asc
+2023/04/13 | 455 | systems/texlive/tlnet/install-tl-windows.exe.sha512.asc
+2023/04/13 | 455 | systems/texlive/tlnet/install-tl-unx.tar.gz.sha512.asc
+2023/04/13 | 454 | biblio/citation-style-language/citeproc.lua
+2023/04/13 | 4525526 | install/biblio/citation-style-language.tds.zip
+2023/04/13 | 4516625 | biblio/citation-style-language.zip
+2023/04/13 | 4359 | biblio/citation-style-language/citeproc-latex.lua
+2023/04/13 | 423760 | systems/texlive/tlnet/archive/texlive-scripts.doc.r66830.tar.xz
+2023/04/13 | 41743 | macros/luatex/latex/lua-typo/lua-typo-2023-03-08.sty
+2023/04/13 | 413200 | systems/texlive/tlnet/archive/papermas.doc.r66835.tar.xz
+2023/04/13 | 4062923 | biblio/ctan-bibdata.zip
+2023/04/13 | 3936 | systems/texlive/tlnet/archive/papermas.r66835.tar.xz
+2023/04/13 | 38160 | macros/latex/contrib/siunitx/siunitx-complex.dtx
+2023/04/13 | 3814 | biblio/citation-style-language/citation-style-language.sty
+2023/04/13 | 3687 | macros/latex/contrib/siunitx/siunitx.ins
+2023/04/13 | 3665236 | biblio/ctan-bibdata/ctan.pdf
+2023/04/13 | 35994 | macros/latex/contrib/siunitx/siunitx-print.dtx
+2023/04/13 | 3460 | systems/texlive/tlnet/archive/cleveref-usedon.r66833.tar.xz
+2023/04/13 | 34070 | biblio/citation-style-language/citeproc-node-names.lua
+2023/04/13 | 33867 | macros/latex/contrib/siunitx/siunitx-compound.dtx
+2023/04/13 | 333903 | macros/luatex/latex/lua-typo.zip
+2023/04/13 | 31776 | macros/latex/contrib/siunitx/siunitx-emulation.dtx
+2023/04/13 | 31738 | macros/latex/contrib/siunitx/siunitx-version-1.cfg
+2023/04/13 | 312296 | systems/texlive/tlnet/archive/cleveref-usedon.doc.r66833.tar.xz
+2023/04/13 | 3028 | biblio/citation-style-language/citeproc-node-label.lua
+2023/04/13 | 30278 | biblio/citation-style-language/citeproc-engine.lua
+2023/04/13 | 3005 | macros/luatex/latex/lua-typo/README.md
+2023/04/13 | 2997 | macros/luatex/latex/lua-typo/doc/lua-typo-demo.tex
+2023/04/13 | 2951 | macros/latex/contrib/siunitx/siunitx-binary.dtx
+2023/04/13 | 2778051 | biblio/ctan-bibdata/ctan.bib
+2023/04/13 | 273398 | macros/latex/contrib/siunitx/siunitx-v2.sty
+2023/04/13 | 263 | biblio/citation-style-language/citation-style-language-data.sty
+2023/04/13 | 2636 | macros/latex/contrib/siunitx/siunitx-code.tex
+2023/04/13 | 2634 | biblio/citation-style-language/citation-style-language-compatible.sty
+2023/04/13 | 26025656 | systems/texlive/tlnet/install-tl.zip
+2023/04/13 | 25814 | biblio/citation-style-language/csl-locales-ru-RU.xml
+2023/04/13 | 256 | biblio/citation-style-language/citeproc-lua.lua
+2023/04/13 | 25642 | macros/luatex/latex/lua-typo/lua-typo-2021-04-18.sty
+2023/04/13 | 25270 | biblio/citation-style-language/citeproc-util.lua
+2023/04/13 | 24565 | biblio/citation-style-language/csl-locales-bg-BG.xml
+2023/04/13 | 24444 | biblio/citation-style-language/csl-locales-hi-IN.xml
+2023/04/13 | 2440348 | systems/texlive/tlnet/tlpkg/texlive.tlpdb.xz
+2023/04/13 | 23895 | biblio/citation-style-language/citeproc-latex-data.lua
+2023/04/13 | 23692 | biblio/citation-style-language/csl-locales-it-IT.xml
+2023/04/13 | 23592 | biblio/citation-style-language/csl-locales-lv-LV.xml
+2023/04/13 | 23566 | biblio/citation-style-language/csl-locales-th-TH.xml
+2023/04/13 | 2341 | biblio/citation-style-language/citeproc-nodes.lua
+2023/04/13 | 23123 | biblio/citation-style-language/csl-locales-el-GR.xml
+2023/04/13 | 231014 | biblio/citation-style-language/citation-style-language-doc.pdf
+2023/04/13 | 22973 | biblio/citation-style-language/chicago-author-date.csl
+2023/04/13 | 22865 | biblio/citation-style-language/csl-locales-pt-BR.xml
+2023/04/13 | 22851 | biblio/citation-style-language/csl-locales-lt-LT.xml
+2023/04/13 | 22715 | biblio/citation-style-language/csl-locales-pt-PT.xml
+2023/04/13 | 22609 | biblio/citation-style-language/csl-locales-en-US.xml
+2023/04/13 | 22536 | biblio/citation-style-language/csl-locales-es-MX.xml
+2023/04/13 | 22456 | biblio/citation-style-language/csl-locales-nl-NL.xml
+2023/04/13 | 22454 | biblio/citation-style-language/csl-locales-en-GB.xml
+2023/04/13 | 22444 | biblio/citation-style-language/csl-locales-fr-FR.xml
+2023/04/13 | 22436 | biblio/citation-style-language/csl-locales-fa-IR.xml
+2023/04/13 | 22317 | biblio/citation-style-language/csl-locales-de-AT.xml
+2023/04/13 | 22242 | biblio/citation-style-language/csl-locales-de-DE.xml
+2023/04/13 | 22221 | biblio/citation-style-language/csl-locales-sr-RS.xml
+2023/04/13 | 221 | biblio/citation-style-language/DEPENDS.txt
+2023/04/13 | 22197 | biblio/citation-style-language/csl-locales-fr-CA.xml
+2023/04/13 | 22065 | biblio/citation-style-language/csl-locales-km-KH.xml
+2023/04/13 | 22040 | biblio/citation-style-language/csl-locales-mn-MN.xml
+2023/04/13 | 21921 | biblio/citation-style-language/csl-locales-he-IL.xml
+2023/04/13 | 21911 | biblio/citation-style-language/csl-locales-vi-VN.xml
+2023/04/13 | 21814 | biblio/citation-style-language/csl-locales-sv-SE.xml
+2023/04/13 | 21780 | biblio/citation-style-language/csl-locales-de-CH.xml
+2023/04/13 | 21753 | biblio/citation-style-language/csl-locales-id-ID.xml
+2023/04/13 | 21746 | macros/latex/contrib/siunitx/siunitx.dtx
+2023/04/13 | 21734 | biblio/citation-style-language/csl-locales-tr-TR.xml
+2023/04/13 | 21722 | biblio/citation-style-language/csl-locales-fi-FI.xml
+2023/04/13 | 21678 | biblio/citation-style-language/csl-locales-cs-CZ.xml
+2023/04/13 | 21675 | biblio/citation-style-language/csl-locales-cy-GB.xml
+2023/04/13 | 21673 | biblio/citation-style-language/csl-locales-sk-SK.xml
+2023/04/13 | 21670 | biblio/citation-style-language/csl-locales-eu.xml
+2023/04/13 | 21581 | biblio/citation-style-language/csl-locales-ja-JP.xml
+2023/04/13 | 21569 | biblio/citation-style-language/csl-locales-da-DK.xml
+2023/04/13 | 21568 | biblio/citation-style-language/csl-locales-is-IS.xml
+2023/04/13 | 21565 | biblio/citation-style-language/csl-locales-hu-HU.xml
+2023/04/13 | 21561 | biblio/citation-style-language/csl-locales-ro-RO.xml
+2023/04/13 | 21545 | biblio/citation-style-language/csl-locales-pl-PL.xml
+2023/04/13 | 21532 | biblio/citation-style-language/csl-locales-af-ZA.xml
+2023/04/13 | 21513 | biblio/citation-style-language/csl-locales-ko-KR.xml
+2023/04/13 | 21505 | biblio/citation-style-language/csl-locales-es-CL.xml
+2023/04/13 | 21462 | biblio/citation-style-language/csl-locales-hr-HR.xml
+2023/04/13 | 21429 | biblio/citation-style-language/csl-locales-sl-SI.xml
+2023/04/13 | 21429 | biblio/citation-style-language/csl-locales-es-ES.xml
+2023/04/13 | 21405 | biblio/citation-style-language/citation-style-language-bib.sty
+2023/04/13 | 21401 | biblio/citation-style-language/csl-locales-la.xml
+2023/04/13 | 21401 | biblio/citation-style-language/csl-locales-ca-AD.xml
+2023/04/13 | 21360 | biblio/citation-style-language/csl-locales-et-EE.xml
+2023/04/13 | 21036879 | systems/texlive/tlnet/install-tl-windows.exe
+2023/04/13 | 20846 | biblio/citation-style-language/csl-locales-uk-UA.xml
+2023/04/13 | 205259 | macros/luatex/latex/lua-typo/doc/lua-typo.pdf
+2023/04/13 | 1995 | biblio/citation-style-language/citeproc-node-layout.lua
+2023/04/13 | 19916 | biblio/citation-style-language/csl-locales-ar.xml
+2023/04/13 | 19522 | biblio/citation-style-language/csl-locales-zh-TW.xml
+2023/04/13 | 19161 | biblio/citation-style-language/csl-locales-zh-CN.xml
+2023/04/13 | 1886 | biblio/citation-style-language/citeproc-node-number.lua
+2023/04/13 | 18699 | biblio/citation-style-language/csl-locales-nb-NO.xml
+2023/04/13 | 18645 | biblio/citation-style-language/csl-locales-nn-NO.xml
+2023/04/13 | 18504 | biblio/citation-style-language/citeproc-latex-parser.lua
+2023/04/13 | 18040801 | systems/texlive/tlnet/tlpkg/texlive.tlpdb
+2023/04/13 | 17885 | macros/latex/contrib/siunitx/siunitx-angle.dtx
+2023/04/13 | 17680 | biblio/citation-style-language/citation-style-language-cite.sty
+2023/04/13 | 1729 | macros/latex/contrib/siunitx/siunitx-binary.cfg
+2023/04/13 | 16885 | biblio/citation-style-language/citeproc-element.lua
+2023/04/13 | 16859 | macros/luatex/latex/lua-typo/doc/lua-typo-demo.pdf
+2023/04/13 | 1678 | biblio/ctan-bibdata/biblatex-ctan/ctan.bbx
+2023/04/13 | 1675 | biblio/citation-style-language/README.md
+2023/04/13 | 16634 | biblio/citation-style-language/citation-style-language-doc.tex
+2023/04/13 | 16063 | biblio/citation-style-language/modern-humanities-research-association.csl
+2023/04/13 | 160377 | macros/latex/contrib/siunitx/siunitx.tex
+2023/04/13 | 15952 | biblio/citation-style-language/ieee.csl
+2023/04/13 | 1566859 | install/macros/latex/contrib/siunitx.tds.zip
+2023/04/13 | 153 | systems/texlive/tlnet/install-tl-windows.exe.sha512
+2023/04/13 | 153028 | macros/latex/contrib/siunitx/siunitx-number.dtx
+2023/04/13 | 152 | systems/texlive/tlnet/install-tl-unx.tar.gz.sha512
+2023/04/13 | 1521403 | macros/latex/contrib/siunitx.zip
+2023/04/13 | 14969 | macros/latex/contrib/siunitx/siunitx-quantity.dtx
+2023/04/13 | 14774984 | biblio/citation-style-language/citeproc-journal-data.lua
+2023/04/13 | 145 | systems/texlive/tlnet/install-tl.zip.sha512
+2023/04/13 | 1451516 | systems/texlive/tlnet/archive/tex4ht.source.r66831.tar.xz
+2023/04/13 | 144 | systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512
+2023/04/13 | 13836 | biblio/citation-style-language/citeproc-node-date.lua
+2023/04/13 | 136384 | systems/texlive/tlnet/archive/tex4ht.doc.r66831.tar.xz
+2023/04/13 | 13576 | biblio/citation-style-language/citeproc-bibtex-parser.lua
+2023/04/13 | 1335424 | systems/texlive/tlnet/archive/diffcoeff.doc.r66834.tar.xz
+2023/04/13 | 13084 | systems/texlive/tlnet/archive/papermas.source.r66835.tar.xz
+2023/04/13 | 12889 | biblio/citation-style-language/citeproc-bibtex2csl.lua
+2023/04/13 | 12063 | biblio/citation-style-language/citeproc-latex-core.lua
+2023/04/13 | 11957 | biblio/citation-style-language/vancouver.csl
+2023/04/13 | 116701 | macros/luatex/latex/lua-typo/source/lua-typo.dtx
+2023/04/13 | 11456 | biblio/citation-style-language/american-sociological-association.csl
+2023/04/13 | 114032 | systems/texlive/tlnet/archive/texlive-scripts.r66830.tar.xz
+2023/04/13 | 1134256 | systems/texlive/tlnet/archive/tex4ht.r66831.tar.xz
+2023/04/13 | 11336 | systems/texlive/tlnet/archive/diffcoeff.r66834.tar.xz
+2023/04/13 | 11266 | biblio/citation-style-language/citeproc-node-bibliography.lua
+2023/04/13 | 11209 | biblio/citation-style-language/modern-language-association.csl
+2023/04/13 | 1117 | biblio/citation-style-language/citeproc-node-group.lua
+2023/04/13 | 11033 | biblio/citation-style-language/american-medical-association.csl
+2023/04/13 | 10931 | macros/latex/contrib/siunitx/siunitx-abbreviation.dtx
+2023/04/13 | 10723 | biblio/citation-style-language/harvard-cite-them-right.csl
+2023/04/13 | 106400 | macros/luatex/latex/lua-typo/doc/lua-typo-fr.pdf
+2023/04/13 | 10588 | biblio/citation-style-language/american-chemical-society.csl
+2023/04/13 | 103395 | macros/latex/contrib/siunitx/siunitx-unit.dtx
2023/04/12 | 95058 | macros/latex/contrib/lastpage/lastpage.dtx
2023/04/12 | 86457 | macros/latex/contrib/papermas/papermas-example.pdf
+2023/04/12 | 8538 | support/TeX4ht/source/mktex4ht-cnf.tex
2023/04/12 | 833466 | macros/latex/contrib/diffcoeff/diffcoeff.pdf
2023/04/12 | 72912 | systems/texlive/tlnet/archive/latexindent.r66828.tar.xz
+2023/04/12 | 7194 | systems/texlive/tlnet/tlpkg/installer/ctan-mirrors.pl
+2023/04/12 | 624141 | support/TeX4ht/source/tex4ht-html4.tex
+2023/04/12 | 614 | biblio/bibtex/bibtex-x/tests/bibtex8.test
2023/04/12 | 612608 | systems/texlive/tlnet/archive/piton.doc.r66827.tar.xz
+2023/04/12 | 611 | biblio/bibtex/bibtex-x/tests/bibtexu.test
2023/04/12 | 596346 | install/macros/latex/contrib/lastpage.tds.zip
2023/04/12 | 578139 | macros/latex/contrib/lastpage.zip
-2023/04/12 | 5735802 | systems/texlive/tlnet/install-tl-unx.tar.gz
2023/04/12 | 5246 | macros/latex/contrib/lastpage/README
2023/04/12 | 49083 | macros/latex/contrib/papermas/papermas.dtx
-2023/04/12 | 48 | systems/texlive/tlnet/tlpkg/texlive.tlpdb.md5
-2023/04/12 | 455 | systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512.asc
-2023/04/12 | 455 | systems/texlive/tlnet/install-tl.zip.sha512.asc
-2023/04/12 | 455 | systems/texlive/tlnet/install-tl-windows.exe.sha512.asc
-2023/04/12 | 455 | systems/texlive/tlnet/install-tl-unx.tar.gz.sha512.asc
2023/04/12 | 4555 | macros/latex/contrib/papermas/README
2023/04/12 | 444471 | install/macros/latex/contrib/papermas.tds.zip
2023/04/12 | 440853 | macros/latex/contrib/lastpage/lastpage.pdf
2023/04/12 | 435394 | macros/latex/contrib/papermas.zip
-2023/04/12 | 423760 | systems/texlive/tlnet/archive/texlive-scripts.doc.r66825.tar.xz
-2023/04/12 | 4060985 | biblio/ctan-bibdata.zip
-2023/04/12 | 3663764 | biblio/ctan-bibdata/ctan.pdf
2023/04/12 | 36048 | systems/texlive/tlnet/archive/piton.source.r66827.tar.xz
2023/04/12 | 35841 | macros/latex/contrib/diffcoeff/diffcoeff.sty
2023/04/12 | 3546372 | systems/texlive/tlnet/archive/latexindent.windows.r66828.tar.xz
@@ -28,26 +209,18 @@
2023/04/12 | 318914 | macros/latex/contrib/cleveref-usedon/cleveref-usedon.pdf
2023/04/12 | 31596 | systems/texlive/tlnet/archive/photobook.r66826.tar.xz
2023/04/12 | 2953 | macros/latex/contrib/cleveref-usedon/cleveref-usedon.ins
-2023/04/12 | 2777638 | biblio/ctan-bibdata/ctan.bib
2023/04/12 | 2616 | macros/latex/contrib/cleveref-usedon/README.md
-2023/04/12 | 26025653 | systems/texlive/tlnet/install-tl.zip
-2023/04/12 | 2440232 | systems/texlive/tlnet/tlpkg/texlive.tlpdb.xz
2023/04/12 | 24301 | macros/latex/contrib/cleveref-usedon/cleveref-usedon.dtx
-2023/04/12 | 21037008 | systems/texlive/tlnet/install-tl-windows.exe
-2023/04/12 | 18038055 | systems/texlive/tlnet/tlpkg/texlive.tlpdb
-2023/04/12 | 1678 | biblio/ctan-bibdata/biblatex-ctan/ctan.bbx
-2023/04/12 | 153 | systems/texlive/tlnet/install-tl-windows.exe.sha512
+2023/04/12 | 222037 | support/TeX4ht/source/ChangeLog
+2023/04/12 | 20637 | biblio/bibtex/bibtex-x/ChangeLog
2023/04/12 | 153572 | systems/texlive/tlnet/archive/photobook.doc.r66826.tar.xz
-2023/04/12 | 152 | systems/texlive/tlnet/install-tl-unx.tar.gz.sha512
2023/04/12 | 148027 | macros/latex/contrib/diffcoeff/diffcoeff.tex
2023/04/12 | 1466 | macros/latex/contrib/diffcoeff/README.txt
-2023/04/12 | 145 | systems/texlive/tlnet/install-tl.zip.sha512
2023/04/12 | 1451232 | macros/latex/contrib/diffcoeff.zip
-2023/04/12 | 144 | systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512
2023/04/12 | 1320052 | systems/texlive/tlnet/archive/latexindent.doc.r66828.tar.xz
2023/04/12 | 129504 | macros/latex/contrib/lastpage/lastpage-example.pdf
2023/04/12 | 12760 | systems/texlive/tlnet/archive/piton.r66827.tar.xz
-2023/04/12 | 114020 | systems/texlive/tlnet/archive/texlive-scripts.r66825.tar.xz
+2023/04/12 | 1158030 | support/TeX4ht/source/tex4ht-4ht.tex
2023/04/11 | 9 | support/texlab/crates/parser/src/test_data/latex/label/label_reference_simple.txt
2023/04/11 | 9 | support/texlab/crates/parser/src/test_data/latex/glossary/glossary_entry_reference_simple.txt
2023/04/11 | 9 | support/texlab/crates/parser/src/test_data/latex/citation/citation_missing_brace.txt
@@ -129,7 +302,6 @@
2023/04/11 | 7280 | support/latexindent/LatexIndent/MandatoryArgument.pm
2023/04/11 | 721 | support/texlab/crates/texlab/src/features/completion/tikz_library.rs
2023/04/11 | 719 | support/texlab/crates/texlab/tests/lsp/workspace/snapshots/lsp__workspace__symbol__filter_bibtex.snap
-2023/04/11 | 7199 | systems/texlive/tlnet/tlpkg/installer/ctan-mirrors.pl
2023/04/11 | 7196 | support/texlab/crates/texlab/src/features/formatting/bibtex_internal.rs
2023/04/11 | 717 | support/texlab/crates/parser/src/snapshots/parser__latex__tests__parse@include__graphics_include_options.txt.snap
2023/04/11 | 716 | support/texlab/crates/parser/src/snapshots/parser__build_log__tests__parse@001.txt.snap
@@ -225,7 +397,6 @@
2023/04/11 | 521 | support/texlab/crates/texlab/src/features/completion/component_environment.rs
2023/04/11 | 520 | support/texlab/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__formatting__bibtex_internal_wrap_long_lines.snap
2023/04/11 | 520 | support/texlab/crates/parser/src/snapshots/parser__latex__tests__parse@caption__caption_minimal.txt.snap
-2023/04/11 | 518368 | biblio/bibtex/bibtex-x.zip
2023/04/11 | 517 | support/texlab/crates/parser/src/test_data/bibtex/samples/matuz_1990.txt
2023/04/11 | 512 | support/texlab/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__issue_857_1.snap
2023/04/11 | 50 | support/texlab/crates/parser/src/test_data/latex/environment/environment_asymptote.txt
@@ -489,7 +660,6 @@
2023/04/11 | 226 | support/texlab/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__acronym_package_ref.snap
2023/04/11 | 223 | support/texlab/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__completion__component_environment_simple.snap
2023/04/11 | 22210 | support/texlab/crates/citeproc/src/driver.rs
-2023/04/11 | 221829 | support/TeX4ht/source/ChangeLog
2023/04/11 | 2201 | support/texlab/crates/base-db/src/diagnostics/log.rs
2023/04/11 | 21 | support/texlab/crates/parser/src/test_data/latex/theorem_definition/theorem_definition_name_with_description.txt
2023/04/11 | 21 | support/texlab/crates/parser/src/test_data/latex/theorem_definition/theorem_definition_name_with_counter.txt
@@ -596,7 +766,6 @@
2023/04/11 | 1488 | support/texlab/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__document_symbol__section_flat.snap
2023/04/11 | 1485 | support/latexindent/LatexIndent/DoubleBackSlash.pm
2023/04/11 | 1464 | support/texlab/crates/parser/src/snapshots/parser__latex__tests__parse@glossary__acronym_declaration.txt.snap
-2023/04/11 | 1447948 | systems/texlive/tlnet/archive/tex4ht.source.r66823.tar.xz
2023/04/11 | 143 | support/texlab/crates/texlab/tests/lsp/text_document/snapshots/lsp__text_document__formatting__bibtex_internal_string.snap
2023/04/11 | 142873 | macros/latex/contrib/photobook/photobook.pdf
2023/04/11 | 14221 | macros/latex/contrib/photobook/scripts/README.md
@@ -609,7 +778,6 @@
2023/04/11 | 13 | support/texlab/crates/parser/src/test_data/latex/color/color_reference_simple.txt
2023/04/11 | 1398 | support/texlab/crates/citeproc/src/snapshots/citeproc__tests__book_averroes_1998.snap
2023/04/11 | 13890 | support/latexindent/LatexIndent/Special.pm
-2023/04/11 | 136384 | systems/texlive/tlnet/archive/tex4ht.doc.r66823.tar.xz
2023/04/11 | 135 | support/texlab/crates/parser/src/test_data/latex/issue_853.txt
2023/04/11 | 1359 | support/texlab/crates/parser/src/snapshots/parser__latex__tests__parse@glossary__acronym_definition_options.txt.snap
2023/04/11 | 13426 | support/texlab/crates/texlab/tests/lsp/text_document/completion.rs
@@ -652,9 +820,8 @@
2023/04/11 | 1163 | support/texlab/crates/citeproc/src/snapshots/citeproc__tests__inproceedings_combi_2004.snap
2023/04/11 | 1161 | support/texlab/crates/texlab/src/features/definition/label.rs
2023/04/11 | 1157 | support/texlab/crates/texlab/tests/lsp/text_document/document_link.rs
-2023/04/11 | 1157234 | support/TeX4ht/source/tex4ht-4ht.tex
2023/04/11 | 11420 | support/texlab/crates/parser/src/bibtex.rs
-2023/04/11 | 1133984 | systems/texlive/tlnet/archive/tex4ht.r66823.tar.xz
+2023/04/11 | 113888499 | macros/context/latest/cont-tmf.zip
2023/04/11 | 11300 | support/latexindent/LatexIndent/FileContents.pm
2023/04/11 | 1124 | support/texlab/crates/distro/src/language.rs
2023/04/11 | 1121 | support/texlab/crates/parser/src/snapshots/parser__latex__tests__parse@environment__environment_nested.txt.snap
@@ -718,7 +885,6 @@
2023/04/10 | 2473 | macros/latex/contrib/elteiktdk/samples_en/sim.tex
2023/04/10 | 2447124 | systems/texlive/tlnet/archive/metapost.doc.r66815.tar.xz
2023/04/10 | 22224 | systems/texlive/tlnet/archive/nostarch.source.r66812.tar.xz
-2023/04/10 | 20399 | biblio/bibtex/bibtex-x/ChangeLog
2023/04/10 | 193088 | systems/texlive/tlnet/archive/luatexja.r66814.tar.xz
2023/04/10 | 19075 | biblio/bibtex/bibtex-x/tests/substru.bbl
2023/04/10 | 172359 | macros/latex/contrib/elteikthesis/README_hu.pdf
@@ -1032,7 +1198,6 @@
2023/04/08 | 72708 | fonts/gelasio/opentype/Gelasio-Bold.otf
2023/04/08 | 72436 | fonts/gelasio/opentype/Gelasio-Regular.otf
2023/04/08 | 645 | fonts/gelasio/doc/gelasio-samples.tex
-2023/04/08 | 623774 | support/TeX4ht/source/tex4ht-html4.tex
2023/04/08 | 6168 | macros/generic/ifptex/README-ja.md
2023/04/08 | 588 | fonts/gelasio/vf/Gelasio-SemiBoldItalic-tosf-ts1.vf
2023/04/08 | 588 | fonts/gelasio/vf/Gelasio-SemiBoldItalic-tlf-ts1.vf
@@ -1629,84 +1794,3 @@
2023/04/07 | 1090890 | systems/win32/miktex/tm/packages/bithesis__doc.tar.lzma
2023/04/07 | 10124 | systems/win32/miktex/tm/packages/songproj__source.tar.lzma
2023/04/07 | 10001 | macros/latex/contrib/thuthesis/ref/refs.bib
-2023/04/06 | 984 | systems/texlive/tlnet/archive/collection-luatex.r66777.tar.xz
-2023/04/06 | 9746 | graphics/metapost/contrib/macros/mpchess/metapost/mpchess-pgn.mp
-2023/04/06 | 94433 | systems/texlive/tlnet/tlpkg/translations/fr.po
-2023/04/06 | 90624 | systems/texlive/tlnet/tlpkg/translations/vi.po
-2023/04/06 | 89983 | systems/texlive/tlnet/tlpkg/translations/de.po
-2023/04/06 | 895192 | systems/texlive/tlnet/archive/texfindpkg.r66777.tar.xz
-2023/04/06 | 89282 | systems/texlive/tlnet/tlpkg/translations/sk.po
-2023/04/06 | 87939 | systems/texlive/tlnet/tlpkg/translations/it.po
-2023/04/06 | 82791 | systems/texlive/tlnet/tlpkg/translations/pt_BR.po
-2023/04/06 | 82459 | systems/texlive/tlnet/tlpkg/translations/cs.po
-2023/04/06 | 815001 | macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf
-2023/04/06 | 80620 | systems/texlive/tlnet/tlpkg/translations/uk.po
-2023/04/06 | 73548 | systems/texlive/tlnet/archive/cweb.doc.r66770.tar.xz
-2023/04/06 | 70484 | systems/texlive/tlnet/tlpkg/translations/sl.po
-2023/04/06 | 67354 | systems/texlive/tlnet/tlpkg/translations/pl.po
-2023/04/06 | 668 | systems/texlive/tlnet/archive/tlshell.doc.r66771.tar.xz
-2023/04/06 | 6656 | macros/latex/contrib/proflycee/doc/ProfLycee-exemples-pyluatex.tex
-2023/04/06 | 63592 | systems/texlive/tlnet/tlpkg/translations/zh_CN.po
-2023/04/06 | 62 | graphics/metapost/contrib/macros/mpchess/doc/test.fen
-2023/04/06 | 62854 | systems/texlive/tlnet/tlpkg/translations/ja.po
-2023/04/06 | 61459 | systems/texlive/tlnet/tlpkg/translations/zh_TW.po
-2023/04/06 | 60451 | macros/latex/contrib/proflycee/doc/ProfLycee-exemples-pyluatex.pdf
-2023/04/06 | 6012 | macros/latex/contrib/proflycee/tex/proflycee-tools-pythontex.tex
-2023/04/06 | 58302 | systems/texlive/tlnet/tlpkg/translations/nl.po
-2023/04/06 | 5828 | macros/latex/contrib/proflycee/tex/proflycee-tools-piton.tex
-2023/04/06 | 57728 | systems/texlive/tlnet/tlpkg/translations/da.po
-2023/04/06 | 5687 | graphics/metapost/contrib/macros/mpchess/doc/mpchess-preamble.tex
-2023/04/06 | 5600 | systems/texlive/tlnet/archive/lua-tinyyaml.r66776.tar.xz
-2023/04/06 | 537416 | macros/latex/contrib/regstats.zip
-2023/04/06 | 529 | macros/latex/contrib/proflycee/doc/testscript.py
-2023/04/06 | 473020 | systems/texlive/tlnet/archive/tikzducks.doc.r66773.tar.xz
-2023/04/06 | 47295 | systems/texlive/tlnet/tlpkg/translations/messages.pot
-2023/04/06 | 45486 | systems/doc/luatex/luatex-fontloader.tex
-2023/04/06 | 448 | systems/texlive/tlnet/archive/lua-tinyyaml.doc.r66776.tar.xz
-2023/04/06 | 44183 | macros/latex/contrib/proflycee/doc/ProfLycee-exemples-pythontex.pdf
-2023/04/06 | 43388 | graphics/metapost/contrib/macros/mpchess/doc/mpchess-doc-fr.tex
-2023/04/06 | 42 | graphics/metapost/contrib/macros/mpchess/doc/test.pgn
-2023/04/06 | 41667 | graphics/metapost/contrib/macros/mpchess/metapost/mpchess-cburnett.mp
-2023/04/06 | 415 | graphics/metapost/contrib/macros/mpchess/LICENSE
-2023/04/06 | 40646 | graphics/metapost/contrib/macros/mpchess/doc/mpchess-doc-en.tex
-2023/04/06 | 36976 | systems/doc/luatex/luatex-backend.tex
-2023/04/06 | 352 | systems/texlive/tlnet/archive/texfindpkg.x86_64-darwinlegacy.r66777.tar.xz
-2023/04/06 | 348 | systems/texlive/tlnet/archive/texfindpkg.x86_64-linuxmusl.r66777.tar.xz
-2023/04/06 | 344 | systems/texlive/tlnet/archive/texfindpkg.x86_64-linux.r66777.tar.xz
-2023/04/06 | 344 | systems/texlive/tlnet/archive/texfindpkg.x86_64-cygwin.r66777.tar.xz
-2023/04/06 | 344 | systems/texlive/tlnet/archive/texfindpkg.universal-darwin.r66777.tar.xz
-2023/04/06 | 344 | systems/texlive/tlnet/archive/texfindpkg.amd64-freebsd.r66777.tar.xz
-2023/04/06 | 340 | systems/texlive/tlnet/archive/texfindpkg.x86_64-solaris.r66777.tar.xz
-2023/04/06 | 340 | systems/texlive/tlnet/archive/texfindpkg.i386-solaris.r66777.tar.xz
-2023/04/06 | 340 | systems/texlive/tlnet/archive/texfindpkg.i386-netbsd.r66777.tar.xz
-2023/04/06 | 340 | systems/texlive/tlnet/archive/texfindpkg.i386-linux.r66777.tar.xz
-2023/04/06 | 340 | systems/texlive/tlnet/archive/texfindpkg.i386-freebsd.r66777.tar.xz
-2023/04/06 | 340 | systems/texlive/tlnet/archive/texfindpkg.armhf-linux.r66777.tar.xz
-2023/04/06 | 340 | systems/texlive/tlnet/archive/texfindpkg.amd64-netbsd.r66777.tar.xz
-2023/04/06 | 340 | systems/texlive/tlnet/archive/texfindpkg.aarch64-linux.r66777.tar.xz
-2023/04/06 | 33816 | graphics/metapost/contrib/macros/mpchess/metapost/mpchess.mp
-2023/04/06 | 33104 | systems/texlive/tlnet/archive/tlshell.r66771.tar.xz
-2023/04/06 | 3130 | macros/latex/contrib/proflycee/tex/proflycee-tools-minted.tex
-2023/04/06 | 3043 | graphics/metapost/contrib/macros/mpchess/doc/ctan.bib
-2023/04/06 | 24376 | systems/texlive/tlnet/archive/cweb.r66770.tar.xz
-2023/04/06 | 24008 | graphics/metapost/contrib/macros/mpchess/metapost/mpchess-chessboard.mp
-2023/04/06 | 234001 | macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex
-2023/04/06 | 2308 | systems/texlive/tlnet/archive/texfindpkg.windows.r66777.tar.xz
-2023/04/06 | 2264 | graphics/metapost/contrib/macros/mpchess/metapost/mpchess-fen.mp
-2023/04/06 | 2254396 | systems/texlive/tlnet/archive/graph35.doc.r66772.tar.xz
-2023/04/06 | 22284 | systems/texlive/tlnet/archive/graph35.r66772.tar.xz
-2023/04/06 | 22071 | graphics/metapost/contrib/macros/mpchess/metapost/mpchess-pieces.mp
-2023/04/06 | 18896 | systems/texlive/tlnet/archive/tikzducks.r66773.tar.xz
-2023/04/06 | 1870590 | macros/latex/contrib/proflycee.zip
-2023/04/06 | 1790 | graphics/metapost/contrib/macros/mpchess/README.md
-2023/04/06 | 1775307 | systems/doc/luatex/luatex.pdf
-2023/04/06 | 15233 | graphics/metapost/contrib/macros/mpchess/metapost/mpchess-skak.mp
-2023/04/06 | 1309 | graphics/metapost/contrib/macros/mpchess/doc/fond.pdf
-2023/04/06 | 13068 | systems/texlive/tlnet/archive/graph35.source.r66772.tar.xz
-2023/04/06 | 119333 | macros/latex/contrib/proflycee/tex/ProfLycee.sty
-2023/04/06 | 11844 | systems/texlive/tlnet/archive/texfindpkg.doc.r66777.tar.xz
-2023/04/06 | 10867 | macros/latex/contrib/proflycee/tex/proflycee-tools-listings.tex
-2023/04/06 | 107622 | systems/texlive/tlnet/tlpkg/translations/ru.po
-2023/04/06 | 103515 | systems/texlive/tlnet/tlpkg/translations/sr.po
-2023/04/06 | 1025535 | graphics/metapost/contrib/macros/mpchess/doc/mpchess-doc-fr.pdf
-2023/04/06 | 1020823 | graphics/metapost/contrib/macros/mpchess/doc/mpchess-doc-en.pdf
diff --git a/biblio/citation-style-language/CHANGELOG.md b/biblio/citation-style-language/CHANGELOG.md
index 68afabb179..e0042de33e 100644
--- a/biblio/citation-style-language/CHANGELOG.md
+++ b/biblio/citation-style-language/CHANGELOG.md
@@ -7,6 +7,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
+## [v0.4.1] - 2023-04-12
+
+### Added
+
+- Add support for `crossref` feature in BibTeX database.
+- Add `\printbibheading` command.
+- Add options `heading`, `label`, and `title` in `\printbibliography` ([#31](https://github.com/zepinglee/citeproc-lua/issues/31)).
+- Add `prenote` and `postnote` options in `\printbibliography`.
+
+### Fixed
+
+- Remove UTF-8 BOM from loaded files (fix [#34](https://github.com/zepinglee/citeproc-lua/issues/34)).
+
## [v0.4.0] - 2023-04-02
### Added
@@ -101,7 +114,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Initial CTAN release.
-[Unreleased]: https://github.com/zepinglee/citeproc-lua/compare/v0.4.0...HEAD
+[Unreleased]: https://github.com/zepinglee/citeproc-lua/compare/v0.4.1...HEAD
+[v0.4.1]: https://github.com/zepinglee/citeproc-lua/compare/v0.4.0...0.4.1
[v0.4.0]: https://github.com/zepinglee/citeproc-lua/compare/v0.3.0...0.4.0
[v0.3.0]: https://github.com/zepinglee/citeproc-lua/compare/v0.2.2...0.3.0
[v0.2.2]: https://github.com/zepinglee/citeproc-lua/compare/v0.2.1...0.2.2
diff --git a/biblio/citation-style-language/citation-style-language-bib.sty b/biblio/citation-style-language/citation-style-language-bib.sty
new file mode 100644
index 0000000000..ee8f33d504
--- /dev/null
+++ b/biblio/citation-style-language/citation-style-language-bib.sty
@@ -0,0 +1,714 @@
+%
+% Copyright (c) 2021-2023 Zeping Lee
+% Released under the MIT License.
+% Repository: https://github.com/zepinglee/citeproc-lua
+%
+
+% ## Bibliography commands
+
+% The options like `notcategory` can be used multiple times and thus we save
+% them into a seq instead of a prop.
+\seq_new:N \l__csl_bib_filter_seq
+\int_new:N \g__bib_list_index_int
+\tl_new:N \g__bib_list_index_tl
+\tl_new:N \l__csl_bibliography_tl
+\seq_new:N \l__csl_bibliography_seq
+
+\NewDocumentCommand \printbibliography { O { } }
+ {
+ \int_gincr:N \g__bib_list_index_int
+ \tl_gset:Nx \g__bib_list_index_tl { \int_use:N \g__bib_list_index_int }
+ \__csl_set_categories:
+ % Bibliography filter
+ \group_begin:
+ \seq_clear:N \l__csl_bib_filter_seq
+ \seq_put_right:Nx \l__csl_bib_filter_seq
+ { index = \g__bib_list_index_tl }
+ \keys_set:nn { csl / bibliography } {#1}
+ \__csl_serialize_seq:NN \l__csl_bib_filter_seq \l__csl_bib_filter_tl
+ % Collect the bibliography to token list
+ \sys_if_engine_luatex:TF
+ {
+ \bool_if:NT \l__csl_engine_initialized_bool
+ {
+ \__csl_collect_bibliography:n
+ {
+ \lua_now:e
+ { csl.bibliography("\l__csl_bib_filter_tl") }
+ }
+ }
+ }
+ {
+ % Write to aux file
+ \exp_args:NV \__csl_write_aux_bibliography:n \l__csl_bib_filter_tl
+ }
+ % Print the bibliography
+ \prop_get:NVNTF \g__csl_bibliographies_prop \g__bib_list_index_tl
+ \l__csl_bibliography_tl
+ {
+ \bool_if:NT \l__csl_regression_test_bool
+ {
+ \seq_set_split:NnV \l__csl_bibliography_seq { \par } \l__csl_bibliography_tl
+ \seq_show:N \l__csl_bibliography_seq
+ }
+ \tl_use:N \l__csl_bibliography_tl
+ }
+ { \msg_warning:nn { citation-style-language } { bibliography / empty } }
+ \group_end:
+ }
+
+\msg_new:nnn { citation-style-language } { bibliography / empty }
+ { The~ bibliography~ is~ empty. }
+
+\DeclareDocumentCommand \bibliography { m }
+ {
+ \__csl_write_aux_bibdata:n {#1}
+ \printbibliography
+ }
+
+
+\tl_new:N \l__csl_bib_env_tl
+\tl_new:N \l__csl_bib_head_name_tl
+\tl_new:N \l__csl_bib_head_title_tl
+\tl_new:N \l__csl_bib_head_label_tl
+\tl_new:N \l__csl_bib_pre_note_tl
+\tl_new:N \l__csl_bib_post_note_tl
+\tl_new:N \l__csl_bib_filter_tl
+
+\tl_set:Nn \l__csl_bib_env_tl { bibliography }
+\tl_set:Nn \l__csl_bib_head_name_tl { bibliography }
+
+\keys_define:nn { csl / bibliography }
+ {
+ % env .tl_set:N = \l__csl_bib_env_name_tl ,
+ heading .tl_set:N = \l__csl_bib_head_name_tl ,
+ title .tl_set:N = \l__csl_bib_head_title_tl ,
+ label .tl_set:N = \l__csl_bib_head_label_tl ,
+ % block
+ prenote .tl_set:N = \l__csl_bib_pre_note_tl ,
+ postnote .tl_set:N = \l__csl_bib_post_note_tl ,
+ % section
+ % segment
+ type .code:n = { \seq_put_right:Nn \l__csl_bib_filter_seq { type = {#1} } } ,
+ nottype .code:n = { \seq_put_right:Nn \l__csl_bib_filter_seq { nottype = {#1} } } ,
+ % subtype .code:n = { \seq_put_right:Nn \l__csl_bib_filter_seq { subtype = {#1} } } ,
+ % notsubtype .code:n = { \seq_put_right:Nn \l__csl_bib_filter_seq { notsubtype = {#1} } } ,
+ keyword .code:n = { \seq_put_right:Nn \l__csl_bib_filter_seq { keyword = {#1} } } ,
+ notkeyword .code:n = { \seq_put_right:Nn \l__csl_bib_filter_seq { notkeyword = {#1} } } ,
+ category .code:n = { \seq_put_right:Nn \l__csl_bib_filter_seq { category = {#1} } } ,
+ notcategory .code:n = { \seq_put_right:Nn \l__csl_bib_filter_seq { notcategory = {#1} } } ,
+ % filter .tl_set:N = \l__csl_bibliography_nottype_tl ,
+ }
+
+
+% Used for debugging and testing
+\clist_new:N \g__csl_bib_items_clist
+
+
+\cs_new:Npn \__csl_write_aux_bibliography:n #1
+ {
+ \if@filesw
+ \iow_now:Nn \@auxout { \csl@aux@bibliography {#1} }
+ \fi
+ }
+
+\cs_new:Npn \csl@aux@bibliography #1 { }
+
+
+\tl_new:N \l__csl_bib_index_tl
+\bool_new:N \l__csl_hanging_indent_bool
+\tl_new:N \l__csl_line_spacing_tl
+\tl_new:N \l__csl_entry_spacing_tl
+\tl_new:N \l__csl_bib_wides_label_tl
+
+\keys_define:nn { csl / bib-options }
+ {
+ index .tl_set:N = \l__csl_bib_index_tl ,
+ hanging-indent .bool_set:N = \l__csl_hanging_indent_bool ,
+ line-spacing .tl_set:N = \l__csl_line_spacing_tl ,
+ entry-spacing .tl_set:N = \l__csl_entry_spacing_tl ,
+ widest-label .tl_set:N = \l__csl_bib_wides_label_tl ,
+ }
+
+\keys_set:nn { csl / bib-options }
+ {
+ index = 1 ,
+ hanging-indent = false ,
+ line-spacing = 1 ,
+ entry-spacing = 1 ,
+ widest-label = { } ,
+ }
+
+\RenewDocumentEnvironment { thebibliography } { m }
+ {
+ \exp_args:NVV \__csl_make_bib_heading:nn
+ \l__csl_bib_head_name_tl \l__csl_bib_head_title_tl
+ \exp_args:NV \__csl_print_bib_note:n \l__csl_bib_pre_note_tl
+ \group_begin:
+ \tl_set:Nn \l__csl_bib_index_tl { 1 }
+ \keys_set:nn { csl / bib-options } {#1}
+ \dim_zero:N \parindent
+ \tl_if_eq:NnF \l__csl_line_spacing_tl { 1 }
+ { \linespread { \l__csl_line_spacing_tl } \selectfont }
+ \l__csl_bib_font_tl
+ \list { }
+ {
+ \__csl_set_bib_label_spacing:n { \l__csl_bib_wides_label_tl }
+ \__csl_set_bib_item_sep:
+ }
+ \sloppy
+ \__csl_set_bib_page_break:
+ \frenchspacing
+ \__csl_bib_url_setup:
+ \clist_gclear:N \g__csl_bib_items_clist
+ }
+ {
+ \tl_set:Nn \@noitemerr
+ { \msg_warning:nn { citation-style-language } { bibliography / empty } }
+ \endlist
+ \group_end:
+ \exp_args:NV \__csl_print_bib_note:n \l__csl_bib_post_note_tl
+ }
+
+
+
+% ### Bibliography spacing
+
+\dim_new:N \l__csl_bib_hang_dim
+
+\cs_new:Npn \__csl_set_bib_label_spacing:n #1
+ {
+ \bool_if:NTF \l__csl_hanging_indent_bool
+ {
+ \dim_set:Nn \l__csl_bib_hang_dim { \l__csl_bib_hang_tl }
+ \dim_set_eq:NN \leftmargin \l__csl_bib_hang_dim
+ \dim_set:Nn \itemindent { - \leftmargin }
+ }
+ {
+ \settowidth \labelwidth { \@biblabel {#1} }
+ \dim_set_eq:NN \leftmargin \labelwidth
+ \dim_add:Nn \leftmargin { \labelsep }
+ }
+ }
+
+% In standard LaTeX classes (10pt), the vertical sep of bibliographic item is
+% \itemsep (4\p@ \@plus2\p@ \@minus\p@) + \parsep (4\p@ \@plus2\p@ \@minus\p@)
+% = 8pt plus 4pt minus 2pt
+\cs_new:Npn \__csl_set_bib_item_sep:
+ {
+ \skip_zero:N \parsep
+ \tl_if_empty:NTF \l__csl_bib_item_sep_tl
+ {
+ \skip_set:Nn \itemsep
+ {
+ 8 pt plus 4 pt minus 2 pt * \dim_ratio:nn { 1 em } { 8 pt }
+ * \l__csl_entry_spacing_tl
+ }
+ }
+ { \skip_set:Nn \itemsep { \l__csl_bib_item_sep_tl } }
+ }
+
+
+% ### Bibliography label
+
+% CSL outputs the whole label thus the brackets are removed from \@biblabel
+% \def\@biblabel#1{[#1]}
+\cs_set:Npn \@biblabel #1 {#1}
+
+% For numeric or label-style bibliography: \bibitem[{[17]}]{entrykey}
+% \@lbibitem is redefined in `babel` and `hyperref` and we need to override it
+% in the patching code. Thus we define \__csl_lbibitem: here and reassign it to
+% \@lbibitem in compatability code
+\cs_new:Npn \__csl_lbibitem:
+ {
+ \bool_if:NTF \l__csl_back_ref_bool
+ { \__csl_lbibitem_back_ref:nnn }
+ { \__csl_lbibitem_plain:nn }
+ }
+
+\cs_set_eq:NN \@lbibitem \__csl_lbibitem:
+
+\cs_new:Npn \__csl_lbibitem_plain:nn [#1]#2
+ {
+ \clist_gput_right:Nn \g__csl_bib_items_clist {#2}
+ \item [ \@biblabel {#1} \hfill ]
+ \ignorespaces
+ }
+
+% This is the version for use with backref feature.
+\cs_new:Npn \__csl_lbibitem_back_ref:nnn [#1]#2#3\par
+ {
+ \__csl_lbibitem_plain:nn [#1] {#2}
+ #3
+ \prop_get:NnNT \g__csl_back_ref_info_prop {#2} \l_tmpa_tl
+ {
+ \c_space_tl
+ \exp_args:NV \__csl_print_back_refs:n \l_tmpa_tl
+ }
+ \par
+ }
+
+\cs_new:Npn \__csl_print_back_refs:n #1
+ % #1: list of {<page>}{<label>}{anchor}
+ {
+ \clist_set:Nn \l_tmpa_clist {#1}
+ % To remove duplicates
+ \prop_clear:N \l_tmpa_prop
+ % Output seq
+ \seq_clear:N \l_tmpa_seq
+ \clist_map_inline:Nn \l_tmpa_clist { \__csl_print_back_ref_aux:nnn ##1 }
+ \backref { \seq_use:Nn \l_tmpa_seq { ,~ } }
+ }
+
+\cs_new:Npn \__csl_print_back_ref_aux:nnn #1#2#3
+ {
+ \str_if_eq:VnTF \l__csl_back_ref_type_str { page }
+ {
+ \prop_if_in:NnF \l_tmpa_prop {#1}
+ {
+ \bool_if:NTF \l__csl_hyperref_loaded_bool
+ { \seq_put_right:Nn \l_tmpa_seq { \hyperlink { page. #1 } {#1} } }
+ { \seq_put_right:Nn \l_tmpa_seq {#1} }
+ \prop_put:Nnn \l_tmpa_prop {#1} {#1}
+ }
+ }
+ {
+ % section
+ \prop_if_in:NnF \l_tmpa_prop {#2}
+ {
+ \bool_if:NTF \l__csl_hyperref_loaded_bool
+ { \seq_put_right:Nn \l_tmpa_seq { \hyperlink {#3} {#2} } }
+ { \seq_put_right:Nn \l_tmpa_seq {#2} }
+ \prop_put:Nnn \l_tmpa_prop {#2} {#2}
+ }
+ }
+ }
+
+% Hook
+\cs_new:Npn \backref #1 {#1}
+
+
+% For author-date bibliography
+% \def\@bibitem#1{\item\if@filesw \immediate\write\@auxout
+% {\string\bibcite{#1}{\the\value{\@listctr}}}\fi\ignorespaces}
+\cs_new:Npn \__csl_bibitem:
+ {
+ \bool_if:NTF \l__csl_back_ref_bool
+ { \__csl_bibitem_back_ref:nn }
+ { \__csl_bibitem_plain:n }
+ }
+
+\cs_set_eq:NN \@bibitem \__csl_bibitem:
+
+\cs_new:Npn \__csl_bibitem_plain:n #1
+ {
+ \clist_gput_right:Nn \g__csl_bib_items_clist {#1}
+ \item
+ \ignorespaces
+ }
+
+\cs_new:Npn \__csl_bibitem_back_ref:nn #1#2\par
+ {
+ \__csl_bibitem_plain:n {#1}
+ #2
+ % \prop_show:N \g__csl_back_ref_info_prop
+ \prop_get:NnNT \g__csl_back_ref_info_prop {#1} \l_tmpa_tl
+ {
+ \c_space_tl
+ \exp_args:NV \__csl_print_back_refs:n \l_tmpa_tl
+ }
+ \par
+ }
+
+
+% ### Bibliography Headings and Environments
+
+\prop_new:N \l__csl_bib_env_begin_prop
+\prop_new:N \l__csl_bib_env_end_prop
+\prop_new:N \l__csl_bib_item_prop
+
+% \defbibenvironment{⟨name⟩}{⟨begin code⟩}{⟨end code⟩}{⟨item code⟩}
+\NewDocumentCommand { \defbibenvironment } { m m m m }
+ {
+ \prop_put:Nnn \l__csl_bib_env_begin_prop {#1} {#2}
+ \prop_put:Nnn \l__csl_bib_env_end_prop {#1} {#3}
+ \prop_put:Nnn \l__csl_bib_item_prop {#1} {#4}
+ }
+
+% \defbibenvironment { bibliography }
+% { }
+
+
+% #1: bib heading name
+% #2: bib heading title
+\cs_new:Npn \__csl_make_bib_heading:nn #1#2
+ {
+ \tl_if_empty:NTF \bibsection
+ {
+ \cs_if_exist:cF { __csl_head_ #1 :n }
+ {
+ \msg_error:nnn { citation-style-language } { bib-heading-undefined }
+ {#1}
+ }
+ \tl_if_blank:nTF {#2}
+ { \use:c { __csl_head_ #1 :n } }
+ { \use:c { __csl_head_ #1 :n } [#2] }
+ }
+ { \bibsection }
+ \tl_if_empty:NF \l__csl_bib_head_label_tl
+ { \exp_args:NV \label \l__csl_bib_head_label_tl }
+ }
+
+\msg_new:nnn { citation-style-language } { bib-heading-undefined }
+ { Bibliography~ heading~ '#1'~ undefined. }
+
+\keys_define:nn { csl / bib-heading }
+ {
+ heading .tl_set:N = \l__csl_bib_head_name_tl ,
+ title .tl_set:N = \l__csl_bib_head_title_tl ,
+ % label
+ }
+
+\cs_new:Npn \__csl_reset_heading_options:
+ {
+ \tl_set:Nn \l__csl_bib_head_name_tl { bibliography }
+ \tl_set:Nn \l__csl_bib_head_title_tl { }
+ }
+
+\NewDocumentCommand { \printbibheading } { O { } }
+ {
+ % We can't use a group here.
+ % See <https://github.com/plk/biblatex/issues/1278>.
+ \__csl_reset_heading_options:
+ \keys_set:nn { csl / bib-heading } {#1}
+ \exp_args:NVV \__csl_make_bib_heading:nn
+ \l__csl_bib_head_name_tl \l__csl_bib_head_title_tl
+ \__csl_reset_heading_options:
+ }
+
+% \defbibheading { ⟨name⟩}[⟨title⟩]{⟨code⟩}
+\NewDocumentCommand { \defbibheading } { m O { \bibname } }
+ {
+ \expandafter \newcommand \csname __csl_head_ #1 :n \endcsname [1] [ {#2} ]
+ }
+
+\cs_if_exist:NTF \chapter
+ {
+ % `book` or `report`
+ \defbibheading { bibliography } [ \bibname ]
+ {
+ \chapter* {#1}
+ \@mkboth { \MakeUppercase {#1} } { \MakeUppercase {#1} }
+ }
+ \defbibheading { biblist } [ \biblistname ]
+ {
+ \chapter* {#1}
+ \@mkboth { \MakeMarkcase {#1} } { \MakeMarkcase {#1} }
+ }
+ \defbibheading { bibintoc } [ \bibname ]
+ {
+ \chapter* {#1}
+ \addcontentsline { toc } { chapter } {#1}
+ \@mkboth { \MakeMarkcase {#1} } { \MakeMarkcase {#1} }
+ }
+ \defbibheading { biblistintoc } [ \biblistname ]
+ {
+ \chapter* {#1}
+ \addcontentsline { toc } { chapter } {#1}
+ \@mkboth { \MakeMarkcase {#1} } { \MakeMarkcase {#1} }
+ }
+ \defbibheading { bibnumbered } [ \bibname ]
+ { \chapter {#1} }
+ \defbibheading { biblistnumbered } [ \biblistname ]
+ { \chapter {#1} }
+ \defbibheading { subbibliography } [ \refname ]
+ {
+ \section* {#1}
+ \if@twoside
+ \markright { \MakeMarkcase {#1} }
+ \fi
+ }
+ \defbibheading { subbibintoc } [ \refname ]
+ {
+ \section* {#1}
+ \addcontentsline { toc } { section } {#1}
+ \if@twoside
+ \markright { \MakeMarkcase {#1} }
+ \fi
+ }
+ \defbibheading { subbibnumbered } [ \refname ]
+ { \section {#1} }
+ }
+ {
+ % `article`
+ \defbibheading { bibliography } [ \refname ]
+ {
+ \section* {#1}
+ \@mkboth { \MakeUppercase {#1} } { \MakeUppercase {#1} }
+ }
+ \defbibheading { biblist } [ \biblistname ]
+ {
+ \section* {#1}
+ \@mkboth { \MakeMarkcase {#1} } { \MakeMarkcase {#1} }
+ }
+ \defbibheading { bibintoc } [ \refname ]
+ {
+ \section* {#1}
+ \addcontentsline { toc } { section } {#1}
+ \@mkboth { \MakeMarkcase {#1} } { \MakeMarkcase {#1} }
+ }
+ \defbibheading { biblistintoc } [ \biblistname ]
+ {
+ \section* {#1}
+ \addcontentsline { toc } { section } {#1}
+ \@mkboth { \MakeMarkcase {#1} } { \MakeMarkcase {#1} }
+ }
+ \defbibheading { bibnumbered } [ \refname ]
+ { \section {#1} }
+ \defbibheading { biblistnumbered } [ \biblistname ]
+ { \section {#1} }
+ \defbibheading { subbibliography } [ \refname ]
+ { \subsection* {#1} }
+ \defbibheading { subbibintoc } [ \refname ]
+ {
+ \subsection* {#1}
+ \addcontentsline { toc } { subsection } {#1}
+ }
+ \defbibheading { subbibnumbered } [ \refname ]
+ { \subsection {#1} }
+ }
+
+\defbibheading { none } { }
+
+
+% Bibliography notes
+
+\prop_new:N \l__csl_bib_notes_prop
+
+% #1: name
+% #2: text
+\NewDocumentCommand { \defbibnote } { m m }
+ { \prop_put:Nnn \l__csl_bib_notes_prop {#1} {#2} }
+
+% #1: note name
+\cs_new:Npn \__csl_print_bib_note:n #1
+ {
+ \tl_if_empty:nF {#1}
+ {
+ \prop_get:NnNF \l__csl_bib_notes_prop {#1} \l_tmpa_tl
+ {
+ \msg_error:nnn { citation-style-language } { bib-note-undefined }
+ {#1}
+ }
+ \tl_if_empty:NF \l_tmp_tl
+ {
+ \group_begin:
+ % \cs_set_eq:NN \newrefsection \relax
+ % \cs_set_eq:NN \newrefsegment \relax
+ \noindent
+ \tl_use:N \l_tmpa_tl
+ \par \nobreak
+ \group_end:
+ }
+ }
+ }
+
+\msg_new:nnn { citation-style-language } { bib-note-undefined }
+ { Bibliography~ note~ '#1'~ undefined. }
+
+
+
+% ### Bibliography Categories
+
+\prop_new:N \l__csl_categories_prop
+
+% \DeclareBibliographyCategory{⟨category⟩}
+\NewDocumentCommand \DeclareBibliographyCategory { m }
+ {
+ \prop_put:Nnn \l__csl_categories_prop { #1 } { }
+ }
+
+% \addtocategory{⟨category⟩}{⟨keys⟩}
+\NewDocumentCommand \addtocategory { m m }
+ {
+ \prop_get:NnNTF \l__csl_categories_prop {#1} \l_tmpa_tl
+ {
+ \tl_if_empty:NF \l_tmpa_tl
+ { \tl_put_right:Nn \l_tmpa_tl { , } }
+ \tl_put_right:Nn \l_tmpa_tl {#2}
+ \prop_put:NnV \l__csl_categories_prop {#1} \l_tmpa_tl
+ }
+ {
+ \msg_error:nnn { citation-style-language } { category-not-declared }
+ {#1}
+ }
+ }
+
+% Set categories in Lua module or write to aux file.
+% This procesure is at `\printbibligoraphy` to allow \addtocategory in main text.
+\cs_new:Npn \__csl_set_categories:
+ {
+ % Set categories
+ \prop_if_empty:NF \l__csl_categories_prop
+ {
+ \tl_clear:N \l_tmpa_tl
+ \prop_map_inline:Nn \l__csl_categories_prop
+ {
+ \tl_if_empty:NF \l_tmpa_tl
+ { \tl_put_right:Nn \l_tmpa_tl { , } }
+ \tl_put_right:Nn \l_tmpa_tl { ##1 = {##2} }
+ }
+ \sys_if_engine_luatex:T
+ { \lua_now:e { csl.set_categories("\l_tmpa_tl") } }
+ {
+ \tl_put_left:Nx \l_tmpa_tl { categories = \c_left_brace_str }
+ \tl_put_right:NV \l_tmpa_tl \c_right_brace_str
+ \exp_args:NV \__csl_write_aux_options:n \l_tmpa_tl
+ }
+ }
+ }
+
+\msg_new:nnn { citation-style-language } { category-not-declared }
+ { Category~ '#1'~ not~ declared. }
+
+
+% ### Page break in bibliography
+
+% See <https://github.com/plk/biblatex/blob/e16f4aaa5d9857c7b844bbcbe246f0535fd334e9/tex/latex/biblatex/biblatex.def#L219-L258>
+
+\cs_new:Npn \__csl_set_bib_page_break:
+ {
+ \bool_if:NTF \l__csl_bib_entry_page_break_bool
+ { \__csl_set_bib_allow_break: }
+ { \__csl_set_bib_no_break: }
+ }
+
+% The following code allows linebreaks before numbers and letters.
+% This is often the only way to break DOIs. It also allows breaks
+% after hyphens and adjusts \Urlmuskip to add some stretchability
+% to URLs.
+
+\cs_new:Npn \__csl_set_bib_allow_break:
+ {
+ \sloppy
+ \int_set:Nn \clubpenalty { 4000 }
+ \int_set_eq:NN \@clubpenalty \clubpenalty
+ \int_set:Nn \widowpenalty { 4000 }
+ % \sfcode`\.\@m
+ \frenchspacing
+ }
+
+\cs_new:Npn \__csl_set_bib_no_break:
+ {
+ \sloppy
+ \int_set:Nn \interlinepenalty { 5000 }
+ \int_set:Nn \widowpenalty { 10000 }
+ \int_set:Nn \clubpenalty { 10000 }
+ \int_set_eq:NN \@clubpenalty \clubpenalty
+ \raggedbottom
+ \frenchspacing
+ }
+
+
+% ### Urls in bibliography
+% Taken from `biblatex`'s \biburlsetup
+% https://github.com/plk/biblatex/blob/dev/tex/latex/biblatex/biblatex.def
+
+\int_new:N \l__csl_url_big_break_penalty_int
+\int_new:N \l__csl_url_break_penalty_int
+\int_new:N \l__csl_url_num_penalty_int
+\int_new:N \l__csl_url_uc_penalty_int
+\int_new:N \l__csl_url_lc_penalty_int
+
+\int_set:Nn \l__csl_url_big_break_penalty_int { 100 }
+\int_set:Nn \l__csl_url_break_penalty_int { 200 }
+% Allow linebreaks before numbers and letters.
+% Taken from `xurl.sty`.
+\int_set:Nn \l__csl_url_num_penalty_int { 9000 }
+\int_set:Nn \l__csl_url_uc_penalty_int { 9000 }
+\int_set:Nn \l__csl_url_lc_penalty_int { 8000 }
+
+\muskip_new:N \l__csl_url_big_muskip
+\muskip_new:N \l__csl_url_num_muskip
+\muskip_new:N \l__csl_url_uc_muskip
+\muskip_new:N \l__csl_url_lc_muskip
+
+\muskip_set:Nn \l__csl_url_big_muskip { 0mu plus 3mu }
+\muskip_set:Nn \l__csl_url_num_muskip { 0mu }
+\muskip_set:Nn \l__csl_url_uc_muskip { 0mu }
+\muskip_set:Nn \l__csl_url_lc_muskip { 0mu }
+
+\cs_new:Npn \__csl_bib_url_setup:
+ {
+ \urlstyle { same }
+ \muskip_set_eq:NN \Urlmuskip \l__csl_url_big_muskip
+ \mathchardef \UrlBigBreakPenalty = \l__csl_url_big_break_penalty_int
+ \mathchardef \UrlBreakPenalty = \l__csl_url_break_penalty_int
+ % \int_set_eq:NN doesn't work here
+ % \int_set_eq:NN \UrlBigBreakPenalty \l__csl_url_big_break_penalty_int
+ % \int_set_eq:NN \UrlBreakPenalty \l__csl_url_break_penalty_int
+ \tl_set:Nn \UrlBigBreaks { \do \: \do \- }
+ \tl_set:Nn \UrlBreaks
+ {
+ \do \. \do \@ \do \/ \do \\ \do \! \do \_ \do \| \do \; \do \> \do \]
+ \do \) \do \} \do \, \do \? \do \' \do \+ \do \= \do \# \do \$ \do \&
+ \do \* \do \^ \do \"
+ }
+ \int_compare:nNnT { \l__csl_url_num_penalty_int } > { 0 }
+ {
+ \clist_map_inline:nn
+ { \1 , \2 , \3 , \4 , \5 , \6 , \7 , \8 , \9 , \0 }
+ {
+ \tl_put_right:Nn \UrlSpecials
+ {
+ \do ##1
+ {
+ \mathchar`##1
+ \mskip \l__csl_url_num_muskip
+ \penalty \l__csl_url_num_penalty_int
+ }
+ }
+ }
+ }
+ \int_compare:nNnT { \l__csl_url_uc_penalty_int } > { 0 }
+ {
+ \clist_map_inline:nn
+ {
+ \A , \B , \C , \D , \E , \F , \G , \H , \I , \J ,
+ \K , \L , \M , \N , \O , \P , \Q , \R , \S , \T ,
+ \U , \V , \W , \X , \Y , \Z
+ }
+ {
+ \tl_put_right:Nn \UrlSpecials
+ {
+ \do ##1
+ {
+ \mathchar`##1
+ \mskip \l__csl_url_uc_muskip
+ \penalty \l__csl_url_uc_penalty_int
+ }
+ }
+ }
+ }
+ \int_compare:nNnT { \l__csl_url_lc_penalty_int } > { 0 }
+ {
+ \clist_map_inline:nn
+ {
+ \a , \b , \c , \d , \e , \f , \g , \h , \i , \j ,
+ \k , \l , \m , \n , \o , \p , \q , \r , \s , \t ,
+ \u , \v , \w , \x , \y , \z
+ }
+ {
+ \tl_put_right:Nn \UrlSpecials
+ {
+ \do ##1
+ {
+ \mathchar`##1
+ \mskip \l__csl_url_lc_muskip
+ \penalty \l__csl_url_lc_penalty_int
+ }
+ }
+ }
+ }
+ \cs_set_eq:NN \do \exp_not:N
+ }
diff --git a/biblio/citation-style-language/citation-style-language-cite.sty b/biblio/citation-style-language/citation-style-language-cite.sty
new file mode 100644
index 0000000000..5c4b229bff
--- /dev/null
+++ b/biblio/citation-style-language/citation-style-language-cite.sty
@@ -0,0 +1,524 @@
+%
+% Copyright (c) 2021-2023 Zeping Lee
+% Released under the MIT License.
+% Repository: https://github.com/zepinglee/citeproc-lua
+%
+
+% ## Citation commands
+
+\DeclareDocumentCommand \cite { o o m }
+ { \__csl_cite:nnn {#1} {#2} {#3} }
+
+\NewDocumentCommand \parencite { o o m }
+ { \__csl_cite:nnn {#1} {#2} {#3} }
+
+\NewDocumentCommand \citep { o o m }
+ { \__csl_cite:nnn {#1} {#2} {#3} }
+
+\NewDocumentCommand \textcite { o o m }
+ { \__csl_text_cite:nnn {#1} {#2} {#3} }
+
+\NewDocumentCommand \citet { o o m }
+ { \__csl_text_cite:nnn {#1} {#2} {#3} }
+
+\NewDocumentCommand \footcite { o o m }
+ { \__csl_cite:nnn {#1} {#2} {#3} }
+
+
+% \cites[⟨prenote⟩][⟨postnote⟩]{⟨key⟩}...[⟨prenote⟩][⟨postnote⟩]{⟨key⟩}
+\NewDocumentCommand \cites { }
+ { \__csl_cites: }
+
+\NewDocumentCommand \citeauthor { o o m }
+ { \__csl_cite_author:nnn {#1} {#2} {#3} }
+
+
+\seq_new:N \l__csl_cite_keys_seq
+\seq_new:N \l__csl_citation_items_seq
+\prop_new:N \l__csl_citation_properties_prop
+\prop_new:N \l__csl_citation_info_prop
+
+% \__csl_cite:nnn #1#2#3
+\cs_new:Npn \__csl_cite:nnn #1#2#3
+ {
+ \tl_if_blank:nTF {#3}
+ { \__csl_print_undefined_citation:n {#3} }
+ {
+ \seq_clear:N \l__csl_cite_keys_seq
+ \seq_clear:N \l__csl_citation_items_seq
+ \prop_clear:N \l__csl_citation_properties_prop
+ \__csl_process_cite_input:nnn {#1} {#2} {#3}
+ \__csl_process_citation_info:NN \l__csl_cite_keys_seq \l__csl_citation_items_seq
+ \__csl_make_citation:N \l__csl_citation_info_prop
+ }
+ }
+
+
+\cs_new:Npn \__csl_text_cite:nnn #1#2#3
+ {
+ \seq_clear:N \l__csl_cite_keys_seq
+ \seq_clear:N \l__csl_citation_items_seq
+ \prop_clear:N \l__csl_citation_properties_prop
+ \__csl_process_cite_input:nnn {#1} {#2} {#3}
+ \__csl_process_citation_info:NN \l__csl_cite_keys_seq \l__csl_citation_items_seq
+ \prop_put:Nnn \l__csl_citation_properties_prop { noteIndex } { 0 }
+ \prop_put:Nnn \l__csl_citation_properties_prop { mode } { composite }
+ % \bool_set_false:N \l__csl_note_bool
+ \__csl_make_citation:N \l__csl_citation_info_prop
+ }
+
+
+\cs_new:Npn \__csl_cites:
+ {
+ \seq_clear:N \l__csl_cite_keys_seq
+ \seq_clear:N \l__csl_citation_items_seq
+ \prop_clear:N \l__csl_citation_properties_prop
+ \__csl_next_cites:nnn
+ }
+
+\NewDocumentCommand \__csl_next_cites:nnn { o o g }
+ {
+ \tl_if_novalue:nTF {#3}
+ {
+ \__csl_process_citation_info:NN \l__csl_cite_keys_seq \l__csl_citation_items_seq
+ \__csl_make_citation:N \l__csl_citation_info_prop
+ }
+ {
+ \__csl_process_cite_input:nnn {#1} {#2} {#3}
+ \__csl_next_cites:nnn
+ }
+ }
+
+
+\cs_new:Npn \__csl_cite_author:nnn #1#2#3
+ {
+ \seq_clear:N \l__csl_cite_keys_seq
+ \seq_clear:N \l__csl_citation_items_seq
+ \prop_clear:N \l__csl_citation_properties_prop
+ \__csl_process_cite_input:nnn {#1} {#2} {#3}
+ \__csl_process_citation_info:NN \l__csl_cite_keys_seq \l__csl_citation_items_seq
+ \prop_put:Nnn \l__csl_citation_properties_prop { noteIndex } { 0 }
+ \prop_put:Nnn \l__csl_citation_properties_prop { mode } { author-only }
+ \bool_set_false:N \l__csl_note_bool
+ \__csl_make_citation:N \l__csl_citation_info_prop
+ }
+
+
+% Appends the cite key into \l__csl_cite_keys_seq and cite-items into
+% \l__csl_citation_items_seq
+% #1, #2: prenote/postnote
+% #3: keys
+\cs_new:Npn \__csl_process_cite_input:nnn #1#2#3
+ {
+ \tl_if_novalue:nTF {#2}
+ {
+ \tl_if_novalue:nTF {#1}
+ { \__csl_process_cite_input_aux:nnn { } { } {#3} }
+ { \__csl_process_cite_input_aux:nnn { } {#1} {#3} }
+ }
+ { \__csl_process_cite_input_aux:nnn {#1} {#2} {#3} }
+ }
+
+\cs_new:Npn \__csl_process_cite_input_aux:nnn #1#2#3
+ % #1: prenote, #2: postnote, #3: keys
+ % Return: "{id={ITEM-1},{locator=6},...}, {id={ITEM-2},...}, ..."
+ {
+ \int_zero:N \l_tmpa_int
+ \clist_map_inline:nn {#3}
+ {
+ \int_incr:N \l_tmpa_int
+ \seq_put_right:Nn \l__csl_cite_keys_seq {##1}
+ \int_compare:nNnTF { \l_tmpa_int } = { 1 }
+ { \__csl_process_cite_item:nnn {#1} {#2} {##1} }
+ { \__csl_process_cite_item:nnn { } { } {##1} }
+ }
+ }
+
+
+\prop_new:N \l__csl_cite_item_prop
+\tl_new:N \l__csl_prefix_tl
+\tl_new:N \l__csl_suffix_tl
+
+\cs_new:Npn \__csl_process_cite_item:nnn #1#2#3
+ % #1: prenote, #2: postnote, #3: key
+ % Save "{id={ITEM},locator={42},label={page}}" into \l__csl_citation_items_seq
+ {
+ \prop_clear:N \l__csl_cite_item_prop
+ \prop_put:Nnn \l__csl_cite_item_prop { id } {#3}
+ % \bool_if:T \l__csl_suppress_author_bool
+ % { \prop_put:Nnn \l__csl_cite_item_prop { suppress-author } { true } }
+ % \bool_if:T \l__csl_author_only_bool
+ % { \prop_put:Nnn \l__csl_cite_item_prop { author-only } { true } }
+ \tl_if_empty:nF {#1}
+ {
+ \tl_set:Nn \l__csl_prefix_tl {#1}
+ \tl_put_right:NV \l__csl_prefix_tl \l__csl_prefix_separator_tl
+ \prop_put:NnV \l__csl_cite_item_prop { prefix } \l__csl_prefix_tl
+ }
+ \tl_if_empty:nF {#2}
+ {
+ \tl_if_in:nnTF {#2} { = }
+ { \keys_set:nn { csl / cite-item } {#2} }
+ {
+ \regex_match:nnTF { \d+ } {#2}
+ { \__csl_set_locator:nn { page } {#2} }
+ {
+ \tl_set:Nn \l__csl_suffix_tl {#2}
+ \tl_put_left:NV \l__csl_suffix_tl \l__csl_suffix_separator_tl
+ \prop_put:NnV \l__csl_cite_item_prop { suffix } \l__csl_suffix_tl
+ }
+ }
+ }
+ \__csl_serialize_prop:NN \l__csl_cite_item_prop \l_tmpa_tl
+ \tl_put_left:NV \l_tmpa_tl { \c_left_brace_str }
+ \tl_put_right:NV \l_tmpa_tl { \c_right_brace_str }
+ \seq_put_right:NV \l__csl_citation_items_seq \l_tmpa_tl
+ }
+
+\cs_new:Npn \__csl_set_locator:nn #1#2
+ {
+ \prop_put:Nnn \l__csl_cite_item_prop { label } {#1}
+ \prop_put:Nnn \l__csl_cite_item_prop { locator } {#2}
+ }
+
+\keys_define:nn { csl / cite-item }
+ {
+ prefix .prop_put:N = \l__csl_cite_item_prop,
+ suffix .prop_put:N = \l__csl_cite_item_prop,
+ locator .prop_put:N = \l__csl_cite_item_prop,
+ label .prop_put:N = \l__csl_cite_item_prop,
+ suppress-author .prop_put:N = \l__csl_cite_item_prop,
+ author-only .prop_put:N = \l__csl_cite_item_prop,
+ uris .prop_put:N = \l__csl_cite_item_prop,
+ % Locators.
+ act .code:n = { \__csl_set_locator:nn { act } {#1} } ,
+ appendix .code:n = { \__csl_set_locator:nn { appendix } {#1} } ,
+ article .code:n = { \__csl_set_locator:nn { article-locator } {#1} } ,
+ book .code:n = { \__csl_set_locator:nn { book } {#1} } ,
+ canon .code:n = { \__csl_set_locator:nn { canon } {#1} } ,
+ chapter .code:n = { \__csl_set_locator:nn { chapter } {#1} } ,
+ column .code:n = { \__csl_set_locator:nn { column } {#1} } ,
+ elocation .code:n = { \__csl_set_locator:nn { elocation } {#1} } ,
+ equation .code:n = { \__csl_set_locator:nn { equation } {#1} } ,
+ figure .code:n = { \__csl_set_locator:nn { figure } {#1} } ,
+ folio .code:n = { \__csl_set_locator:nn { folio } {#1} } ,
+ issue .code:n = { \__csl_set_locator:nn { issue } {#1} } ,
+ line .code:n = { \__csl_set_locator:nn { line } {#1} } ,
+ note .code:n = { \__csl_set_locator:nn { note } {#1} } ,
+ opus .code:n = { \__csl_set_locator:nn { opus } {#1} } ,
+ page .code:n = { \__csl_set_locator:nn { page } {#1} } ,
+ paragraph .code:n = { \__csl_set_locator:nn { paragraph } {#1} } ,
+ part .code:n = { \__csl_set_locator:nn { part } {#1} } ,
+ rule .code:n = { \__csl_set_locator:nn { rule } {#1} } ,
+ scene .code:n = { \__csl_set_locator:nn { scene } {#1} } ,
+ section .code:n = { \__csl_set_locator:nn { section } {#1} } ,
+ sub-verbo .code:n = { \__csl_set_locator:nn { sub-verbo } {#1} } ,
+ supplement .code:n = { \__csl_set_locator:nn { supplement } {#1} } ,
+ table .code:n = { \__csl_set_locator:nn { table } {#1} } ,
+ timestamp .code:n = { \__csl_set_locator:nn { timestamp } {#1} } ,
+ title .code:n = { \__csl_set_locator:nn { title-locator } {#1} } ,
+ verse .code:n = { \__csl_set_locator:nn { verse } {#1} } ,
+ version .code:n = { \__csl_set_locator:nn { version } {#1} } ,
+ volume .code:n = { \__csl_set_locator:nn { volume } {#1} } ,
+ % Citation properties
+ infix .prop_put:N = \l__csl_citation_properties_prop,
+ }
+
+
+\tl_new:N \l__csl_citation_id_tl
+\tl_new:N \l__csl_cite_items_tl
+\tl_new:N \l__csl_note_index_tl
+
+% Load the cite keys and prepare:
+% - \l__csl_citation_id_tl
+% - \l__csl_citation_properties_prop
+%
+% #1: \l__csl_cite_keys_seq
+% #2: \l__csl_citation_items_seq
+\cs_new:Npn \__csl_process_citation_info:NN #1#2
+ {
+ \__csl_process_citation_id:NN \l__csl_citation_id_tl #1
+ \__csl_get_note_index:N \l__csl_note_index_tl
+ \prop_put:NnV \l__csl_citation_properties_prop { noteIndex } \l__csl_note_index_tl
+ \__csl_add_back_ref_info:
+ }
+
+
+\tl_new:N \l__csl_back_ref_tl
+\prop_new:N \g__csl_back_ref_info_prop
+\prop_new:N \l__csl_back_ref_section_pop
+
+% Provide empty \@currentHref when hyperref is not loaded.
+\cs_new:Npn \@currentHref {}
+
+% TODO: write backref info to .brf file or .aux file
+\cs_new:Npn \__csl_add_back_ref_info:
+ {
+ % Same as the second argument of backref's \backcite
+ % \thepage: the page number
+ % \@currentlabel: the current label of the citation
+ % \@currentHref: the current anchor name
+ \tl_if_empty:NTF \@currentlabel
+ {
+ \tl_set:Nx \l__csl_back_ref_tl
+ { { \thepage } { (document) } { Doc-Start } }
+ }
+ {
+ \tl_set:Nx \l__csl_back_ref_tl
+ { { \thepage } { \@currentlabel } { \@currentHref } }
+ }
+ \seq_map_inline:Nn \l__csl_cite_keys_seq
+ {
+ \prop_get:NnNTF \g__csl_back_ref_info_prop {##1} \l_tmpa_tl
+ {
+ \tl_put_right:Nn \l_tmpa_tl { , }
+ \tl_put_right:NV \l_tmpa_tl \l__csl_back_ref_tl
+ \prop_gput:NnV \g__csl_back_ref_info_prop {##1} \l_tmpa_tl
+ }
+ {
+ \prop_gput:NnV \g__csl_back_ref_info_prop {##1}
+ \l__csl_back_ref_tl
+ }
+ }
+ }
+
+
+\tl_new:N \l__csl_citation_info_tl
+\tl_new:N \l__csl_citation_tl
+\prop_new:N \g__csl_citations_prop
+
+\tl_new:N \l__csl_citation_properties_tl
+
+% Write citation info to aux and print the citation contents.
+% #1: \l__csl_citation_info_prop
+\cs_new:Npn \__csl_make_citation:N #1
+ {
+ \prop_clear:N \l__csl_citation_info_prop
+ % citationID
+ \prop_put:NnV \l__csl_citation_info_prop { citationID } \l__csl_citation_id_tl
+ % citationItems
+ \__csl_serialize_seq:NN \l__csl_citation_items_seq \l__csl_cite_items_tl
+ \prop_put:NnV \l__csl_citation_info_prop { citationItems } \l__csl_cite_items_tl
+ % properties
+ \__csl_serialize_prop:NN \l__csl_citation_properties_prop \l__csl_citation_properties_tl
+ \prop_put:NnV \l__csl_citation_info_prop { properties } \l__csl_citation_properties_tl
+ \__csl_serialize_prop:NN \l__csl_citation_info_prop \l__csl_citation_info_tl
+ % Write to .aux file
+ % \tl_show:N \l__csl_citation_info_tl
+ \exp_args:NV \__csl_write_aux_citation:n \l__csl_citation_info_tl
+ \bool_if:NT \l__csl_regression_test_bool
+ { \tl_show:N \l__csl_citation_info_tl }
+ % Print the citation string
+ \prop_get:NVNTF \g__csl_citations_prop \l__csl_citation_id_tl
+ \l__csl_citation_tl
+ { \__csl_print_citation:N \l__csl_citation_tl }
+ {
+ \bool_if:NTF \l__csl_engine_initialized_bool
+ {
+ % \tl_show:N \l__csl_citation_info_tl
+ % \tl_set:Nf \l__csl_citation_tl
+ % { \exp_args:NV \__csl_cite_aux:n \l__csl_citation_info_tl }
+ \group_begin:
+ \char_set_catcode_other:N \%
+ \char_set_catcode_other:N \#
+ \exp_args:NV \__csl_cite_aux:n \l__csl_citation_info_tl
+ \__csl_print_citation:N \l__csl_citation_tl
+ \group_end:
+ }
+ {
+ \exp_args:Nx \__csl_print_undefined_citation:n
+ { \seq_use:Nn \l__csl_cite_keys_seq { ,~ } }
+ }
+ }
+ }
+
+\cs_new:Npn \__csl_cite_aux:n #1
+ { \lua_now:e { csl.cite("\lua_escape:n {#1}") } }
+
+% #1: seq
+% #2: tl
+\cs_new:Npn \__csl_serialize_seq:NN #1#2
+ {
+ \tl_clear:N #2
+ \seq_map_inline:Nn #1
+ {
+ \tl_if_empty:NF #2
+ { \tl_put_right:Nn #2 { , } }
+ \tl_put_right:Nn #2 { ##1 }
+ }
+ }
+
+% #1: prop
+% #2: tl
+\cs_new:Npn \__csl_serialize_prop:NN #1#2
+ {
+ \tl_clear:N #2
+ \prop_map_inline:Nn #1
+ {
+ \tl_if_empty:NF #2
+ { \tl_put_right:Nn #2 { , } }
+ \tl_put_right:Nn #2 { ##1 = { ##2 } }
+ }
+ }
+
+\tl_new:N \l__csl_cite_keys_tl
+\tl_new:N \l__csl_citation_count_tl
+\int_new:N \l__csl_citation_count_int
+\prop_new:N \g__csl_citations_count_prop
+
+\cs_new:Npn \__csl_process_citation_id:NN #1#2
+ % #1: \l__csl_citation_id_tl
+ % #2: \l__csl_cite_keys_seq
+ % Set \l__csl_citation_id_tl = "ITEM-1,ITEM-2@4".
+ {
+ \tl_set:Nx \l__csl_cite_keys_tl
+ { \seq_use:Nn #2 { , } }
+ % \prop_show:N \g__csl_citations_count_prop
+ % \tl_show:N \l__csl_cite_keys_tl
+ \prop_get:NVNTF \g__csl_citations_count_prop \l__csl_cite_keys_tl
+ \l__csl_citation_count_tl
+ {
+ \int_set:Nn \l__csl_citation_count_int { \l__csl_citation_count_tl }
+ \int_incr:N \l__csl_citation_count_int
+ }
+ { \int_set_eq:NN \l__csl_citation_count_int \c_one_int }
+ \prop_gput:NVV \g__csl_citations_count_prop \l__csl_cite_keys_tl
+ \l__csl_citation_count_int
+ \tl_set:Nx #1
+ { \l__csl_cite_keys_tl @ \int_use:N \l__csl_citation_count_int }
+ }
+
+
+\int_new:N \g__csl_pseudo_note_index_int
+\int_gset:Nn \g__csl_pseudo_note_index_int { 0 }
+
+% Save the note number to \l__csl_note_index_tl
+% TODO: multiple citations in a note
+\cs_new:Npn \__csl_get_note_index:N #1
+ % #1: \l__csl_note_index_tl
+ {
+ \bool_if:NTF \l__csl_note_bool
+ {
+ \int_set_eq:Nc \l_tmpa_int { c@ \@mpfn }
+ \int_incr:N \l_tmpa_int
+ \tl_set:Nx #1 { \int_use:N \l_tmpa_int }
+ }
+ {
+ \tl_if_empty:NTF \l__csl_class_tl
+ {
+ % The style class (in-text/note) is undetermined.
+ \int_set_eq:Nc \l_tmpa_int { c@ \@mpfn }
+ \int_gincr:N \g__csl_pseudo_note_index_int
+ \int_add:Nn \l_tmpa_int { \g__csl_pseudo_note_index_int }
+ \tl_set:Nx #1 { \int_use:N \l_tmpa_int }
+ }
+ { \tl_set:Nx #1 { 0 } }
+ }
+ }
+
+
+\cs_new:Npn \__csl_write_aux_citation:n #1
+ % #1: citation info "{<citationID>}{{id=ITEM-1},{id=ITEM-2}}{<noteIndex>}"
+ {
+ \if@filesw
+ \iow_now:Nn \@auxout { \csl@aux@cite {#1} }
+ \fi
+ }
+
+
+% #1: \l__csl_citation_tl
+\cs_new:Npn \__csl_print_citation:N #1
+ {
+ \bool_if:NT \l__csl_regression_test_bool
+ { \tl_show:N #1 }
+ \bool_if:NTF \l__csl_note_bool
+ { \footnote {#1} }
+ {#1}
+ }
+
+
+\cs_new:Npn \__csl_print_undefined_citation:n #1
+ % #1: keys
+ {
+ \G@refundefinedtrue
+ \msg_warning:nnn { citation-style-language } { citation / undefined } {#1}
+ \tl_if_blank:nTF {#1}
+ { \tl_set:Nn \l__csl_citation_tl { [ \textbf { ? } ] } }
+ { \tl_set:Nn \l__csl_citation_tl { [ \textbf {#1} ] } }
+ \bool_if:NT \l__csl_regression_test_bool
+ { \tl_show:N \l__csl_citation_tl }
+ \group_begin:
+ \reset@font \l__csl_citation_tl
+ \group_end:
+ }
+
+\msg_new:nnn { citation-style-language } { citation / undefined }
+ { Citation~ `#1'~ on~ page~ \thepage \space undefined~ \msg_line_context: . }
+
+
+\DeclareDocumentCommand \nocite { m }
+ { \__csl_no_cite:n {#1} }
+
+
+\cs_new:Npn \__csl_no_cite:n #1
+ {
+ \seq_clear:N \l__csl_cite_keys_seq
+ \seq_clear:N \l__csl_citation_items_seq
+ \__csl_process_cite_input:nnn { } { } {#1}
+ \tl_set:Nx \l__csl_cite_items_tl
+ { \seq_use:Nn \l__csl_citation_items_seq { , } }
+ \tl_set:Nx \l__csl_citation_info_tl
+ {
+ citationID = { @nocite } ,
+ citationItems = { \l__csl_cite_items_tl } ,
+ properties = { noteIndex = { 0 } }
+ }
+ \bool_if:NT \l__csl_regression_test_bool
+ { \tl_show:N \l__csl_citation_info_tl }
+ \exp_args:NV \__csl_no_cite_write_aux:n \l__csl_citation_info_tl
+ \sys_if_engine_luatex:T
+ { \lua_now:n { csl.nocite("#1") } }
+ \tl_clear:N \l__csl_citation_tl
+ \bool_if:NT \l__csl_regression_test_bool
+ { \tl_show:N \l__csl_citation_tl }
+}
+
+
+\cs_new:Npn \__csl_no_cite_write_aux:n #1
+ {
+ \__csl_if_preamble:TF
+ {
+ \AtBeginDocument
+ { \exp_args:Nx \__csl_write_aux_citation:n { #1 } }
+ }
+ { \exp_args:Nx \__csl_write_aux_citation:n { #1 } }
+ }
+
+
+\prg_new_conditional:Nnn \__csl_if_preamble: { T , F , TF }
+ {
+ \if_meaning:w \@begindocumenthook \@undefined
+ \prg_return_false:
+ \else
+ \prg_return_true:
+ \fi
+ }
+
+
+% Used in aux files to register cite items.
+% #1: a citation object
+\cs_set:Npn \csl@aux@cite #1
+ {
+ \sys_if_engine_luatex:T
+ { \lua_now:e { csl.register_citation_info("\lua_escape:n {#1}") } }
+ }
+
+
+\cs_new:Npn \cslcitation #1#2
+ { \prop_gput:Nnn \g__csl_citations_prop {#1} {#2} }
+
+
+% This command is for use with hyperref.
+% #1: cite id
+% #2: cite contents
+\cs_new:Npn \cslcite #1#2 {#2}
diff --git a/biblio/citation-style-language/citation-style-language-compatible.sty b/biblio/citation-style-language/citation-style-language-compatible.sty
new file mode 100644
index 0000000000..db70f54c1c
--- /dev/null
+++ b/biblio/citation-style-language/citation-style-language-compatible.sty
@@ -0,0 +1,102 @@
+%
+% Copyright (c) 2021-2023 Zeping Lee
+% Released under the MIT License.
+% Repository: https://github.com/zepinglee/citeproc-lua
+%
+
+% ## Compatibilities with other packages
+
+% ### `babel`
+
+% This should be disabled.
+\AtEndOfPackageFile* { babel }
+ {
+ \RenewDocumentCommand \nocite { m }
+ {
+ % \@safe@activestrue\org@nocite{#1}\@safe@activesfalse
+ \@safe@activestrue
+ \__csl_no_cite:n {#1}
+ \@safe@activesfalse
+ }
+ \cs_set_eq:NN \bbl@cite@choice \relax
+ \cs_set_eq:NN \@lbibitem \__csl_lbibitem_plain:nn
+ \cs_set_eq:NN \@bibitem \__csl_bibitem_plain:n
+ }
+
+
+% ### `biblatex`
+% The following doesn't really make `csl` compatible with `biblatex`.
+% It just provides commands to make it accepting `biblatex`'s database.
+
+\ProvideDocumentCommand { \hyphen } { }
+ {
+ \nobreak - \nobreak
+ \hskip \z@skip
+ }
+
+
+% ### `csquotes`
+
+\AtEndOfPackageFile* { csquotes }
+ {
+ \BlockquoteDisable
+ {
+ \cs_set_eq:NN \__csl_process_citation_info:NN \use_none:nn
+ \cs_set_eq:NN \__csl_make_citation:N \use_none:n
+ }
+ }
+
+
+% ### `hyperref`
+
+% The hyperref package also patches \bibcite but it cannot provide hyperlinks
+% when used with csl.
+\bool_new:N \l__csl_hyperref_loaded_bool
+\AtEndOfPackageFile* { hyperref }
+ {
+ \bool_set_true:N \l__csl_hyperref_loaded_bool
+ % Pakcage "hyperref" redefines \@lbibitem and \bibitem and we need to
+ % recover them.
+ \cs_gset_eq:NN \@lbibitem \__csl_lbibitem:
+ \cs_gset_eq:NN \@bibitem \__csl_bibitem:
+ \cs_gset_eq:NN \__csl_lbibitem_plain:nn \__csl_hyperref_lbibitem:nn
+ \cs_gset_eq:NN \__csl_bibitem_plain:n \__csl_hyperref_bibitem:n
+ \cs_gset_eq:NN \cslcite \__csl_hyperref_cite_item:nn
+ }
+
+\cs_set:Npn \__csl_hyperref_cite_item:nn #1#2
+ { \hyper@@link [ cite ] { } { cite. #1 \@extra@b@citeb } { #2 } }
+
+\cs_new:Npn \__csl_hyperref_lbibitem:nn [#1]#2
+ {
+ \clist_gput_right:Nn \g__csl_bib_items_clist {#2}
+ \@skiphyperreftrue
+ \H@item[%
+ \ifx\Hy@raisedlink\@empty
+ \hyper@anchorstart{cite.#2\@extra@b@citeb}%
+ \@BIBLABEL{#1}%
+ \hyper@anchorend
+ \else
+ \Hy@raisedlink{%
+ \hyper@anchorstart{cite.#2\@extra@b@citeb}\hyper@anchorend
+ }%
+ \@BIBLABEL{#1}%
+ \fi
+ \hfill
+ ]%
+ \@skiphyperreffalse
+ \ignorespaces
+ }
+
+\cs_new:Npn \__csl_hyperref_bibitem:n #1
+ {
+ \clist_gput_right:Nn \g__csl_bib_items_clist {#1}
+ \@skiphyperreftrue \H@item \@skiphyperreffalse
+ \Hy@raisedlink
+ {
+ \hyper@anchorstart
+ { cite. #1 \@extra@b@citeb } \relax
+ \hyper@anchorend
+ }
+ \ignorespaces
+ }
diff --git a/biblio/citation-style-language/citation-style-language-data.sty b/biblio/citation-style-language/citation-style-language-data.sty
new file mode 100644
index 0000000000..f3fc7f13b1
--- /dev/null
+++ b/biblio/citation-style-language/citation-style-language-data.sty
@@ -0,0 +1,10 @@
+%
+% Copyright (c) 2021-2023 Zeping Lee
+% Released under the MIT License.
+% Repository: https://github.com/zepinglee/citeproc-lua
+%
+
+% ## Bibliography commands
+
+\NewDocumentCommand \addbibresource { o m }
+ { \clist_put_right:Nn \l__csl_bib_resources_clist {#2} }
diff --git a/biblio/citation-style-language/citation-style-language-doc.pdf b/biblio/citation-style-language/citation-style-language-doc.pdf
index cf2f8ebf21..0378ba3dd9 100644
--- a/biblio/citation-style-language/citation-style-language-doc.pdf
+++ b/biblio/citation-style-language/citation-style-language-doc.pdf
Binary files differ
diff --git a/biblio/citation-style-language/citation-style-language-doc.tex b/biblio/citation-style-language/citation-style-language-doc.tex
index 628e30f781..dd275e18aa 100644
--- a/biblio/citation-style-language/citation-style-language-doc.tex
+++ b/biblio/citation-style-language/citation-style-language-doc.tex
@@ -49,7 +49,7 @@
}%
}
-\date{2023-04-02 v0.4.0}
+\date{2023-04-12 v0.4.1}
\maketitle
diff --git a/biblio/citation-style-language/citation-style-language-init.sty b/biblio/citation-style-language/citation-style-language-init.sty
new file mode 100644
index 0000000000..53aea6d4f5
--- /dev/null
+++ b/biblio/citation-style-language/citation-style-language-init.sty
@@ -0,0 +1,306 @@
+%
+% Copyright (c) 2021-2023 Zeping Lee
+% Released under the MIT License.
+% Repository: https://github.com/zepinglee/citeproc-lua
+%
+
+% ## Initialization at `\begin{document}`
+
+\AtBeginDocument { \__csl_at_begin_document_hook: }
+
+
+\cs_new:Npn \__csl_at_begin_document_hook:
+ {
+ \__csl_write_aux_info:
+ \sys_if_engine_luatex:TF
+ { \__csl_initialize_lua_module: }
+ { \__csl_load_bbl: }
+ }
+
+
+\clist_new:N \g__csl_aux_bib_files_clist
+
+\cs_new:Npn \__csl_write_aux_info:
+ {
+ \tl_if_empty:NTF \l__csl_style_tl
+ {
+ \tl_set_eq:NN \l__csl_style_tl \g__csl_aux_bibstyle_tl
+ \edef \csl@style { \g__csl_aux_bibstyle_tl }
+ }
+ { \exp_args:Nx \__csl_write_aux_bibstyle:n { \l__csl_style_tl } }
+ \clist_if_empty:NTF \l__csl_bib_resources_clist
+ { \clist_set_eq:NN \l__csl_bib_resources_clist \g__csl_aux_bib_files_clist }
+ {
+ \exp_args:Nx \__csl_write_aux_bibdata:n
+ { \clist_use:Nn \l__csl_bib_resources_clist { , } }
+ }
+ \__csl_write_aux_csl_options:
+ }
+
+\cs_new:Npn \__csl_write_aux_bibstyle:n #1
+ {
+ \if@filesw
+ \iow_now:Nx \@auxout { \token_to_str:N \csl@aux@style {#1} }
+ \fi
+ }
+
+\cs_new:Npn \__csl_write_aux_bibdata:n #1
+ {
+ \if@filesw
+ % Full expansion for files like \jobname.bib
+ \iow_now:Nx \@auxout { \token_to_str:N \csl@aux@data {#1} }
+ \fi
+ }
+
+% In earlier time, \bibdata{xxx.json} was used but this causes latexmk unable
+% to find xxx.json.bib and it refuses to run the $bibtex procedure.
+% John Collins suggests using a different command than \bibdata.
+\cs_new:Npn \csl@aux@data #1
+ { \clist_gput_right:Nn \g__csl_aux_bib_files_clist {#1} }
+
+
+
+\cs_new:Npn \__csl_initialize_lua_module:
+ {
+ \lua_now:e
+ {
+ csl.init(
+ "\l__csl_style_tl",
+ "\l__csl_bib_resources_clist",
+ "\l__csl_locale_tl"
+ )
+ }
+ \str_if_eq:eeT { \lua_now:n { tex.print(csl.initialized) } } { true }
+ { \bool_set_true:N \l__csl_engine_initialized_bool }
+ \__csl_get_style_class:
+ \@ifpackageloaded { hyperref }
+ { \lua_now:n { csl.enable_linking() } }
+ { }
+ }
+
+
+% \str_new:N \l__csl_style_class_str
+% In-text (including numeric or author-date) or note style
+% \bool_new:N \l__csl_note_style_bool
+
+\cs_new:Npn \__csl_get_style_class: {
+ \bool_if:NT \l__csl_engine_initialized_bool
+ {
+ \tl_set:Nx \l__csl_class_tl { \lua_now:n { csl.get_style_class() } }
+ \tl_if_eq:NnT \l__csl_class_tl { note }
+ { \bool_set_true:N \l__csl_note_bool }
+ }
+}
+
+
+\clist_new:N \l__csl_options_clist
+
+\bool_new:N \l__csl_engine_initialized_bool
+
+\prop_set_from_keyval:Nn \l__csl_language_code_map_prop
+ {
+ acadian = fr-CA,
+ american = en-US,
+ australian = en-AU,
+ afrikaans = af-ZA,
+ albanian = sq-AL,
+ amharic = am-ET,
+ arabic = ar,
+ armenian = hy-AM,
+ asturian = ast-ES,
+ austrian = de-AT,
+ bahasa = id-ID,
+ bahasai = id-ID,
+ bahasam = id-ID,
+ basque = eu-ES,
+ bengali = bn-BD,
+ bgreek = el-GR,
+ brazil = pt-BR,
+ brazilian = pt-BR,
+ breton = br-FR,
+ british = en-GB,
+ bulgarian = bg-BG,
+ canadian = en-CA,
+ canadien = fr-CA,
+ catalan = ca-AD,
+ coptic = cop,
+ croatian = hr-HR,
+ czech = cs-CZ,
+ danish = da-DK,
+ divehi = dv-MV,
+ dutch = nl-NL,
+ english = en-US,
+ esperanto = eo-001,
+ estonian = et-EE,
+ ethiopia = am-ET,
+ farsi = fa-IR,
+ finnish = fi-FI,
+ francais = fr-FR,
+ french = fr-FR,
+ frenchle = fr-FR,
+ friulan = fur-IT,
+ galician = gl-ES,
+ german = de-DE,
+ germanb = de-DE,
+ greek = el-GR,
+ hebrew = he-IL,
+ hindi = hi-IN,
+ ibygreek = el-CY,
+ icelandic = is-IS,
+ indon = id-ID,
+ indonesia = id-ID,
+ interlingua = ia-FR,
+ irish = ga-IE,
+ italian = it-IT,
+ japanese = ja-JP,
+ kannada = kn-IN,
+ lao = lo-LA,
+ latin = la-Latn,
+ latvian = lv-LV,
+ lithuanian = lt-LT,
+ lowersorbian = dsb-DE,
+ lsorbian = dsb-DE,
+ magyar = hu-HU,
+ malay = id-ID,
+ malayalam = ml-IN,
+ marathi = mr-IN,
+ meyalu = id-ID,
+ mongolian = mn-Cyrl,
+ naustrian = de-AT,
+ newzealand = en-NZ,
+ ngerman = de-DE,
+ nko = ha-NG,
+ norsk = nb-NO,
+ norwegian = nn-NO,
+ nynorsk = nn-NO,
+ occitan = oc-FR,
+ piedmontese = pms-IT,
+ pinyin = pny,
+ polish = pl-PL,
+ polutonikogreek = el-GR,
+ portuges = pt-PT,
+ portuguese = pt-PT,
+ romanian = ro-RO,
+ romansh = rm-CH,
+ russian = ru-RU,
+ samin = se-NO,
+ sanskrit = sa-IN,
+ scottish = gd-GB,
+ serbian = sr-Latn,
+ serbianc = sr-Cyrl,
+ slovak = sk-SK,
+ slovene = sl-SI,
+ slovenian = sl-SI,
+ spanish = es-ES,
+ swedish = sv-SE,
+ swiss = de-CH,
+ swissgerman = de-CH,
+ nswissgerman = de-CH,
+ syriac = syc,
+ tamil = ta-IN,
+ telugu = te-IN,
+ thai = th-TH,
+ thaicjk = th-TH,
+ tibetan = bo-CN,
+ turkish = tr-TR,
+ turkmen = tk-TM,
+ ukrainian = uk-UA,
+ urdu = ur-IN,
+ UKenglish = en-UK,
+ uppersorbian = hsb-DE,
+ USenglish = en-US,
+ usorbian = hsb-DE,
+ vietnamese = vi-VN,
+ welsh = cy-GB,
+ }
+
+
+\cs_new:Npn \__csl_write_aux_csl_options:
+ {
+ \clist_clear:N \l__csl_options_clist
+ % locale
+ \tl_if_empty:NT \l__csl_locale_tl
+ {
+ \tl_if_exist:NT \bbl@main@language
+ {
+ \prop_get:NVN \l__csl_language_code_map_prop \bbl@main@language
+ \l__csl_locale_tl
+ }
+ }
+ \tl_if_empty:NF \l__csl_locale_tl
+ {
+ \clist_put_right:Nx \l__csl_options_clist
+ { locale = \l__csl_locale_tl }
+ }
+ % linking
+ \@ifpackageloaded { hyperref }
+ { \clist_put_right:Nn \l__csl_options_clist { linking = true } }
+ { }
+ % write to aux file
+ \prop_if_empty:NF \l__csl_options_clist
+ {
+ \exp_args:Nx \__csl_write_aux_options:n
+ { \clist_use:Nn \l__csl_options_clist { , } }
+ }
+ }
+
+\cs_new:Npn \__csl_write_aux_options:n #1
+ {
+ \if@filesw
+ \iow_now:Nn \@auxout { \csl@aux@options {#1} }
+ \fi
+ }
+
+\cs_new:Npn \csl@aux@options #1 { }
+
+
+\tl_new:N \g__csl_bibliography_setup_tl
+
+% Load .bbl at the beginning of document to save one pass of latex.
+% In this procedure, the \cslcitation command is processed and the contents
+% of `thebibliography` is stored into \g__csl_bibliographies_prop.
+\cs_new:Npn \__csl_load_bbl:
+ {
+ % The \@input@ prints "No file ....bbl" in the .log file from which
+ % the latexmk decides to run $bibtex or not.
+ \__csl_collect_bibliography:n { \@input@ { \jobname .bbl } }
+ % Execute the \cslsetup part to set the style class.
+ % \tl_show:N \g__csl_bibliography_setup_tl
+ \tl_use:N \g__csl_bibliography_setup_tl
+ % \bool_show:N \l__csl_note_bool
+ }
+
+
+% A document may have multiple bibliographies or biblists and they are stored
+% in `\g__csl_bibliographies_prop` by their index.
+\prop_new:N \g__csl_bibliographies_prop
+
+
+% Collection the bibliography into \g__csl_bibliographies_prop
+\cs_new:Npn \__csl_collect_bibliography:n #1
+ {
+ \group_begin:
+ % URLs may contain "%" and "#" characters.
+ \char_set_catcode_other:N \%
+ \char_set_catcode_other:N \#
+ \RenewDocumentCommand \cslsetup { m }
+ { \tl_gset:Nn \g__csl_bibliography_setup_tl { \cslsetup { ##1 } } }
+ \RenewDocumentEnvironment { thebibliography } { m +b }
+ {
+ \tl_set:Nn \l__csl_bib_index_tl { 1 }
+ \keys_set:nn { csl / bib-options } {##1}
+ \prop_gput:NVn \g__csl_bibliographies_prop \l__csl_bib_index_tl
+ {
+ \begin { thebibliography } {##1}
+ ##2
+ \end { thebibliography }
+ }
+ }
+ { }
+ % Perform the execution
+ #1
+ \group_end:
+ }
+
+% \msg_new:nnn { citation-style-language } { file / non-exist }
+% { No~ file~ #1. }
diff --git a/biblio/citation-style-language/citation-style-language.sty b/biblio/citation-style-language/citation-style-language.sty
index 5566737b49..0e97c76dd5 100644
--- a/biblio/citation-style-language/citation-style-language.sty
+++ b/biblio/citation-style-language/citation-style-language.sty
@@ -9,13 +9,14 @@
\RequirePackage{expl3}
\RequirePackage{xparse}
-\ProvidesExplPackage {citation-style-language} {2023-04-02} {v0.4.0}
+\ProvidesExplPackage {citation-style-language} {2023-04-12} {v0.4.1}
{Citation Style Language for LaTeX}
\RequirePackage { l3keys2e }
\RequirePackage { filehook }
\RequirePackage { url }
+
% Check incompatible packages
\msg_new:nnn { citation-style-language } { incompatible-package }
{ The~ `#1'~ package~ is~ incompatible~ with~ `citation-style-language'. }
@@ -32,651 +33,18 @@
}
-% Check l3build regression-test
-\bool_new:N \l__csl_regression_test_bool
-% \if_meaning:w \ASSERT \@undefined
-% \else
-% \bool_set_true:N \l__csl_regression_test_bool
-% \fi
-
-
+% Load Lua module in LuaTeX
\sys_if_engine_luatex:T
{ \lua_now:n { csl = require("citeproc-latex") } }
+% Global options
+
\NewDocumentCommand \cslsetup { m }
{ \keys_set:nn { csl } {#1} }
-\cs_new:Npn \csl@aux@options #1 { }
-
-
-\DeclareDocumentCommand \cite { o o m }
- { \__csl_cite:nnn {#1} {#2} {#3} }
-
-\NewDocumentCommand \parencite { o o m }
- { \__csl_cite:nnn {#1} {#2} {#3} }
-
-\NewDocumentCommand \citep { o o m }
- { \__csl_cite:nnn {#1} {#2} {#3} }
-
-\NewDocumentCommand \textcite { o o m }
- { \__csl_text_cite:nnn {#1} {#2} {#3} }
-
-\NewDocumentCommand \citet { o o m }
- { \__csl_text_cite:nnn {#1} {#2} {#3} }
-
-\NewDocumentCommand \footcite { o o m }
- { \__csl_cite:nnn {#1} {#2} {#3} }
-
-
-% \cites[⟨prenote⟩][⟨postnote⟩]{⟨key⟩}...[⟨prenote⟩][⟨postnote⟩]{⟨key⟩}
-\NewDocumentCommand \cites { }
- { \__csl_cites: }
-
-\NewDocumentCommand \citeauthor { o o m }
- { \__csl_cite_author:nnn {#1} {#2} {#3} }
-
-
-\seq_new:N \l__csl_cite_keys_seq
-\seq_new:N \l__csl_citation_items_seq
-\prop_new:N \l__csl_citation_properties_prop
-\prop_new:N \l__csl_citation_info_prop
-
-% \__csl_cite:nnn #1#2#3
-\cs_new:Npn \__csl_cite:nnn #1#2#3
- {
- \tl_if_blank:nTF {#3}
- { \__csl_print_undefined_citation:n {#3} }
- {
- \seq_clear:N \l__csl_cite_keys_seq
- \seq_clear:N \l__csl_citation_items_seq
- \prop_clear:N \l__csl_citation_properties_prop
- \__csl_process_cite_input:nnn {#1} {#2} {#3}
- \__csl_process_citation_info:NN \l__csl_cite_keys_seq \l__csl_citation_items_seq
- \__csl_make_citation:N \l__csl_citation_info_prop
- }
- }
-
-
-\cs_new:Npn \__csl_text_cite:nnn #1#2#3
- {
- \seq_clear:N \l__csl_cite_keys_seq
- \seq_clear:N \l__csl_citation_items_seq
- \prop_clear:N \l__csl_citation_properties_prop
- \__csl_process_cite_input:nnn {#1} {#2} {#3}
- \__csl_process_citation_info:NN \l__csl_cite_keys_seq \l__csl_citation_items_seq
- \prop_put:Nnn \l__csl_citation_properties_prop { noteIndex } { 0 }
- \prop_put:Nnn \l__csl_citation_properties_prop { mode } { composite }
- % \bool_set_false:N \l__csl_note_bool
- \__csl_make_citation:N \l__csl_citation_info_prop
- }
-
-
-\cs_new:Npn \__csl_cites:
- {
- \seq_clear:N \l__csl_cite_keys_seq
- \seq_clear:N \l__csl_citation_items_seq
- \prop_clear:N \l__csl_citation_properties_prop
- \__csl_next_cites:nnn
- }
-
-\NewDocumentCommand \__csl_next_cites:nnn { o o g }
- {
- \tl_if_novalue:nTF {#3}
- {
- \__csl_process_citation_info:NN \l__csl_cite_keys_seq \l__csl_citation_items_seq
- \__csl_make_citation:N \l__csl_citation_info_prop
- }
- {
- \__csl_process_cite_input:nnn {#1} {#2} {#3}
- \__csl_next_cites:nnn
- }
- }
-
-
-\cs_new:Npn \__csl_cite_author:nnn #1#2#3
- {
- \seq_clear:N \l__csl_cite_keys_seq
- \seq_clear:N \l__csl_citation_items_seq
- \prop_clear:N \l__csl_citation_properties_prop
- \__csl_process_cite_input:nnn {#1} {#2} {#3}
- \__csl_process_citation_info:NN \l__csl_cite_keys_seq \l__csl_citation_items_seq
- \prop_put:Nnn \l__csl_citation_properties_prop { noteIndex } { 0 }
- \prop_put:Nnn \l__csl_citation_properties_prop { mode } { author-only }
- \bool_set_false:N \l__csl_note_bool
- \__csl_make_citation:N \l__csl_citation_info_prop
- }
-
-
-% Appends the cite key into \l__csl_cite_keys_seq and cite-items into
-% \l__csl_citation_items_seq
-% #1, #2: prenote/postnote
-% #3: keys
-\cs_new:Npn \__csl_process_cite_input:nnn #1#2#3
- {
- \tl_if_novalue:nTF {#2}
- {
- \tl_if_novalue:nTF {#1}
- { \__csl_process_cite_input_aux:nnn { } { } {#3} }
- { \__csl_process_cite_input_aux:nnn { } {#1} {#3} }
- }
- { \__csl_process_cite_input_aux:nnn {#1} {#2} {#3} }
- }
-
-\cs_new:Npn \__csl_process_cite_input_aux:nnn #1#2#3
- % #1: prenote, #2: postnote, #3: keys
- % Return: "{id={ITEM-1},{locator=6},...}, {id={ITEM-2},...}, ..."
- {
- \int_zero:N \l_tmpa_int
- \clist_map_inline:nn {#3}
- {
- \int_incr:N \l_tmpa_int
- \seq_put_right:Nn \l__csl_cite_keys_seq {##1}
- \int_compare:nNnTF { \l_tmpa_int } = { 1 }
- { \__csl_process_cite_item:nnn {#1} {#2} {##1} }
- { \__csl_process_cite_item:nnn { } { } {##1} }
- }
- }
-
-
-\prop_new:N \l__csl_cite_item_prop
-\tl_new:N \l__csl_prefix_tl
-\tl_new:N \l__csl_suffix_tl
-
-\cs_new:Npn \__csl_process_cite_item:nnn #1#2#3
- % #1: prenote, #2: postnote, #3: key
- % Save "{id={ITEM},locator={42},label={page}}" into \l__csl_citation_items_seq
- {
- \prop_clear:N \l__csl_cite_item_prop
- \prop_put:Nnn \l__csl_cite_item_prop { id } {#3}
- % \bool_if:T \l__csl_suppress_author_bool
- % { \prop_put:Nnn \l__csl_cite_item_prop { suppress-author } { true } }
- % \bool_if:T \l__csl_author_only_bool
- % { \prop_put:Nnn \l__csl_cite_item_prop { author-only } { true } }
- \tl_if_empty:nF {#1}
- {
- \tl_set:Nn \l__csl_prefix_tl {#1}
- \tl_put_right:NV \l__csl_prefix_tl \l__csl_prefix_separator_tl
- \prop_put:NnV \l__csl_cite_item_prop { prefix } \l__csl_prefix_tl
- }
- \tl_if_empty:nF {#2}
- {
- \tl_if_in:nnTF {#2} { = }
- { \keys_set:nn { csl / cite-item } {#2} }
- {
- \regex_match:nnTF { \d+ } {#2}
- { \__csl_set_locator:nn { page } {#2} }
- {
- \tl_set:Nn \l__csl_suffix_tl {#2}
- \tl_put_left:NV \l__csl_suffix_tl \l__csl_suffix_separator_tl
- \prop_put:NnV \l__csl_cite_item_prop { suffix } \l__csl_suffix_tl
- }
- }
- }
- \__csl_serialize_prop:NN \l__csl_cite_item_prop \l_tmpa_tl
- \tl_put_left:NV \l_tmpa_tl { \c_left_brace_str }
- \tl_put_right:NV \l_tmpa_tl { \c_right_brace_str }
- \seq_put_right:NV \l__csl_citation_items_seq \l_tmpa_tl
- }
-
-\cs_new:Npn \__csl_set_locator:nn #1#2
- {
- \prop_put:Nnn \l__csl_cite_item_prop { label } {#1}
- \prop_put:Nnn \l__csl_cite_item_prop { locator } {#2}
- }
-
-\keys_define:nn { csl / cite-item }
- {
- prefix .prop_put:N = \l__csl_cite_item_prop,
- suffix .prop_put:N = \l__csl_cite_item_prop,
- locator .prop_put:N = \l__csl_cite_item_prop,
- label .prop_put:N = \l__csl_cite_item_prop,
- suppress-author .prop_put:N = \l__csl_cite_item_prop,
- author-only .prop_put:N = \l__csl_cite_item_prop,
- uris .prop_put:N = \l__csl_cite_item_prop,
- % Locators.
- act .code:n = { \__csl_set_locator:nn { act } {#1} } ,
- appendix .code:n = { \__csl_set_locator:nn { appendix } {#1} } ,
- article .code:n = { \__csl_set_locator:nn { article-locator } {#1} } ,
- book .code:n = { \__csl_set_locator:nn { book } {#1} } ,
- canon .code:n = { \__csl_set_locator:nn { canon } {#1} } ,
- chapter .code:n = { \__csl_set_locator:nn { chapter } {#1} } ,
- column .code:n = { \__csl_set_locator:nn { column } {#1} } ,
- elocation .code:n = { \__csl_set_locator:nn { elocation } {#1} } ,
- equation .code:n = { \__csl_set_locator:nn { equation } {#1} } ,
- figure .code:n = { \__csl_set_locator:nn { figure } {#1} } ,
- folio .code:n = { \__csl_set_locator:nn { folio } {#1} } ,
- issue .code:n = { \__csl_set_locator:nn { issue } {#1} } ,
- line .code:n = { \__csl_set_locator:nn { line } {#1} } ,
- note .code:n = { \__csl_set_locator:nn { note } {#1} } ,
- opus .code:n = { \__csl_set_locator:nn { opus } {#1} } ,
- page .code:n = { \__csl_set_locator:nn { page } {#1} } ,
- paragraph .code:n = { \__csl_set_locator:nn { paragraph } {#1} } ,
- part .code:n = { \__csl_set_locator:nn { part } {#1} } ,
- rule .code:n = { \__csl_set_locator:nn { rule } {#1} } ,
- scene .code:n = { \__csl_set_locator:nn { scene } {#1} } ,
- section .code:n = { \__csl_set_locator:nn { section } {#1} } ,
- sub-verbo .code:n = { \__csl_set_locator:nn { sub-verbo } {#1} } ,
- supplement .code:n = { \__csl_set_locator:nn { supplement } {#1} } ,
- table .code:n = { \__csl_set_locator:nn { table } {#1} } ,
- timestamp .code:n = { \__csl_set_locator:nn { timestamp } {#1} } ,
- title .code:n = { \__csl_set_locator:nn { title-locator } {#1} } ,
- verse .code:n = { \__csl_set_locator:nn { verse } {#1} } ,
- version .code:n = { \__csl_set_locator:nn { version } {#1} } ,
- volume .code:n = { \__csl_set_locator:nn { volume } {#1} } ,
- % Citation properties
- infix .prop_put:N = \l__csl_citation_properties_prop,
- }
-
-
-\tl_new:N \l__csl_citation_id_tl
-\tl_new:N \l__csl_cite_items_tl
-\tl_new:N \l__csl_note_index_tl
-
-% Load the cite keys and prepare:
-% - \l__csl_citation_id_tl
-% - \l__csl_citation_properties_prop
-%
-% #1: \l__csl_cite_keys_seq
-% #2: \l__csl_citation_items_seq
-\cs_new:Npn \__csl_process_citation_info:NN #1#2
- {
- \__csl_process_citation_id:NN \l__csl_citation_id_tl #1
- \__csl_get_note_index:N \l__csl_note_index_tl
- \prop_put:NnV \l__csl_citation_properties_prop { noteIndex } \l__csl_note_index_tl
- \__csl_add_back_ref_info:
- }
-
-
-\tl_new:N \l__csl_back_ref_tl
-\prop_new:N \g__csl_back_ref_info_prop
-\prop_new:N \l__csl_back_ref_section_pop
-
-% Provide empty \@currentHref when hyperref is not loaded.
-\cs_new:Npn \@currentHref {}
-
-% TODO: write backref info to .brf file or .aux file
-\cs_new:Npn \__csl_add_back_ref_info:
- {
- % Same as the second argument of backref's \backcite
- % \thepage: the page number
- % \@currentlabel: the current label of the citation
- % \@currentHref: the current anchor name
- \tl_if_empty:NTF \@currentlabel
- {
- \tl_set:Nx \l__csl_back_ref_tl
- { { \thepage } { (document) } { Doc-Start } }
- }
- {
- \tl_set:Nx \l__csl_back_ref_tl
- { { \thepage } { \@currentlabel } { \@currentHref } }
- }
- \seq_map_inline:Nn \l__csl_cite_keys_seq
- {
- \prop_get:NnNTF \g__csl_back_ref_info_prop {##1} \l_tmpa_tl
- {
- \tl_put_right:Nn \l_tmpa_tl { , }
- \tl_put_right:NV \l_tmpa_tl \l__csl_back_ref_tl
- \prop_gput:NnV \g__csl_back_ref_info_prop {##1} \l_tmpa_tl
- }
- {
- \prop_gput:NnV \g__csl_back_ref_info_prop {##1}
- \l__csl_back_ref_tl
- }
- }
- }
-
-
-\tl_new:N \l__csl_citation_info_tl
-\tl_new:N \l__csl_citation_tl
-\prop_new:N \g__csl_citations_prop
-
-\tl_new:N \l__csl_citation_properties_tl
-
-% Write citation info to aux and print the citation contents.
-% #1: \l__csl_citation_info_prop
-\cs_new:Npn \__csl_make_citation:N #1
- {
- \prop_clear:N \l__csl_citation_info_prop
- % citationID
- \prop_put:NnV \l__csl_citation_info_prop { citationID } \l__csl_citation_id_tl
- % citationItems
- \__csl_serialize_seq:NN \l__csl_citation_items_seq \l__csl_cite_items_tl
- \prop_put:NnV \l__csl_citation_info_prop { citationItems } \l__csl_cite_items_tl
- % properties
- \__csl_serialize_prop:NN \l__csl_citation_properties_prop \l__csl_citation_properties_tl
- \prop_put:NnV \l__csl_citation_info_prop { properties } \l__csl_citation_properties_tl
- \__csl_serialize_prop:NN \l__csl_citation_info_prop \l__csl_citation_info_tl
- % Write to .aux file
- % \tl_show:N \l__csl_citation_info_tl
- \exp_args:NV \__csl_write_aux_citation:n \l__csl_citation_info_tl
- \bool_if:NT \l__csl_regression_test_bool
- { \tl_show:N \l__csl_citation_info_tl }
- % Print the citation string
- \prop_get:NVNTF \g__csl_citations_prop \l__csl_citation_id_tl
- \l__csl_citation_tl
- { \__csl_print_citation:N \l__csl_citation_tl }
- {
- \bool_if:NTF \l__csl_engine_initialized_bool
- {
- % \tl_show:N \l__csl_citation_info_tl
- % \tl_set:Nf \l__csl_citation_tl
- % { \exp_args:NV \__csl_cite_aux:n \l__csl_citation_info_tl }
- \group_begin:
- \char_set_catcode_other:N \%
- \char_set_catcode_other:N \#
- \exp_args:NV \__csl_cite_aux:n \l__csl_citation_info_tl
- \__csl_print_citation:N \l__csl_citation_tl
- \group_end:
- }
- {
- \exp_args:Nx \__csl_print_undefined_citation:n
- { \seq_use:Nn \l__csl_cite_keys_seq { ,~ } }
- }
- }
- }
-
-\cs_new:Npn \__csl_cite_aux:n #1
- { \lua_now:e { csl.cite("\lua_escape:n {#1}") } }
-
-% #1: seq
-% #2: tl
-\cs_new:Npn \__csl_serialize_seq:NN #1#2
- {
- \tl_clear:N #2
- \seq_map_inline:Nn #1
- {
- \tl_if_empty:NF #2
- { \tl_put_right:Nn #2 { , } }
- \tl_put_right:Nn #2 { ##1 }
- }
- }
-
-% #1: prop
-% #2: tl
-\cs_new:Npn \__csl_serialize_prop:NN #1#2
- {
- \tl_clear:N #2
- \prop_map_inline:Nn #1
- {
- \tl_if_empty:NF #2
- { \tl_put_right:Nn #2 { , } }
- \tl_put_right:Nn #2 { ##1 = { ##2 } }
- }
- }
-
-\tl_new:N \l__csl_cite_keys_tl
-\tl_new:N \l__csl_citation_count_tl
-\int_new:N \l__csl_citation_count_int
-\prop_new:N \g__csl_citations_count_prop
-
-\cs_new:Npn \__csl_process_citation_id:NN #1#2
- % #1: \l__csl_citation_id_tl
- % #2: \l__csl_cite_keys_seq
- % Set \l__csl_citation_id_tl = "ITEM-1,ITEM-2@4".
- {
- \tl_set:Nx \l__csl_cite_keys_tl
- { \seq_use:Nn #2 { , } }
- % \prop_show:N \g__csl_citations_count_prop
- % \tl_show:N \l__csl_cite_keys_tl
- \prop_get:NVNTF \g__csl_citations_count_prop \l__csl_cite_keys_tl
- \l__csl_citation_count_tl
- {
- \int_set:Nn \l__csl_citation_count_int { \l__csl_citation_count_tl }
- \int_incr:N \l__csl_citation_count_int
- }
- { \int_set_eq:NN \l__csl_citation_count_int \c_one_int }
- \prop_gput:NVV \g__csl_citations_count_prop \l__csl_cite_keys_tl
- \l__csl_citation_count_int
- \tl_set:Nx #1
- { \l__csl_cite_keys_tl @ \int_use:N \l__csl_citation_count_int }
- }
-
-
-\int_new:N \g__csl_pseudo_note_index_int
-\int_gset:Nn \g__csl_pseudo_note_index_int { 0 }
-
-% Save the note number to \l__csl_note_index_tl
-% TODO: multiple citations in a note
-\cs_new:Npn \__csl_get_note_index:N #1
- % #1: \l__csl_note_index_tl
- {
- \bool_if:NTF \l__csl_note_bool
- {
- \int_set_eq:Nc \l_tmpa_int { c@ \@mpfn }
- \int_incr:N \l_tmpa_int
- \tl_set:Nx #1 { \int_use:N \l_tmpa_int }
- }
- {
- \tl_if_empty:NTF \l__csl_class_tl
- {
- % The style class (in-text/note) is undetermined.
- \int_set_eq:Nc \l_tmpa_int { c@ \@mpfn }
- \int_gincr:N \g__csl_pseudo_note_index_int
- \int_add:Nn \l_tmpa_int { \g__csl_pseudo_note_index_int }
- \tl_set:Nx #1 { \int_use:N \l_tmpa_int }
- }
- { \tl_set:Nx #1 { 0 } }
- }
- }
-
-
-\cs_new:Npn \__csl_write_aux_citation:n #1
- % #1: citation info "{<citationID>}{{id=ITEM-1},{id=ITEM-2}}{<noteIndex>}"
- {
- \if@filesw
- \iow_now:Nn \@auxout { \csl@aux@cite {#1} }
- \fi
- }
-
-
-% #1: \l__csl_citation_tl
-\cs_new:Npn \__csl_print_citation:N #1
- {
- \bool_if:NT \l__csl_regression_test_bool
- { \tl_show:N #1 }
- \bool_if:NTF \l__csl_note_bool
- { \footnote {#1} }
- {#1}
- }
-
-
-\cs_new:Npn \__csl_print_undefined_citation:n #1
- % #1: keys
- {
- \G@refundefinedtrue
- \msg_warning:nnn { citation-style-language } { citation / undefined } {#1}
- \tl_if_blank:nTF {#1}
- { \tl_set:Nn \l__csl_citation_tl { [ \textbf { ? } ] } }
- { \tl_set:Nn \l__csl_citation_tl { [ \textbf {#1} ] } }
- \bool_if:NT \l__csl_regression_test_bool
- { \tl_show:N \l__csl_citation_tl }
- \group_begin:
- \reset@font \l__csl_citation_tl
- \group_end:
- }
-
-\msg_new:nnn { citation-style-language } { citation / undefined }
- { Citation~ `#1'~ on~ page~ \thepage \space undefined~ \msg_line_context: . }
-
-
-\DeclareDocumentCommand \nocite { m }
- { \__csl_no_cite:n {#1} }
-
-
-\cs_new:Npn \__csl_no_cite:n #1
- {
- \seq_clear:N \l__csl_cite_keys_seq
- \seq_clear:N \l__csl_citation_items_seq
- \__csl_process_cite_input:nnn { } { } {#1}
- \tl_set:Nx \l__csl_cite_items_tl
- { \seq_use:Nn \l__csl_citation_items_seq { , } }
- \tl_set:Nx \l__csl_citation_info_tl
- {
- citationID = { @nocite } ,
- citationItems = { \l__csl_cite_items_tl } ,
- properties = { noteIndex = { 0 } }
- }
- \bool_if:NT \l__csl_regression_test_bool
- { \tl_show:N \l__csl_citation_info_tl }
- \exp_args:NV \__csl_no_cite_write_aux:n \l__csl_citation_info_tl
- \sys_if_engine_luatex:T
- { \lua_now:n { csl.nocite("#1") } }
- \tl_clear:N \l__csl_citation_tl
- \bool_if:NT \l__csl_regression_test_bool
- { \tl_show:N \l__csl_citation_tl }
-}
-
-
-\cs_new:Npn \__csl_no_cite_write_aux:n #1
- {
- \__csl_if_preamble:TF
- {
- \AtBeginDocument
- { \exp_args:Nx \__csl_write_aux_citation:n { #1 } }
- }
- { \exp_args:Nx \__csl_write_aux_citation:n { #1 } }
- }
-
-
-\prg_new_conditional:Nnn \__csl_if_preamble: { T , F , TF }
- {
- \if_meaning:w \@begindocumenthook \@undefined
- \prg_return_false:
- \else
- \prg_return_true:
- \fi
- }
-
-
-% Used in aux files to register cite items.
-% #1: a citation object
-\cs_set:Npn \csl@aux@cite #1
- {
- \sys_if_engine_luatex:T
- { \lua_now:e { csl.register_citation_info("\lua_escape:n {#1}") } }
- }
-
-
-\cs_new:Npn \cslcitation #1#2
- { \prop_gput:Nnn \g__csl_citations_prop {#1} {#2} }
-
-
-% This command is for use with hyperref.
-% #1: cite id
-% #2: cite contents
-\cs_new:Npn \cslcite #1#2 {#2}
-
-
-\keys_define:nn { csl / bibliography }
- {
- type .code:n = \__csl_add_filter_condition:nn { type } {#1} ,
- nottype .code:n = \__csl_add_filter_condition_negative:nn { type } {#1} , % subtype .code:n = \__csl_add_filter_condition:nn { subtype } {#1} ,
- % notsubtype .code:n = \__csl_add_filter_condition_negative:nn { subtype } {#1} ,
- keyword .code:n = \__csl_add_filter_condition:nn { keyword } {#1} ,
- notkeyword .code:n = \__csl_add_filter_condition_negative:nn { keyword } {#1} ,
- category .code:n = \__csl_add_filter_condition:nn { categories } {#1} ,
- notcategory .code:n = \__csl_add_filter_condition_negative:nn { categories } {#1} ,
- % filter .tl_set:N = \l__csl_bibliography_nottype_tl ,
- }
-
-\seq_new:N \l__bibliography_filter_conditions_seq
-\tl_new:N \l__bibliography_filter_conditions_tl
-
-\cs_new:Npn \__csl_add_filter_condition:nn #1#2
- {
- \seq_put_right:Nn \l__bibliography_filter_conditions_seq
- {
- {
- field = #1 ,
- value = #2
- }
- }
- }
-
-\cs_new:Npn \__csl_add_filter_condition_negative:nn #1#2
- {
- \seq_put_right:Nn \l__bibliography_filter_conditions_seq
- {
- {
- field = #1,
- value = #2,
- negative = true
- }
- }
- }
-
-
-\NewDocumentCommand \printbibliography { O { } }
- {
- % Set categories
- \prop_if_empty:NF \l__csl_categories_prop
- {
- \tl_clear:N \l_tmpa_tl
- \prop_map_inline:Nn \l__csl_categories_prop
- {
- \tl_if_empty:NF \l_tmpa_tl
- { \tl_put_right:Nn \l_tmpa_tl { , } }
- \tl_put_right:Nn \l_tmpa_tl { ##1 = {##2} }
- }
- \sys_if_engine_luatex:T
- { \lua_now:e { csl.set_categories("\l_tmpa_tl") } }
- {
- \tl_put_left:Nx \l_tmpa_tl { categories = \c_left_brace_str }
- \tl_put_right:NV \l_tmpa_tl \c_right_brace_str
- \exp_args:NV \__csl_write_aux_options:n \l_tmpa_tl
- }
- }
- % Bibliography filter
- \seq_clear:N \l__bibliography_filter_conditions_seq
- \keys_set:nn { csl / bibliography } {#1}
- \tl_clear:N \l__bibliography_filter_conditions_tl
- \seq_if_empty:NF \l__bibliography_filter_conditions_seq
- {
- \tl_set:Nx \l__bibliography_filter_conditions_tl
- { select = \c_left_brace_str }
- \tl_put_right:Nx \l__bibliography_filter_conditions_tl
- { \seq_use:Nn \l__bibliography_filter_conditions_seq { , } }
- \tl_put_right:NV \l__bibliography_filter_conditions_tl
- { \c_right_brace_str }
- % Write to aux file
- \sys_if_engine_luatex:F
- {
- \tl_set:Nx \l_tmpa_tl { bib-filter = \c_left_brace_str }
- \tl_put_right:NV \l_tmpa_tl { \l__bibliography_filter_conditions_tl }
- \tl_put_right:NV \l_tmpa_tl { \c_right_brace_str }
- \exp_args:NV \__csl_write_aux_options:n \l_tmpa_tl
- }
- }
- % Collect the bibliography to token list
- \sys_if_engine_luatex:T
- {
- \bool_if:NT \l__csl_engine_initialized_bool
- {
- \__csl_collect_bibliography:n
- {
- \lua_now:e
- { csl.bibliography("\l__bibliography_filter_conditions_tl") }
- }
- }
- }
- % Print the bibliography
- \tl_if_empty:NTF \g__csl_bibliography_tl
- { \msg_warning:nn { citation-style-language } { bibliography / empty } }
- {
- \bool_if:NT \l__csl_regression_test_bool
- {
- \seq_set_split:NnV \l__csl_bibliography_seq { \par } \g__csl_bibliography_tl
- \seq_show:N \l__csl_bibliography_seq
- }
- \tl_use:N \g__csl_bibliography_tl
- }
- }
-
-\msg_new:nnn { citation-style-language } { bibliography / empty }
- { The~ bibliography~ is~ empty. }
-
+\bool_new:N \l__csl_regression_test_bool
\tl_new:N \l__csl_style_tl
\newcommand \csl@style {} % For latex2e interface
\tl_new:N \l__csl_class_tl
@@ -694,11 +62,6 @@
\bool_new:N \l__csl_bib_entry_page_break_bool
\tl_new:N \l__csl_bib_item_sep_tl
\tl_new:N \l__csl_bib_hang_tl
-\bool_new:N \l__csl_hanging_indent_bool
-\tl_new:N \l__csl_line_spacing_tl
-\tl_new:N \l__csl_entry_spacing_tl
-
-\tl_set:Nn \l__csl_back_ref_type_str { page }
\keys_define:nn { csl }
@@ -728,451 +91,6 @@
bib-entry-page-break .bool_set:N = \l__csl_bib_entry_page_break_bool ,
bib-item-sep .tl_set:N = \l__csl_bib_item_sep_tl ,
bib-hang .tl_set:N = \l__csl_bib_hang_tl ,
- hanging-indent .bool_set:N = \l__csl_hanging_indent_bool ,
- line-spacing .tl_set:N = \l__csl_line_spacing_tl ,
- entry-spacing .tl_set:N = \l__csl_entry_spacing_tl ,
- }
-
-\keys_set:nn { csl }
- {
- prefix-separator = { ~ } ,
- suffix-separator = { , ~ } ,
- bib-entry-page-break = true ,
- bib-hang = { 1 em } ,
- line-spacing = { 1 } ,
- entry-spacing = { 1 } ,
- }
-
-
-\ProcessKeysPackageOptions { csl }
-
-\bool_new:N \l__csl_engine_initialized_bool
-
-\prop_set_from_keyval:Nn \l__csl_language_code_map_prop
- {
- acadian = fr-CA,
- american = en-US,
- australian = en-AU,
- afrikaans = af-ZA,
- albanian = sq-AL,
- amharic = am-ET,
- arabic = ar,
- armenian = hy-AM,
- asturian = ast-ES,
- austrian = de-AT,
- bahasa = id-ID,
- bahasai = id-ID,
- bahasam = id-ID,
- basque = eu-ES,
- bengali = bn-BD,
- bgreek = el-GR,
- brazil = pt-BR,
- brazilian = pt-BR,
- breton = br-FR,
- british = en-GB,
- bulgarian = bg-BG,
- canadian = en-CA,
- canadien = fr-CA,
- catalan = ca-AD,
- coptic = cop,
- croatian = hr-HR,
- czech = cs-CZ,
- danish = da-DK,
- divehi = dv-MV,
- dutch = nl-NL,
- english = en-US,
- esperanto = eo-001,
- estonian = et-EE,
- ethiopia = am-ET,
- farsi = fa-IR,
- finnish = fi-FI,
- francais = fr-FR,
- french = fr-FR,
- frenchle = fr-FR,
- friulan = fur-IT,
- galician = gl-ES,
- german = de-DE,
- germanb = de-DE,
- greek = el-GR,
- hebrew = he-IL,
- hindi = hi-IN,
- ibygreek = el-CY,
- icelandic = is-IS,
- indon = id-ID,
- indonesia = id-ID,
- interlingua = ia-FR,
- irish = ga-IE,
- italian = it-IT,
- japanese = ja-JP,
- kannada = kn-IN,
- lao = lo-LA,
- latin = la-Latn,
- latvian = lv-LV,
- lithuanian = lt-LT,
- lowersorbian = dsb-DE,
- lsorbian = dsb-DE,
- magyar = hu-HU,
- malay = id-ID,
- malayalam = ml-IN,
- marathi = mr-IN,
- meyalu = id-ID,
- mongolian = mn-Cyrl,
- naustrian = de-AT,
- newzealand = en-NZ,
- ngerman = de-DE,
- nko = ha-NG,
- norsk = nb-NO,
- norwegian = nn-NO,
- nynorsk = nn-NO,
- occitan = oc-FR,
- piedmontese = pms-IT,
- pinyin = pny,
- polish = pl-PL,
- polutonikogreek = el-GR,
- portuges = pt-PT,
- portuguese = pt-PT,
- romanian = ro-RO,
- romansh = rm-CH,
- russian = ru-RU,
- samin = se-NO,
- sanskrit = sa-IN,
- scottish = gd-GB,
- serbian = sr-Latn,
- serbianc = sr-Cyrl,
- slovak = sk-SK,
- slovene = sl-SI,
- slovenian = sl-SI,
- spanish = es-ES,
- swedish = sv-SE,
- swiss = de-CH,
- swissgerman = de-CH,
- nswissgerman = de-CH,
- syriac = syc,
- tamil = ta-IN,
- telugu = te-IN,
- thai = th-TH,
- thaicjk = th-TH,
- tibetan = bo-CN,
- turkish = tr-TR,
- turkmen = tk-TM,
- ukrainian = uk-UA,
- urdu = ur-IN,
- UKenglish = en-UK,
- uppersorbian = hsb-DE,
- USenglish = en-US,
- usorbian = hsb-DE,
- vietnamese = vi-VN,
- welsh = cy-GB,
- }
-
-\tl_new:N \g__csl_bibliography_tl
-\tl_new:N \g__csl_bibliography_setup_tl
-\seq_new:N \l__csl_bibliography_seq
-
-
-\AtBeginDocument { \__csl_at_begin_document_hook: }
-
-
-\cs_new:Npn \__csl_at_begin_document_hook:
- {
- \__csl_write_aux_info:
- \sys_if_engine_luatex:TF
- { \__csl_initialize_lua_module: }
- { \__csl_load_bbl: }
- }
-
-
-\cs_new:Npn \__csl_write_aux_info:
- {
- \tl_if_empty:NTF \l__csl_style_tl
- {
- \tl_set_eq:NN \l__csl_style_tl \g__csl_aux_bibstyle_tl
- \edef \csl@style { \g__csl_aux_bibstyle_tl }
- }
- { \exp_args:Nx \__csl_write_aux_bibstyle:n { \l__csl_style_tl } }
- \clist_if_empty:NTF \l__csl_bib_resources_clist
- { \clist_set_eq:NN \l__csl_bib_resources_clist \g__csl_aux_bib_files_clist }
- {
- \exp_args:Nx \__csl_write_aux_bibdata:n
- { \clist_use:Nn \l__csl_bib_resources_clist { , } }
- }
- \__csl_write_aux_csl_options:
- }
-
-\cs_new:Npn \__csl_write_aux_bibstyle:n #1
- {
- \if@filesw
- \iow_now:Nx \@auxout { \token_to_str:N \csl@aux@style {#1} }
- \fi
- }
-
-
-\cs_new:Npn \__csl_initialize_lua_module:
- {
- \lua_now:e
- {
- csl.init(
- "\l__csl_style_tl",
- "\l__csl_bib_resources_clist",
- "\l__csl_locale_tl"
- )
- }
- \str_if_eq:eeT { \lua_now:n { tex.print(csl.initialized) } } { true }
- { \bool_set_true:N \l__csl_engine_initialized_bool }
- \__csl_get_style_class:
- \@ifpackageloaded { hyperref }
- { \lua_now:n { csl.enable_linking() } }
- { }
- }
-
-
-% \str_new:N \l__csl_style_class_str
-% In-text (including numeric or author-date) or note style
-% \bool_new:N \l__csl_note_style_bool
-
-\cs_new:Npn \__csl_get_style_class: {
- \bool_if:NT \l__csl_engine_initialized_bool
- {
- \tl_set:Nx \l__csl_class_tl { \lua_now:n { csl.get_style_class() } }
- \tl_if_eq:NnT \l__csl_class_tl { note }
- { \bool_set_true:N \l__csl_note_bool }
- }
-}
-
-
-\clist_new:N \l__csl_options_clist
-
-\cs_new:Npn \__csl_write_aux_csl_options:
- {
- \clist_clear:N \l__csl_options_clist
- % locale
- \tl_if_empty:NT \l__csl_locale_tl
- {
- \tl_if_exist:NT \bbl@main@language
- {
- \prop_get:NVN \l__csl_language_code_map_prop \bbl@main@language
- \l__csl_locale_tl
- }
- }
- \tl_if_empty:NF \l__csl_locale_tl
- {
- \clist_put_right:Nx \l__csl_options_clist
- { locale = \l__csl_locale_tl }
- }
- % linking
- \@ifpackageloaded { hyperref }
- { \clist_put_right:Nn \l__csl_options_clist { linking = true } }
- { }
- % write to aux file
- \prop_if_empty:NF \l__csl_options_clist
- {
- \exp_args:Nx \__csl_write_aux_options:n
- { \clist_use:Nn \l__csl_options_clist { , } }
- }
- }
-
-\cs_new:Npn \__csl_write_aux_options:n #1
- {
- \if@filesw
- \iow_now:Nn \@auxout { \csl@aux@options {#1} }
- \fi
- }
-
-
-% Load .bbl at the beginning of document to save one pass of latex.
-% In this procedure, the \cslcitation command is processed and the contents
-% of `thebibliography` is stored into \g__csl_bibliography_tl.
-\cs_new:Npn \__csl_load_bbl:
- {
- % The \@input@ prints "No file ....bbl" in the .log file from which
- % the latexmk decides to run $bibtex or not.
- \__csl_collect_bibliography:n { \@input@ { \jobname .bbl } }
- % Execute the \cslsetup part to set the style class.
- % \tl_show:N \g__csl_bibliography_setup_tl
- \tl_use:N \g__csl_bibliography_setup_tl
- % \bool_show:N \l__csl_note_bool
- }
-
-% Collection the bibliography (as well as \cslsetup) into \g__csl_bibliography_setup_tl
-\cs_new:Npn \__csl_collect_bibliography:n #1
- {
- \group_begin:
- % URLs may contain "%" and "#" characters.
- \char_set_catcode_other:N \%
- \char_set_catcode_other:N \#
- \RenewDocumentCommand \cslsetup { m }
- { \tl_gset:Nn \g__csl_bibliography_setup_tl { \cslsetup { ##1 } } }
- \RenewDocumentEnvironment { thebibliography } { m +b }
- {
- \tl_gset:Nn \g__csl_bibliography_tl
- {
- \begin { thebibliography } {##1}
- ##2
- \end { thebibliography }
- }
- }
- { }
- % Perform the execution
- #1
- \tl_if_empty:NF \g__csl_bibliography_setup_tl
- {
- \tl_gput_left:Nn \g__csl_bibliography_tl { \par }
- \tl_gput_left:NV \g__csl_bibliography_tl \g__csl_bibliography_setup_tl
- }
- \group_end:
- }
-
-% \msg_new:nnn { citation-style-language } { file / non-exist }
-% { No~ file~ #1. }
-
-
-\DeclareDocumentCommand \bibliographystyle { m }
- {
- \__csl_if_preamble:F
- { \__csl_write_aux_bibstyle:n {#1} }
- \tl_set:Nn \l__csl_style_tl {#1}
- }
-
-\tl_new:N \g__csl_aux_bibstyle_tl
-\cs_set:Npn \csl@aux@style #1
- { \tl_gset:Nn \g__csl_aux_bibstyle_tl {#1} }
-
-
-\NewDocumentCommand \addbibresource { o m }
- { \clist_put_right:Nn \l__csl_bib_resources_clist {#2} }
-
-
-% In earlier time, \bibdata{xxx.json} was used but this causes latexmk unable
-% to find xxx.json.bib and it refuses to run the $bibtex procedure.
-% John Collins suggests using a different command than \bibdata.
-\clist_new:N \g__csl_aux_bib_files_clist
-\cs_new:Npn \csl@aux@data #1
- { \clist_gput_right:Nn \g__csl_aux_bib_files_clist {#1} }
-
-
-\DeclareDocumentCommand \bibliography { m }
- {
- \__csl_write_aux_bibdata:n {#1}
- \printbibliography
- }
-
-\cs_new:Npn \__csl_write_aux_bibdata:n #1
- {
- \if@filesw
- % Full expansion for files like \jobname.bib
- \iow_now:Nx \@auxout { \token_to_str:N \csl@aux@data {#1} }
- \fi
- }
-
-
-% Used for debugging and testing
-\clist_new:N \g__csl_bib_items_clist
-% Backref
-\bool_set_false:N \l__csl_back_ref_bool
-
-% For numeric or label-style bibliography
-% \def\@lbibitem[#1]#2{\item[\@biblabel{#1}\hfill]\if@filesw
-% {\let\protect\noexpand
-% \immediate
-% \write\@auxout{\string\bibcite{#2}{#1}}}\fi\ignorespaces}
-\cs_new:Npn \__csl_lbibitem_plain:nn [#1]#2
- {
- \clist_gput_right:Nn \g__csl_bib_items_clist {#2}
- \item [ \@biblabel {#1} \hfill ]
- \ignorespaces
- }
-
-\cs_new:Npn \__csl_lbibitem_back_ref:nnn [#1]#2#3\par
- {
- \__csl_lbibitem_plain:nn [#1] {#2}
- #3
- \prop_get:NnNT \g__csl_back_ref_info_prop {#2} \l_tmpa_tl
- {
- \c_space_tl
- \exp_args:NV \__csl_print_back_refs:n \l_tmpa_tl
- }
- \par
- }
-
-\cs_new:Npn \__csl_print_back_refs:n #1
- % #1: list of {<page>}{<label>}{anchor}
- {
- \clist_set:Nn \l_tmpa_clist {#1}
- % To remove duplicates
- \prop_clear:N \l_tmpa_prop
- % Output seq
- \seq_clear:N \l_tmpa_seq
- \clist_map_inline:Nn \l_tmpa_clist { \__csl_print_back_ref_aux:nnn ##1 }
- \backref { \seq_use:Nn \l_tmpa_seq { ,~ } }
- }
-
-\cs_new:Npn \__csl_print_back_ref_aux:nnn #1#2#3
- {
- \str_if_eq:VnTF \l__csl_back_ref_type_str { page }
- {
- \prop_if_in:NnF \l_tmpa_prop {#1}
- {
- \bool_if:NTF \l__csl_hyperref_loaded_bool
- { \seq_put_right:Nn \l_tmpa_seq { \hyperlink { page. #1 } {#1} } }
- { \seq_put_right:Nn \l_tmpa_seq {#1} }
- \prop_put:Nnn \l_tmpa_prop {#1} {#1}
- }
- }
- {
- % section
- \prop_if_in:NnF \l_tmpa_prop {#2}
- {
- \bool_if:NTF \l__csl_hyperref_loaded_bool
- { \seq_put_right:Nn \l_tmpa_seq { \hyperlink {#3} {#2} } }
- { \seq_put_right:Nn \l_tmpa_seq {#2} }
- \prop_put:Nnn \l_tmpa_prop {#2} {#2}
- }
- }
- }
-
-% Hook
-\cs_new:Npn \backref #1 {#1}
-
-\cs_new:Npn \__csl_lbibitem:
- {
- \bool_if:NTF \l__csl_back_ref_bool
- { \__csl_lbibitem_back_ref:nnn }
- { \__csl_lbibitem_plain:nn }
- }
-
-\cs_set_eq:NN \@lbibitem \__csl_lbibitem:
-
-
-% For author-date bibliography
-% \def\@bibitem#1{\item\if@filesw \immediate\write\@auxout
-% {\string\bibcite{#1}{\the\value{\@listctr}}}\fi\ignorespaces}
-\cs_new:Npn \__csl_bibitem:
- {
- \bool_if:NTF \l__csl_back_ref_bool
- { \__csl_bibitem_back_ref:nn }
- { \__csl_bibitem_plain:n }
- }
-
-\cs_set_eq:NN \@bibitem \__csl_bibitem:
-
-\cs_new:Npn \__csl_bibitem_plain:n #1
- {
- \clist_gput_right:Nn \g__csl_bib_items_clist {#1}
- \item
- \ignorespaces
- }
-
-\cs_new:Npn \__csl_bibitem_back_ref:nn #1#2\par
- {
- \__csl_bibitem_plain:n {#1}
- #2
- % \prop_show:N \g__csl_back_ref_info_prop
- \prop_get:NnNT \g__csl_back_ref_info_prop {#1} \l_tmpa_tl
- {
- \c_space_tl
- \exp_args:NV \__csl_print_back_refs:n \l_tmpa_tl
- }
- \par
}
\cs_new:Npn \__csl_set_back_ref:n #1
@@ -1189,372 +107,38 @@
}
}
-
-% CSL outputs the whole label thus the brackets are removed from \@biblabel
-% \def\@biblabel#1{[#1]}
-\cs_set:Npn \@biblabel #1 {#1}
-
-
-% Bibliography heading
-\cs_if_exist:cTF { chapter }
- {
- \tl_set:Nn \bibsection
- {
- \chapter*
- {
- \bibname
- \@mkboth
- { \MakeUppercase { \bibname } }
- { \MakeUppercase { \bibname } }
- }
- }
- }
- {
- \tl_set:Nn \bibsection
- {
- \section*
- {
- \refname
- \@mkboth
- { \MakeUppercase { \refname } }
- { \MakeUppercase { \refname } }
- }
- }
- }
-
-\tl_new:N \l__csl_bib_preamble_tl
-
-\tl_new:N \l__csl_bib_postamble_tl
-
-\dim_new:N \l__csl_bib_hang_dim
-
-\cs_new:Npn \__csl_set_bib_label_spacing:n #1
- {
- \bool_if:NTF \l__csl_hanging_indent_bool
- {
- \dim_set:Nn \l__csl_bib_hang_dim { \l__csl_bib_hang_tl }
- \dim_set_eq:NN \leftmargin \l__csl_bib_hang_dim
- \dim_set:Nn \itemindent { - \leftmargin }
- }
- {
- \settowidth \labelwidth { \@biblabel {#1} }
- \dim_set_eq:NN \leftmargin \labelwidth
- \dim_add:Nn \leftmargin { \labelsep }
- }
- }
-
-% In standard LaTeX classes (10pt), the vertical sep of bibliographic item is
-% \itemsep (4\p@ \@plus2\p@ \@minus\p@) + \parsep (4\p@ \@plus2\p@ \@minus\p@)
-% = 8pt plus 4pt minus 2pt
-\cs_new:Npn \__csl_set_bib_item_sep:
- {
- \skip_zero:N \parsep
- \tl_if_empty:NTF \l__csl_bib_item_sep_tl
- {
- \skip_set:Nn \itemsep
- {
- 8 pt plus 4 pt minus 2 pt * \dim_ratio:nn { 1 em } { 8 pt }
- * \l__csl_entry_spacing_tl
- }
- }
- { \skip_set:Nn \itemsep { \l__csl_bib_item_sep_tl } }
- }
-
-
-% See <https://github.com/plk/biblatex/blob/e16f4aaa5d9857c7b844bbcbe246f0535fd334e9/tex/latex/biblatex/biblatex.def#L219-L258>
-
-\cs_new:Npn \__csl_set_bib_allow_break:
- {
- \sloppy
- \int_set:Nn \clubpenalty { 4000 }
- \int_set_eq:NN \@clubpenalty \clubpenalty
- \int_set:Nn \widowpenalty { 4000 }
- % \sfcode`\.\@m
- \frenchspacing
- }
-
-\cs_new:Npn \__csl_set_bib_no_break:
- {
- \sloppy
- \int_set:Nn \interlinepenalty { 5000 }
- \int_set:Nn \widowpenalty { 10000 }
- \int_set:Nn \clubpenalty { 10000 }
- \int_set_eq:NN \@clubpenalty \clubpenalty
- \raggedbottom
- \frenchspacing
- }
-
-\cs_new:Npn \__csl_set_bib_page_break:
- {
- \bool_if:NTF \l__csl_bib_entry_page_break_bool
- { \__csl_set_bib_allow_break: }
- { \__csl_set_bib_no_break: }
- }
-
-
-% Taken from `biblatex`'s \biburlsetup
-% https://github.com/plk/biblatex/blob/dev/tex/latex/biblatex/biblatex.def
-
-\int_new:N \l__csl_url_big_break_penalty_int
-\int_new:N \l__csl_url_break_penalty_int
-\int_new:N \l__csl_url_num_penalty_int
-\int_new:N \l__csl_url_uc_penalty_int
-\int_new:N \l__csl_url_lc_penalty_int
-
-\int_set:Nn \l__csl_url_big_break_penalty_int { 100 }
-\int_set:Nn \l__csl_url_break_penalty_int { 200 }
-% Allow linebreaks before numbers and letters.
-% Taken from `xurl.sty`.
-\int_set:Nn \l__csl_url_num_penalty_int { 9000 }
-\int_set:Nn \l__csl_url_uc_penalty_int { 9000 }
-\int_set:Nn \l__csl_url_lc_penalty_int { 8000 }
-
-\muskip_new:N \l__csl_url_big_muskip
-\muskip_new:N \l__csl_url_num_muskip
-\muskip_new:N \l__csl_url_uc_muskip
-\muskip_new:N \l__csl_url_lc_muskip
-
-\muskip_set:Nn \l__csl_url_big_muskip { 0mu plus 3mu }
-\muskip_set:Nn \l__csl_url_num_muskip { 0mu }
-\muskip_set:Nn \l__csl_url_uc_muskip { 0mu }
-\muskip_set:Nn \l__csl_url_lc_muskip { 0mu }
-
-\cs_new:Npn \__csl_bib_url_setup:
- {
- \urlstyle { same }
- \muskip_set_eq:NN \Urlmuskip \l__csl_url_big_muskip
- \mathchardef \UrlBigBreakPenalty = \l__csl_url_big_break_penalty_int
- \mathchardef \UrlBreakPenalty = \l__csl_url_break_penalty_int
- % \int_set_eq:NN doesn't work here
- % \int_set_eq:NN \UrlBigBreakPenalty \l__csl_url_big_break_penalty_int
- % \int_set_eq:NN \UrlBreakPenalty \l__csl_url_break_penalty_int
- \tl_set:Nn \UrlBigBreaks { \do \: \do \- }
- \tl_set:Nn \UrlBreaks
- {
- \do \. \do \@ \do \/ \do \\ \do \! \do \_ \do \| \do \; \do \> \do \]
- \do \) \do \} \do \, \do \? \do \' \do \+ \do \= \do \# \do \$ \do \&
- \do \* \do \^ \do \"
- }
- \int_compare:nNnT { \l__csl_url_num_penalty_int } > { 0 }
- {
- \clist_map_inline:nn
- { \1 , \2 , \3 , \4 , \5 , \6 , \7 , \8 , \9 , \0 }
- {
- \tl_put_right:Nn \UrlSpecials
- {
- \do ##1
- {
- \mathchar`##1
- \mskip \l__csl_url_num_muskip
- \penalty \l__csl_url_num_penalty_int
- }
- }
- }
- }
- \int_compare:nNnT { \l__csl_url_uc_penalty_int } > { 0 }
- {
- \clist_map_inline:nn
- {
- \A , \B , \C , \D , \E , \F , \G , \H , \I , \J ,
- \K , \L , \M , \N , \O , \P , \Q , \R , \S , \T ,
- \U , \V , \W , \X , \Y , \Z
- }
- {
- \tl_put_right:Nn \UrlSpecials
- {
- \do ##1
- {
- \mathchar`##1
- \mskip \l__csl_url_uc_muskip
- \penalty \l__csl_url_uc_penalty_int
- }
- }
- }
- }
- \int_compare:nNnT { \l__csl_url_lc_penalty_int } > { 0 }
- {
- \clist_map_inline:nn
- {
- \a , \b , \c , \d , \e , \f , \g , \h , \i , \j ,
- \k , \l , \m , \n , \o , \p , \q , \r , \s , \t ,
- \u , \v , \w , \x , \y , \z
- }
- {
- \tl_put_right:Nn \UrlSpecials
- {
- \do ##1
- {
- \mathchar`##1
- \mskip \l__csl_url_lc_muskip
- \penalty \l__csl_url_lc_penalty_int
- }
- }
- }
- }
- \cs_set_eq:NN \do \exp_not:N
- }
-
-% The above code allows linebreaks before numbers and letters.
-% This is often the only way to break DOIs. It also allows breaks
-% after hyphens and adjusts \Urlmuskip to add some stretchability
-% to URLs.
-
-
-% It will be used for multi-bibliography.
-\cs_new:Npn \__csl_reset_bib_format:
- {
- \keys_set:nn { csl } {
- hanging-indent = false ,
- line-spacing = 1 ,
- entry-spacing = 1 ,
- }
- }
-
-% \newenvironment{thebibliography}[1]
-\RenewDocumentEnvironment { thebibliography } { m }
- {
- \bibsection
- \dim_zero:N \parindent
- \l__csl_bib_preamble_tl
- \tl_if_eq:NnF \l__csl_line_spacing_tl { 1 }
- { \linespread { \l__csl_line_spacing_tl } \selectfont }
- \l__csl_bib_font_tl
- \list { }
- {
- \__csl_set_bib_label_spacing:n {#1}
- \__csl_set_bib_item_sep:
- }
- \sloppy
- \__csl_set_bib_page_break:
- \frenchspacing
- \__csl_bib_url_setup:
- \clist_gclear:N \g__csl_bib_items_clist
- }
- {
- \l__csl_bib_postamble_tl
- \tl_set:Nn \@noitemerr
- { \msg_warning:nn { citation-style-language } { bibliography / empty } }
- \endlist
- \__csl_reset_bib_format:
- }
-
-
-% Bibliography Categories
-
-\prop_new:N \l__csl_categories_prop
-
-% \DeclareBibliographyCategory{⟨category⟩}
-\NewDocumentCommand \DeclareBibliographyCategory { m }
- {
- \prop_put:Nnn \l__csl_categories_prop { #1 } { }
- }
-
-% \addtocategory{⟨category⟩}{⟨keys⟩}
-\NewDocumentCommand \addtocategory { m m }
- {
- \prop_get:NnNTF \l__csl_categories_prop {#1} \l_tmpa_tl
- {
- \tl_if_empty:NF \l_tmpa_tl
- { \tl_put_right:Nn \l_tmpa_tl { , } }
- \tl_put_right:Nn \l_tmpa_tl {#2}
- \prop_put:NnV \l__csl_categories_prop {#1} \l_tmpa_tl
- }
- {
- \msg_error:nnn { citation-style-language } { category-not-declared }
- {#1}
- }
- }
-
-
-\msg_new:nnn { citation-style-language } { category-not-declared }
- { Category~ '#1'~ not~ declared. }
-
-
-% Compatibilities with other packages
-
-% babel
-
-% This should be disabled.
-\AtEndOfPackageFile* { babel }
+% Default settings
+\keys_set:nn { csl }
{
- \RenewDocumentCommand \nocite { m }
- {
- % \@safe@activestrue\org@nocite{#1}\@safe@activesfalse
- \@safe@activestrue
- \__csl_no_cite:n {#1}
- \@safe@activesfalse
- }
- \cs_set_eq:NN \bbl@cite@choice \relax
- \cs_set_eq:NN \@lbibitem \__csl_lbibitem_plain:nn
- \cs_set_eq:NN \@bibitem \__csl_bibitem_plain:n
+ backref = false ,
+ prefix-separator = { ~ } ,
+ suffix-separator = { , ~ } ,
+ bib-entry-page-break = true ,
+ bib-hang = { 1 em } ,
}
-% csquotes
-
-\AtEndOfPackageFile* { csquotes }
- {
- \BlockquoteDisable
- {
- \cs_set_eq:NN \__csl_process_citation_info:NN \use_none:nn
- \cs_set_eq:NN \__csl_make_citation:N \use_none:n
- }
- }
-
+\ProcessKeysPackageOptions { csl }
-% hyperref
-% The hyperref package also patches \bibcite but it cannot provide hyperlinks
-% when used with csl.
-\bool_new:N \l__csl_hyperref_loaded_bool
-\AtEndOfPackageFile* { hyperref }
+\DeclareDocumentCommand \bibliographystyle { m }
{
- \bool_set_true:N \l__csl_hyperref_loaded_bool
- % Pakcage "hyperref" redefines \@lbibitem and \bibitem and we need to
- % recover them.
- \cs_gset_eq:NN \@lbibitem \__csl_lbibitem:
- \cs_gset_eq:NN \@bibitem \__csl_bibitem:
- \cs_gset_eq:NN \__csl_lbibitem_plain:nn \__csl_hyperref_lbibitem:nn
- \cs_gset_eq:NN \__csl_bibitem_plain:n \__csl_hyperref_bibitem:n
- \cs_gset_eq:NN \cslcite \__csl_hyperref_cite_item:nn
+ \__csl_if_preamble:F
+ { \__csl_write_aux_bibstyle:n {#1} }
+ \tl_set:Nn \l__csl_style_tl {#1}
}
-\cs_set:Npn \__csl_hyperref_cite_item:nn #1#2
- { \hyper@@link [ cite ] { } { cite. #1 \@extra@b@citeb } { #2 } }
+\tl_new:N \g__csl_aux_bibstyle_tl
+\cs_set:Npn \csl@aux@style #1
+ { \tl_gset:Nn \g__csl_aux_bibstyle_tl {#1} }
-\cs_new:Npn \__csl_hyperref_lbibitem:nn [#1]#2
- {
- \clist_gput_right:Nn \g__csl_bib_items_clist {#2}
- \@skiphyperreftrue
- \H@item[%
- \ifx\Hy@raisedlink\@empty
- \hyper@anchorstart{cite.#2\@extra@b@citeb}%
- \@BIBLABEL{#1}%
- \hyper@anchorend
- \else
- \Hy@raisedlink{%
- \hyper@anchorstart{cite.#2\@extra@b@citeb}\hyper@anchorend
- }%
- \@BIBLABEL{#1}%
- \fi
- \hfill
- ]%
- \@skiphyperreffalse
- \ignorespaces
- }
-\cs_new:Npn \__csl_hyperref_bibitem:n #1
- {
- \clist_gput_right:Nn \g__csl_bib_items_clist {#1}
- \@skiphyperreftrue \H@item \@skiphyperreffalse
- \Hy@raisedlink
- {
- \hyper@anchorstart
- { cite. #1 \@extra@b@citeb } \relax
- \hyper@anchorend
- }
- \ignorespaces
- }
+% Load other modules
+\input{citation-style-language-init.sty}
+\input{citation-style-language-data.sty}
+\input{citation-style-language-cite.sty}
+\input{citation-style-language-bib.sty}
+\input{citation-style-language-compatible.sty}
\endinput
diff --git a/biblio/citation-style-language/citeproc-bibtex-data.lua b/biblio/citation-style-language/citeproc-bibtex-data.lua
index d2b374e9aa..525f4d2fb8 100644
--- a/biblio/citation-style-language/citeproc-bibtex-data.lua
+++ b/biblio/citation-style-language/citeproc-bibtex-data.lua
@@ -5,3262 +5,4292 @@ return {
types = {
abstract = {
csl = nil,
+ source = "biblatex-cv.dbx",
},
ancienttext = {
csl = "classic",
+ source = "sbl.dbx",
},
archival = {
csl = "collection",
+ notes = "New in CSL v1.0.2.",
+ source = "jurabib.bst",
},
archive = {
csl = "collection",
+ source = "gbt7714-numerical.bst",
},
article = {
csl = "article-journal",
+ notes = "May also be `article-magazine` or `article-newspaper` depending upon the field `entrysubtype`.",
+ source = "bibtex",
},
["article-journal"] = {
csl = "article-journal",
+ source = "csl",
},
["article-magazine"] = {
csl = "article-magazine",
+ source = "csl",
},
["article-newspaper"] = {
csl = "article-newspaper",
+ source = "csl",
},
artifactdataset = {
csl = "dataset",
+ source = "ACM-Reference-Format.bst",
},
artifactsoftware = {
csl = "software",
+ source = "ACM-Reference-Format.bst",
},
artwork = {
csl = "graphic",
+ source = "biblatex",
},
atlas = {
csl = nil,
+ source = "ametsoc2014.bst",
},
audio = {
csl = "song",
+ notes = "CSL's `song` can be used for any audio recording (not only music).",
+ source = "biblatex",
},
bachelor = {
csl = "thesis",
+ source = "dlfltxbbibtex.bst",
},
bibnote = {
csl = nil,
+ notes = "Not supported.",
+ source = "biblatex",
},
bill = {
csl = "bill",
+ source = "csl",
},
book = {
csl = "book",
+ source = "bibtex",
},
bookinarticle = {
csl = nil,
+ source = "bookinother.dbx",
},
bookinbook = {
csl = "chapter",
+ source = "biblatex",
},
bookincollection = {
csl = nil,
+ source = "bookinother.dbx",
},
bookininarticle = {
csl = nil,
+ source = "bookinother.dbx",
},
bookininbook = {
csl = nil,
+ source = "bookinother.dbx",
},
bookinincollection = {
csl = nil,
+ source = "bookinother.dbx",
},
bookininproceedings = {
csl = nil,
+ source = "bookinother.dbx",
},
bookininreference = {
csl = nil,
+ source = "bookinother.dbx",
},
bookinjournal = {
csl = nil,
+ source = "bookinother.dbx",
},
bookinmathesis = {
csl = nil,
+ source = "bookinother.dbx",
},
bookinphdthesis = {
csl = nil,
+ source = "bookinother.dbx",
},
bookinproceedings = {
csl = nil,
+ source = "bookinother.dbx",
},
bookinreference = {
csl = nil,
+ source = "bookinother.dbx",
},
bookinthesis = {
csl = nil,
+ source = "bookinother.dbx",
},
booklet = {
csl = "pamphlet",
+ source = "bibtex",
},
broadcast = {
csl = "broadcast",
+ source = "csl",
},
brochure = {
csl = "pamphlet",
+ source = "thesnumb.bst",
},
catalog = {
csl = nil,
+ source = "arthistory-bonn.dbx",
},
cconference = {
csl = "paper-conference",
+ source = "seuthesis.bst",
},
chapter = {
csl = "chapter",
+ source = "csl",
},
classic = {
csl = "classic",
+ source = "csl",
},
classictext = {
csl = "classic",
+ source = "sbl.dbx",
},
codefragment = {
csl = "software",
+ source = "software.dbx",
},
collection = {
csl = "book",
+ source = "biblatex",
},
comment = {
csl = nil,
+ notes = "Special entry type for Scribe compatibility",
+ source = "bibtex",
},
commentary = {
csl = "book",
+ notes = "Not supported.",
+ source = "biblatex",
},
commented = {
csl = nil,
+ source = "jurabib.bst",
},
committee = {
csl = nil,
+ source = "biblatex-cv.dbx",
},
conference = {
+ alias = "inproceedings",
csl = "paper-conference",
+ source = "bibtex",
},
conferencepaper = {
csl = "paper-conference",
+ source = "sbl.dbx",
},
constitution = {
csl = "legislation",
+ source = "apa.dbx",
},
ctan = {
csl = "software",
+ source = "tugboat.bst",
},
customa = {
csl = nil,
+ source = "biblatex",
},
customb = {
csl = nil,
+ source = "biblatex",
},
customc = {
csl = nil,
+ source = "biblatex",
},
customd = {
csl = nil,
+ source = "biblatex",
},
custome = {
csl = nil,
+ source = "biblatex",
},
customf = {
csl = nil,
+ source = "biblatex",
},
data = {
csl = nil,
+ source = "apa6.dbx",
},
database = {
csl = "dataset",
+ source = "gbt7714-numerical.bst",
},
dataset = {
csl = "dataset",
+ source = "biblatex",
},
degree = {
csl = nil,
+ source = "biblatex-cv.dbx",
},
dictionary = {
csl = "book",
+ source = "vancouver.bst",
},
docthesis = {
csl = "thesis",
+ source = "gost2003.bst",
},
document = {
csl = "document",
+ source = "csl",
},
electronic = {
+ alias = "online",
csl = "webpage",
+ source = "biblatex",
},
entry = {
csl = "entry",
+ source = "csl",
},
["entry-dictionary"] = {
csl = "entry-dictionary",
+ source = "csl",
},
["entry-encyclopedia"] = {
csl = "entry-encyclopedia",
+ source = "csl",
},
eulegislation = {
csl = "legislation",
+ source = "bath.bst",
},
event = {
csl = "event",
+ source = "csl",
},
exhibcatalog = {
csl = nil,
+ source = "arthistory-bonn.dbx",
},
figure = {
csl = "figure",
+ source = "csl",
},
footnote = {
csl = nil,
+ source = "apsrev4-2.bst",
},
funding = {
csl = nil,
+ source = "biblatex-cv.dbx",
},
game = {
csl = "software",
+ source = "ACM-Reference-Format.bst",
},
gitcommit = {
csl = nil,
+ source = "gitlog.dbx",
},
govpub = {
csl = "regulation",
+ source = "thesnumb.bst",
},
graphic = {
csl = "graphic",
+ source = "csl",
},
habthesis = {
csl = "thesis",
+ source = "bestpapers-export.bst",
},
heading = {
csl = nil,
+ source = "bookdb.bst",
},
hearing = {
csl = "hearing",
+ source = "csl",
},
hidden = {
csl = nil,
+ source = "abntex2-alf.bst",
},
image = {
csl = "graphic",
+ source = "biblatex",
},
inarticle = {
csl = nil,
+ source = "bookinother.dbx",
},
inaudio = {
csl = nil,
+ source = "oxalph.dbx",
},
inbook = {
csl = "chapter",
+ source = "bibtex",
},
incatalog = {
csl = nil,
+ source = "arthistory-bonn.dbx",
},
incollection = {
csl = "chapter",
+ source = "bibtex",
},
incommentary = {
csl = nil,
+ source = "sbl.dbx",
},
inexhibcatalog = {
csl = nil,
+ source = "arthistory-bonn.dbx",
},
ininarticle = {
csl = nil,
+ source = "bookinother.dbx",
},
ininbook = {
csl = nil,
+ source = "bookinother.dbx",
},
inincollection = {
csl = nil,
+ source = "bookinother.dbx",
},
ininproceedings = {
csl = nil,
+ source = "bookinother.dbx",
},
ininreference = {
csl = nil,
+ source = "bookinother.dbx",
},
inlexicon = {
csl = nil,
+ source = "sbl.dbx",
},
inloosecollection = {
csl = "chapter",
+ source = "resphilosophica.bst",
},
inmathesis = {
csl = nil,
+ source = "bookinother.dbx",
},
inmovie = {
csl = nil,
+ source = "oxalph.dbx",
},
inmusic = {
csl = nil,
+ source = "oxalph.dbx",
},
inphdthesis = {
csl = nil,
+ source = "bookinother.dbx",
},
inpress = {
csl = "article",
+ notes = "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).",
+ source = "bjnano.bst",
},
inproceedings = {
csl = "paper-conference",
+ source = "bibtex",
},
inreference = {
csl = "entry",
+ notes = "May also be `entry`, `entry-dictionary` or `entry-encyclopedia`.",
+ source = "biblatex",
},
inserialcollection = {
csl = nil,
+ source = "asmejour.bst",
},
internet = {
csl = "webpage",
+ source = "IEEEtran.bst",
},
interview = {
csl = "interview",
+ source = "csl",
},
inthesis = {
csl = nil,
+ source = "bookinother.dbx",
},
invideo = {
csl = nil,
+ source = "oxalph.dbx",
},
journalpart = {
csl = nil,
+ source = "abntex2-alf.bst",
},
journals = {
csl = "periodical",
+ source = "bestpapers-export.bst",
},
jurisdiction = {
csl = "legal_case",
+ notes = '"Court decisions, court recordings, and similar things."',
+ source = "biblatex",
},
jurthesis = {
csl = "thesis",
+ source = "jurabib.bst",
},
legadminmaterial = {
csl = "regulation",
+ source = "apa.dbx",
},
legal = {
csl = "treaty",
+ notes = '"Legal documents such as treaties."',
+ source = "biblatex",
},
legal_case = {
csl = "legal_case",
+ source = "csl",
},
legislation = {
csl = "legislation",
+ notes = '"Laws, bills, legislative proposals, and similar things." May also be `bill`',
+ source = "biblatex",
},
legmaterial = {
csl = "legislation",
+ source = "apa.dbx",
},
letter = {
csl = "personal_communication",
+ source = "biblatex",
},
letters = {
csl = "personal_communication",
+ source = "apa6.dbx",
},
lexicon = {
csl = "book",
+ source = "jurabib.bst",
},
majorthesis = {
csl = "thesis",
+ source = "achicago.bst",
},
manual = {
csl = "report",
+ notes = "CSL's `report` is also used for manuals and similar technical documentation (e.g. a software, instrument, or test manual).",
+ source = "bibtex",
},
manuscript = {
csl = "manuscript",
+ source = "manuscripts-shared.dbx",
},
map = {
csl = "map",
+ source = "vancouver.bst",
},
mastersthesis = {
+ alias = "thesis",
csl = "thesis",
+ source = "bibtex",
},
masterthesis = {
csl = "thesis",
+ source = "asaetr.bst",
},
minorthesis = {
csl = "thesis",
+ source = "achicago.bst",
},
misc = {
csl = "document",
+ notes = "New in CSL v1.0.2.",
+ source = "bibtex",
},
mlasource = {
csl = nil,
+ source = "mla.dbx",
},
monograph = {
csl = "book",
+ source = "gbt7714-numerical.bst",
},
monography = {
csl = "book",
+ source = "abntex2-alf.bst",
},
motion_picture = {
csl = "motion_picture",
+ source = "csl",
},
movie = {
csl = "motion_picture",
+ source = "biblatex",
},
music = {
csl = "song",
+ source = "biblatex",
},
musical_score = {
csl = "musical_score",
+ source = "csl",
},
mvbook = {
csl = "book",
+ source = "biblatex",
},
mvcollection = {
csl = "book",
+ source = "biblatex",
},
mvcommentary = {
csl = nil,
+ source = "sbl.dbx",
},
mvlexicon = {
csl = nil,
+ source = "sbl.dbx",
},
mvproceedings = {
csl = "book",
+ source = "biblatex",
},
mvreference = {
csl = "book",
+ source = "biblatex",
},
nameonly = {
csl = nil,
+ source = "apa.dbx",
},
news = {
csl = "article-newspaper",
+ source = "seuthesix.bst",
},
newsarticle = {
csl = "article-newspaper",
+ source = "apa6.dbx",
},
newspaper = {
csl = "article-newspaper",
+ source = "gbt7714-numerical.bst",
},
online = {
csl = "webpage",
+ source = "biblatex",
},
other = {
csl = nil,
+ source = "bjnano.bst",
},
pamphlet = {
csl = "pamphlet",
+ source = "csl",
},
["paper-conference"] = {
csl = "paper-conference",
+ source = "csl",
},
patent = {
csl = "patent",
+ source = "biblatex",
},
performance = {
csl = "performance",
+ notes = "New in CSL v1.0.2.",
+ source = "biblatex",
},
periodical = {
csl = "periodical",
+ notes = "New in CSL v1.0.2.",
+ source = "biblatex",
},
personal_communication = {
csl = "personal_communication",
+ source = "csl",
},
phdthesis = {
+ alias = "thesis",
csl = "thesis",
+ source = "bibtex",
},
post = {
csl = "post",
+ source = "csl",
},
["post-weblog"] = {
csl = "post-weblog",
+ source = "csl",
},
preamble = {
csl = nil,
+ notes = "Special entry type for inserting commands or text in the bbl",
+ source = "bibtex",
},
preprint = {
csl = "article",
+ notes = "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).",
+ source = "gbt7714-numerical.bst",
},
presentation = {
csl = "speech",
+ notes = "A speech or other presentation (e.g. a paper, talk, poster, or symposium at a conference).",
+ source = "apsrev4-2.bst",
},
proceedings = {
csl = "book",
+ source = "bibtex",
},
program = {
csl = "software",
+ source = "ChemCommun.bst",
},
reference = {
csl = "book",
+ source = "biblatex",
},
regulation = {
csl = "regulation",
+ source = "csl",
},
report = {
csl = "report",
+ source = "biblatex",
},
repository = {
csl = nil,
+ source = "quantum.bst",
},
review = {
csl = "review",
+ notes = '"A more specific variant of the `@article` type"',
+ source = "biblatex",
},
["review-book"] = {
csl = "review-book",
+ source = "csl",
},
school = {
csl = nil,
+ source = "biblatex-cv.dbx",
},
seminarpaper = {
csl = nil,
+ source = "sbl.dbx",
},
set = {
csl = nil,
+ notes = "Not supported.",
+ source = "biblatex",
},
setup = {
csl = nil,
+ source = "bestpapers-export.bst",
},
software = {
csl = "software",
+ notes = "New in CSL v1.0.2.",
+ source = "biblatex",
},
softwaremodule = {
csl = "software",
+ source = "software.dbx",
},
softwareversion = {
csl = nil,
+ source = "software.dbx",
},
song = {
csl = "song",
+ source = "csl",
},
speech = {
csl = "speech",
+ source = "csl",
},
standard = {
csl = "standard",
+ notes = "New in CSL v1.0.2.",
+ source = "biblatex",
},
string = {
csl = nil,
+ notes = "Special entry type for defining abbreviations",
+ source = "bibtex",
},
student = {
csl = nil,
+ source = "biblatex-cv.dbx",
},
suppbook = {
csl = "chapter",
+ notes = 'lossy mapping; "Supplemental material in a `@book`. This type is closely related to the @inbook entry type. While `@inbook` is primarily intended for a part of a book with its own title (e. g., a single essay in a collection of essays by the same author), this type is provided for elements such as prefaces, introductions, forewords, afterwords, etc. which often have a generic title only. Style guides may require such items to be formatted differently from other `@inbook` items."',
+ source = "biblatex",
},
suppcollection = {
csl = "chapter",
+ notes = "lossy mapping; see `suppbook`",
+ source = "biblatex",
},
suppperiodical = {
csl = "article",
+ notes = "see `article`",
+ source = "biblatex",
},
talk = {
csl = "speech",
+ source = "archaeologie.dbx",
},
teaching = {
csl = nil,
+ source = "biblatex-cv.dbx",
},
techreport = {
+ alias = "report",
csl = "report",
+ source = "bibtex",
},
techstandard = {
csl = "standard",
+ notes = "New in CSL v1.0.2.",
+ source = "udesoftec.bst",
},
thesis = {
csl = "thesis",
+ source = "biblatex",
},
treaty = {
csl = "treaty",
+ source = "csl",
},
uklegislation = {
csl = "legislation",
+ source = "bath.bst",
},
unpublished = {
csl = "manuscript",
+ notes = "For unpublished works not made widely available or only hosted on personal websites, use manuscript",
+ source = "bibtex",
},
video = {
csl = "motion_picture",
+ source = "biblatex",
},
webpage = {
csl = "webpage",
+ source = "IEEEtran.bst",
},
website = {
csl = "webpage",
+ source = "quantum.bst",
},
www = {
+ alias = "online",
csl = "webpage",
+ source = "biblatex",
},
xdata = {
csl = nil,
+ notes = 'special item type: "`@xdata` entries hold data which may be inherited by other entries using the xdata field. Entries of this type only serve as data containers; they may not be cited or added to the bibliography."',
+ source = "biblatex",
},
},
fields = {
abstract = {
csl = "abstract",
+ source = "biblatex",
type = "literal",
},
abstractloc = {
csl = nil,
+ source = "apa6.dbx",
type = "literal",
},
abstracturl = {
csl = nil,
+ source = "apa6.dbx",
type = "verbatim",
},
accessed = {
csl = "accessed",
+ source = "csl",
},
account = {
csl = nil,
+ source = "address-html.bst",
},
acronym = {
csl = nil,
+ source = "export.bst",
type = "literal",
},
actor = {
csl = "performer",
+ source = "fiwi.dbx",
type = "name",
},
add = {
csl = nil,
+ source = "figbib.bst",
},
add1 = {
csl = nil,
+ source = "figbib1.bst",
},
addendum = {
csl = nil,
+ notes = "Not supported.",
+ source = "biblatex",
type = "literal",
},
address = {
+ alias = "location",
csl = "publisher-place",
+ source = "bibtex",
type = "literal",
},
adsurl = {
csl = nil,
+ source = "mnras.bst",
},
advisor = {
csl = nil,
+ source = "ACM-Reference-Format.bst",
type = "name",
},
afterword = {
csl = nil,
+ notes = "Not supported.",
+ source = "biblatex",
type = "name",
},
alternatetitle = {
csl = nil,
+ source = "fiwi.dbx",
type = "literal",
},
alternatetitlescript = {
csl = nil,
+ source = "fiwi.dbx",
type = "literal",
},
amendment = {
csl = nil,
+ source = "apa.dbx",
type = "literal",
},
amount = {
csl = nil,
+ source = "biblatex-cv.dbx",
type = "integer",
},
annotate = {
csl = "note",
+ source = "apacite.bst",
},
annotation = {
csl = "note",
+ notes = "Descriptive text or notes about an item (e.g. in an annotated bibliography)",
+ source = "biblatex",
type = "literal",
},
annotator = {
csl = nil,
+ source = "biblatex",
type = "name",
},
annote = {
+ alias = "annotation",
csl = "note",
+ source = "biblatex",
type = "literal",
},
annotelanguage = {
csl = nil,
+ source = "bababbr3-fl.bst",
},
anonstring = {
csl = nil,
+ source = "aefkw.dbx",
type = "name",
},
appentry = {
csl = nil,
+ source = "apa.dbx",
type = "literal",
},
applicant = {
csl = nil,
+ source = "seuthesix.bst",
},
arachne = {
csl = nil,
+ source = "archaeologie.dbx",
type = "verbatim",
},
archive = {
csl = "archive",
+ source = "apsrev4-2.bst",
},
["archive-place"] = {
csl = "archive-place",
+ source = "csl",
},
archive_collection = {
csl = "archive_collection",
+ source = "csl",
},
archive_location = {
csl = "archive_location",
+ source = "csl",
},
archiveprefix = {
+ alias = "eprinttype",
csl = "archive",
+ source = "biblatex",
type = "literal",
},
archname = {
csl = "archive",
+ source = "jurabib.bst",
},
arthist = {
csl = nil,
+ source = "arthistory-bonn.dbx",
type = "integer",
},
arthistdate = {
csl = nil,
+ source = "arthistory-bonn.dbx",
type = "date",
},
article = {
csl = nil,
+ notes = "Should be prepended to the section field (e.g., article I section 3)",
+ source = "apa.dbx",
type = "literal",
},
articleno = {
csl = nil,
+ source = "ACM-Reference-Format.bst",
type = "literal",
},
arxiv = {
csl = nil,
+ source = "aomalpha.bst",
},
assignee = {
csl = nil,
+ source = "vancouver.bst",
},
author = {
csl = "author",
+ source = "bibtex",
type = "name",
},
authoraddon = {
csl = nil,
+ source = "oxalph.dbx",
type = "name",
},
authorcountry = {
csl = nil,
+ source = "gost2003.bst",
type = "literal",
},
authorfa = {
csl = nil,
+ source = "asa-fa.bst",
},
authority = {
csl = "authority",
+ source = "csl",
},
authortype = {
csl = nil,
+ source = "biblatex",
type = "key",
},
["available-date"] = {
csl = "available-date",
+ source = "csl",
},
bibsource = {
csl = nil,
+ source = "export.bst",
},
biburl = {
csl = nil,
+ source = "export.bst",
},
binding = {
csl = nil,
+ source = "bookdb.bst",
},
birthday = {
csl = nil,
+ source = "adrbirthday.bst",
},
birthyear = {
csl = nil,
+ source = "address-html.bst",
},
blogsubtitle = {
csl = nil,
+ source = "windycity.dbx",
type = "literal",
},
blogtitle = {
csl = "title",
+ source = "windycity.dbx",
type = "literal",
},
blogtitleaddon = {
csl = nil,
+ source = "windycity.dbx",
type = "literal",
},
book = {
csl = nil,
+ source = "biblatex-gost.dbx",
type = "range",
},
bookaddress = {
csl = "publisher-place",
+ source = "apsrev4-2.bst",
},
bookafterword = {
csl = nil,
+ source = "biblatex-gost.dbx",
type = "name",
},
bookannotator = {
csl = nil,
+ source = "biblatex-gost.dbx",
type = "name",
},
bookauthor = {
csl = "container-author",
+ source = "biblatex",
type = "name",
},
bookauthortype = {
csl = nil,
+ source = "windycity.dbx",
type = "literal",
},
bookbooksubtitle = {
csl = nil,
+ source = "windycity.dbx",
type = "literal",
},
bookbooktitle = {
csl = nil,
+ source = "windycity.dbx",
type = "literal",
},
bookbooktitleaddon = {
csl = nil,
+ source = "windycity.dbx",
type = "literal",
},
bookbooktitlekey = {
csl = nil,
+ source = "windycity.dbx",
type = "key",
},
bookbookvolume = {
csl = nil,
+ source = "windycity.dbx",
type = "literal",
},
bookcommentator = {
csl = nil,
+ source = "biblatex-gost.dbx",
type = "name",
},
bookcredits = {
csl = nil,
+ source = "biblatex-gost.dbx",
type = "literal",
},
bookeditor = {
csl = "editor",
+ source = "bookinother.dbx",
type = "name",
},
bookforeword = {
csl = nil,
+ source = "biblatex-gost.dbx",
type = "name",
},
bookineditor = {
csl = nil,
+ source = "bookinother.dbx",
type = "name",
},
bookintroduction = {
csl = nil,
+ source = "biblatex-gost.dbx",
type = "name",
},
booklanguage = {
csl = nil,
+ source = "gost2003.bst",
},
bookoriglanguage = {
csl = nil,
+ source = "biblatex-gost.dbx",
type = "key",
},
bookpages = {
csl = nil,
+ source = "ACM-Reference-Format.bst",
},
bookpagination = {
csl = nil,
+ source = "biblatex",
type = "key",
},
books = {
csl = nil,
+ source = "biblatex-gost.dbx",
type = "literal",
},
booksubtitle = {
csl = nil,
+ source = "biblatex",
type = "literal",
},
booktitle = {
csl = "container-title",
+ source = "bibtex",
type = "literal",
},
booktitleaddon = {
csl = nil,
+ source = "biblatex",
type = "literal",
},
booktitlekey = {
csl = nil,
+ source = "windycity.dbx",
type = "key",
},
booktitlenote = {
csl = nil,
+ source = "aefkw.dbx",
type = "literal",
},
booktranslator = {
csl = "translator",
+ source = "biblatex-gost.dbx",
type = "name",
},
bookvolume = {
csl = nil,
+ source = "windycity.dbx",
type = "literal",
},
bookyear = {
csl = nil,
+ source = "windycity.dbx",
type = "literal",
},
["call-number"] = {
csl = "call-number",
+ source = "csl",
},
caption = {
csl = nil,
+ source = "figbib.bst",
},
caption1 = {
csl = nil,
+ source = "figbib1.bst",
},
cartographer = {
csl = nil,
+ source = "vancouver.bst",
},
casenumber = {
csl = nil,
+ source = "bath.bst",
},
catalog = {
csl = nil,
+ source = "oxalph.dbx",
type = "literal",
},
category = {
csl = nil,
+ source = "bookdb.bst",
},
cellular = {
csl = nil,
+ source = "address-html.bst",
},
chair = {
csl = "chair",
+ source = "apacite.bst",
},
chapter = {
csl = "chapter-number",
+ source = "bibtex",
type = "literal",
},
["chapter-number"] = {
csl = "chapter-number",
+ source = "csl",
},
citation = {
csl = nil,
+ source = "apa.dbx",
type = "literal",
},
citedate = {
csl = nil,
+ source = "seuthesis.bst",
},
city = {
csl = nil,
+ source = "ACM-Reference-Format.bst",
},
classes = {
csl = nil,
+ source = "biblatex-cv.dbx",
type = "entrykey",
},
claves = {
csl = nil,
+ source = "claves.dbx",
type = "literal",
},
claves_definition = {
csl = nil,
+ source = "claves.dbx",
type = "literal",
},
code = {
csl = nil,
+ source = "quantum.bst",
},
coden = {
csl = nil,
+ source = "is-abbrv.bst",
},
collaboration = {
csl = nil,
+ source = "apsrev4-2.bst",
type = "literal",
},
collator = {
csl = nil,
+ source = "bookdb.bst",
},
collection = {
csl = nil,
+ source = "bath.dbx",
type = "literal",
},
["collection-editor"] = {
csl = "collection-editor",
+ source = "csl",
},
["collection-number"] = {
csl = "collection-number",
+ source = "csl",
},
["collection-title"] = {
csl = "collection-title",
+ source = "csl",
},
columns = {
csl = nil,
+ source = "manuscripts-shared.dbx",
type = "literal",
},
commentator = {
csl = nil,
+ source = "biblatex",
type = "name",
},
commit = {
csl = nil,
+ source = "quantum.bst",
},
commithash = {
csl = nil,
+ source = "gitlog.dbx",
type = "literal",
},
committee = {
csl = nil,
+ source = "biblatex-cv.dbx",
type = "name",
},
compiler = {
csl = "compiler",
+ source = "gost2003.bst",
},
composer = {
csl = "composer",
+ source = "csl",
},
concentration = {
csl = nil,
+ source = "biblatex-cv.dbx",
type = "literal",
},
condition = {
csl = nil,
+ source = "bookdb.bst",
},
["conference-location"] = {
csl = nil,
+ source = "abntex2-alf.bst",
},
["conference-number"] = {
csl = nil,
+ source = "abntex2-alf.bst",
},
["conference-year"] = {
csl = nil,
+ source = "abntex2-alf.bst",
},
["container-author"] = {
csl = "container-author",
+ source = "csl",
},
["container-title"] = {
csl = "container-title",
+ source = "csl",
},
["container-title-short"] = {
csl = "container-title-short",
+ source = "csl",
},
contents = {
csl = nil,
+ source = "manuscripts-shared.dbx",
type = "literal",
},
contributor = {
csl = "contributor",
+ source = "csl",
},
contributora = {
csl = nil,
+ source = "mla.dbx",
type = "literal",
},
contributorb = {
csl = nil,
+ source = "mla.dbx",
type = "literal",
},
copublisher = {
csl = nil,
+ source = "gzt.dbx",
type = "literal",
},
copy = {
csl = nil,
+ source = "bookdb.bst",
},
country = {
csl = "jurisdiction",
+ source = "adrbirthday.bst",
},
credits = {
csl = nil,
+ source = "gost2003.bst",
type = "literal",
},
crossref = {
csl = nil,
+ notes = "Inherits data from a parent entry.",
+ source = "biblatex",
type = "entrykey",
},
curator = {
csl = "curator",
+ source = "csl",
},
currency = {
csl = nil,
+ source = "biblatex-cv.dbx",
type = "literal",
},
custom = {
csl = "custom",
+ source = "csl",
},
dataset = {
csl = nil,
+ source = "apalike-ejor.bst",
},
date = {
csl = "issued",
+ source = "biblatex",
type = "date",
},
["date+an"] = {
csl = nil,
+ source = "aefkw.dbx",
type = "literal",
},
datea = {
csl = nil,
+ source = "mla.dbx",
type = "literal",
},
dateaddon = {
csl = nil,
+ source = "iso-alphabetic.dbx",
type = "literal",
},
dateb = {
csl = nil,
+ source = "mla.dbx",
type = "literal",
},
datetype = {
csl = nil,
+ source = "oxalph.dbx",
type = "literal",
},
dating = {
csl = nil,
+ source = "manuscripts-shared.dbx",
type = "literal",
},
day = {
csl = nil,
+ source = "apacite.bst",
},
dayfiled = {
csl = nil,
+ source = "IEEEtran.bst",
},
decision = {
+ alias = "usera",
csl = nil,
+ source = "biblatex-juradiss.dbx",
type = "literal",
},
decisionname = {
+ alias = "userf",
csl = nil,
+ source = "biblatex-juradiss.dbx",
type = "literal",
},
definition = {
csl = nil,
+ source = "glsplain.bst",
},
degree = {
csl = nil,
+ source = "biblatex-cv.dbx",
type = "literal",
},
degreelist = {
csl = nil,
+ source = "biblatex-cv.dbx",
type = "entrykey",
},
department = {
csl = nil,
+ source = "ametsoc2014.bst",
type = "literal",
},
description = {
csl = nil,
+ source = "ChemCommun.bst",
},
designator = {
csl = nil,
+ source = "thesnumb.bst",
},
dimensions = {
csl = "dimensions",
+ source = "abntex2-alf.bst",
},
director = {
csl = "director",
+ source = "apa6.dbx",
type = "name",
},
dissyear = {
csl = nil,
+ source = "jurabib.bst",
},
distinctURL = {
csl = nil,
+ source = "acmdatamodel.dbx",
type = "literal",
},
division = {
csl = "division",
+ source = "csl",
},
doi = {
csl = "DOI",
+ source = "biblatex",
type = "verbatim",
},
dticnumber = {
csl = nil,
+ source = "thesnumb.bst",
},
dummy = {
csl = nil,
+ source = "expcites.bst",
},
duration = {
csl = nil,
+ source = "fiwi.dbx",
type = "literal",
},
durationtype = {
csl = nil,
+ source = "fiwi.dbx",
type = "literal",
},
edition = {
csl = "edition",
+ source = "bibtex",
type = "literal",
},
editioncredits = {
csl = nil,
+ source = "biblatex-gost.dbx",
type = "literal",
},
editor = {
csl = "editor",
+ source = "bibtex",
type = "name",
},
editora = {
csl = nil,
+ source = "biblatex",
type = "name",
},
editoraaddon = {
csl = nil,
+ source = "windycity.dbx",
type = "literal",
},
editoraddon = {
csl = nil,
+ source = "oxalph.dbx",
type = "name",
},
editoratype = {
csl = nil,
+ source = "biblatex",
type = "key",
},
editorb = {
csl = nil,
+ source = "biblatex",
type = "name",
},
editorbtype = {
csl = nil,
+ source = "biblatex",
type = "key",
},
editorc = {
csl = nil,
+ source = "biblatex",
type = "name",
},
editorctype = {
csl = nil,
+ source = "biblatex",
type = "key",
},
["editorial-director"] = {
csl = "editorial-director",
+ source = "csl",
},
editortype = {
csl = nil,
+ source = "biblatex",
type = "key",
},
eid = {
csl = nil,
+ source = "biblatex",
type = "literal",
},
email = {
csl = nil,
+ source = "adrbirthday.bst",
},
endbookyear = {
csl = nil,
+ source = "windycity.dbx",
type = "literal",
},
endnumber = {
csl = nil,
+ source = "seuthesis.bst",
},
endvolume = {
csl = nil,
+ source = "seuthesis.bst",
},
endyear = {
csl = nil,
+ source = "seuthesis.bst",
},
englishabstract = {
csl = nil,
+ source = "gzt.dbx",
type = "literal",
},
englishtitle = {
csl = nil,
+ source = "apacite.bst",
},
entryset = {
csl = nil,
+ notes = "Not supported.",
+ source = "biblatex",
type = "entrykey",
},
entrysubtype = {
csl = nil,
+ notes = "Not supported.",
+ source = "biblatex",
type = "literal",
},
epilog = {
csl = nil,
+ source = "iopart-num.bst",
},
eprint = {
csl = nil,
+ notes = 'Mapped to `PMID` if `eprinttype` is "PubMed".',
+ source = "biblatex",
type = "verbatim",
},
eprintclass = {
csl = nil,
+ source = "biblatex",
type = "literal",
},
eprintdate = {
csl = nil,
+ source = "sbl.dbx",
type = "date",
},
eprintday = {
csl = nil,
+ source = "sbl.dbx",
type = "datepart",
},
eprintmonth = {
csl = nil,
+ source = "sbl.dbx",
type = "datepart",
},
eprints = {
csl = nil,
+ source = "databib.bst",
},
eprinttype = {
csl = "archive",
+ source = "biblatex",
type = "literal",
},
eprintyear = {
csl = nil,
+ source = "sbl.dbx",
type = "datepart",
},
erratumeid = {
csl = nil,
+ source = "ChemCommun.bst",
},
erratumgermanpages = {
csl = nil,
+ source = "ChemCommun.bst",
},
erratumnumpages = {
csl = nil,
+ source = "ChemCommun.bst",
},
erratumpages = {
csl = nil,
+ source = "ChemCommun.bst",
},
erratumvolume = {
csl = nil,
+ source = "ChemCommun.bst",
},
erratumyear = {
csl = nil,
+ source = "ChemCommun.bst",
},
event = {
csl = "event-title",
+ source = "csl",
},
["event-date"] = {
csl = "event-date",
+ source = "csl",
},
["event-place"] = {
csl = "event-place",
+ source = "csl",
},
["event-title"] = {
csl = "event-title",
+ source = "csl",
},
eventdate = {
csl = "event-date",
+ source = "biblatex",
type = "date",
},
eventdatelanguage = {
csl = nil,
+ source = "archaeologie.dbx",
type = "verbatim",
},
eventnumber = {
csl = nil,
+ source = "aefkw.dbx",
type = "integer",
},
eventsubtitle = {
csl = nil,
+ source = "arthistory-bonn.dbx",
type = "literal",
},
eventtitle = {
csl = "event-title",
+ notes = "Supercedes `event` in CSL v1.0.2.",
+ source = "biblatex",
type = "literal",
},
eventtitleaddon = {
csl = nil,
+ source = "biblatex",
type = "literal",
},
eventtype = {
csl = nil,
+ source = "aefkw.dbx",
type = "literal",
},
eventyear = {
csl = nil,
+ source = "bath.bst",
},
execdirector = {
csl = "director",
+ source = "apa.dbx",
type = "name",
},
execproducer = {
csl = "executive-producer",
+ source = "apa.dbx",
type = "name",
},
execute = {
csl = nil,
+ notes = "Not supported.",
+ source = "biblatex",
type = "code",
},
["executive-producer"] = {
csl = "executive-producer",
+ source = "csl",
},
exhibfirstdate = {
csl = "event-date",
+ source = "arthistory-bonn.dbx",
type = "date",
},
exhibfirstlocation = {
csl = "event-place",
+ source = "arthistory-bonn.dbx",
type = "literal",
},
exhibfirstmuseum = {
csl = nil,
+ source = "arthistory-bonn.dbx",
type = "literal",
},
exhibseconddate = {
csl = nil,
+ source = "arthistory-bonn.dbx",
type = "date",
},
exhibsecondlocation = {
csl = nil,
+ source = "arthistory-bonn.dbx",
type = "literal",
},
exhibsecondmuseum = {
csl = nil,
+ source = "arthistory-bonn.dbx",
type = "literal",
},
exhibthirddate = {
csl = nil,
+ source = "arthistory-bonn.dbx",
type = "date",
},
exhibthirdlocation = {
csl = nil,
+ source = "arthistory-bonn.dbx",
type = "literal",
},
exhibthirdmuseum = {
csl = nil,
+ source = "arthistory-bonn.dbx",
type = "literal",
},
faddress = {
csl = nil,
+ source = "achicago.bst",
},
fakeset = {
csl = nil,
+ source = "biblatex.bst",
},
fax = {
csl = nil,
+ source = "adrbirthday.bst",
},
festschrift = {
csl = nil,
+ source = "aefkw.dbx",
type = "name",
},
festschriftaddon = {
csl = nil,
+ source = "aefkw.dbx",
type = "literal",
},
file = {
csl = nil,
+ source = "biblatex",
type = "verbatim",
},
firstkey = {
csl = nil,
+ source = "apacite.bst",
},
fjournal = {
csl = nil,
+ source = "ijmart.bst",
},
flanguage = {
csl = nil,
+ source = "achicago.bst",
},
font = {
csl = nil,
+ source = "nederlands.bst",
},
foreword = {
csl = nil,
+ source = "biblatex",
type = "name",
},
founder = {
csl = nil,
+ source = "jurabib.bst",
},
fpublisher = {
csl = nil,
+ source = "achicago.bst",
},
frenchabstract = {
csl = nil,
+ source = "gzt.dbx",
type = "literal",
},
ftitle = {
csl = nil,
+ source = "achicago.bst",
},
fulleventdate = {
csl = nil,
+ source = "aefkw.dbx",
type = "date",
},
funder = {
csl = nil,
+ source = "biblatex-cv.dbx",
type = "literal",
},
furtherresp = {
csl = nil,
+ source = "abntex2-alf.bst",
},
fyear = {
csl = nil,
+ source = "achicago.bst",
},
gender = {
csl = nil,
+ notes = "Not supported.",
+ source = "biblatex",
type = "literal",
},
genre = {
csl = "genre",
+ source = "csl",
},
germanpages = {
csl = nil,
+ source = "ChemCommun.bst",
},
gpa = {
csl = nil,
+ source = "biblatex-cv.dbx",
type = "literal",
},
group = {
csl = nil,
+ source = "glsplain.bst",
},
guest = {
csl = "guest",
+ source = "csl",
},
hal_id = {
csl = nil,
+ source = "software.dbx",
type = "verbatim",
},
hal_version = {
csl = "version",
+ source = "software.dbx",
type = "verbatim",
},
handle = {
csl = nil,
+ source = "windycity.dbx",
type = "literal",
},
heading = {
csl = nil,
+ source = "glsplain.bst",
type = "literal",
},
hereafter = {
csl = nil,
+ source = "opcit.bst",
},
holder = {
csl = nil,
+ source = "biblatex",
type = "name",
},
honors = {
csl = nil,
+ source = "biblatex-cv.dbx",
type = "literal",
},
host = {
csl = "host",
+ source = "csl",
},
howcited = {
csl = nil,
+ source = "jox.bst",
},
howpublished = {
csl = nil,
+ notes = "Check if a URL is contained.",
+ source = "bibtex",
type = "literal",
},
hyphenation = {
+ alias = "langid",
csl = "language",
+ source = "biblatex",
type = "literal",
},
ids = {
csl = nil,
+ source = "biblatex",
type = "entrykey",
},
illustrated = {
csl = nil,
+ source = "abntex2-alf.bst",
},
illustrations = {
csl = nil,
+ source = "bookdb.bst",
},
illustrator = {
csl = "illustrator",
+ source = "achicago.bst",
},
impactfactor = {
csl = nil,
+ source = "publist.dbx",
type = "literal",
},
inafterword = {
csl = nil,
+ source = "archaeologie.dbx",
type = "name",
},
inannotator = {
csl = nil,
+ source = "archaeologie.dbx",
type = "name",
},
incommentator = {
csl = nil,
+ source = "archaeologie.dbx",
type = "name",
},
indexsorttitle = {
csl = nil,
+ notes = "Not supported.",
+ source = "biblatex",
type = "literal",
},
indextitle = {
csl = nil,
+ source = "biblatex",
type = "literal",
},
ineditor = {
csl = nil,
+ source = "archaeologie.dbx",
type = "name",
},
inforeword = {
csl = nil,
+ source = "archaeologie.dbx",
type = "name",
},
inintroduction = {
csl = nil,
+ source = "archaeologie.dbx",
type = "name",
},
institution = {
csl = "publisher",
+ source = "bibtex",
type = "literal",
},
interviewee = {
csl = nil,
+ source = "gzt.dbx",
type = "name",
},
interviewer = {
csl = "interviewer",
+ source = "csl",
},
intranslator = {
csl = nil,
+ source = "archaeologie.dbx",
type = "name",
},
introducedin = {
csl = nil,
+ source = "software.dbx",
type = "literal",
},
introduction = {
csl = nil,
+ source = "biblatex",
type = "name",
},
intype = {
csl = nil,
+ source = "IEEEtran.bst",
},
inventor = {
csl = "author",
+ source = "vancouver.bst",
},
ipc = {
csl = nil,
+ source = "gost2003.bst",
type = "literal",
},
isan = {
csl = nil,
+ source = "biblatex",
type = "literal",
},
isbn = {
csl = "ISBN",
+ source = "biblatex",
type = "literal",
},
ismn = {
csl = nil,
+ source = "biblatex",
type = "literal",
},
["iso-abbreviation"] = {
csl = nil,
+ source = "abntex2-alf.bst",
},
["iso-author-punctuation"] = {
csl = nil,
+ source = "abntex2-alf.bst",
},
["iso-date-place"] = {
csl = nil,
+ source = "abntex2-alf.bst",
},
isrn = {
csl = nil,
+ source = "biblatex",
type = "literal",
},
issn = {
csl = "ISSN",
+ source = "biblatex",
type = "literal",
},
issue = {
csl = "issue",
+ source = "biblatex",
type = "literal",
},
issued = {
csl = "issued",
+ source = "csl",
},
issues = {
csl = nil,
+ source = "biblatex-gost.dbx",
type = "literal",
},
issuesubtitle = {
csl = nil,
+ source = "biblatex",
type = "literal",
},
issuetitle = {
- csl = nil,
+ csl = "volume-title",
+ source = "biblatex",
type = "literal",
},
issuetitleaddon = {
csl = nil,
+ source = "biblatex",
type = "literal",
},
iswc = {
csl = nil,
+ source = "biblatex",
type = "literal",
},
jfmnumber = {
csl = nil,
+ source = "aomalpha.bst",
},
jointauthor = {
csl = nil,
+ source = "oxalph.dbx",
type = "name",
},
jointauthortype = {
csl = nil,
+ source = "oxalph.dbx",
type = "literal",
},
journal = {
+ alias = "journaltitle",
csl = "container-title",
+ source = "bibtex",
type = "literal",
},
journalabbreviation = {
csl = "container-title-short",
+ source = "csl",
},
journalsubtitle = {
csl = nil,
+ notes = "It should be concatenated to the `container-title`.",
+ source = "biblatex",
type = "literal",
},
journaltie = {
csl = nil,
+ source = "tugboat.bst",
},
journaltitle = {
csl = "container-title",
+ source = "biblatex",
type = "literal",
},
journaltitleaddon = {
csl = nil,
+ source = "biblatex",
type = "literal",
},
journalyear = {
+ alias = "usere",
csl = nil,
+ source = "biblatex-juradiss.dbx",
type = "literal",
},
jstor = {
csl = nil,
+ source = "archaeologie.dbx",
type = "verbatim",
},
juraauthor = {
csl = nil,
+ source = "jox.bst",
},
juratitle = {
csl = nil,
+ source = "jox.bst",
},
jurisdiction = {
csl = "jurisdiction",
+ source = "csl",
},
key = {
+ alias = "sortkey",
csl = nil,
+ notes = "Not supported.",
+ source = "bibtex",
type = "literal",
},
keyword = {
csl = "keyword",
+ source = "csl",
},
keywords = {
csl = nil,
+ source = "biblatex",
type = "keyword",
},
label = {
csl = nil,
+ source = "biblatex",
type = "literal",
},
lang = {
csl = nil,
+ source = "hustthesis.bst",
},
langid = {
csl = "language",
+ notes = "The language id of the bibliography entry. The identifier must be a language name known to the babel/polyglossia packages. It should be converted to ISO 639-1 language code in CSL.",
+ source = "biblatex",
type = "literal",
},
langidopts = {
csl = nil,
+ source = "biblatex",
type = "literal",
},
language = {
- csl = nil,
+ csl = "language",
+ notes = "The `language` field in `biblatex` has no special internal meaning thus it is used only when langid is missing.",
+ source = "biblatex",
type = "key",
},
lastaccessed = {
csl = "accessed",
+ source = "ACM-Reference-Format.bst",
type = "literal",
},
lastchecked = {
csl = "accessed",
+ source = "apacite.bst",
},
layer = {
csl = nil,
+ source = "manuscripts-shared.dbx",
type = "literal",
},
lccn = {
csl = nil,
+ source = "is-abbrv.bst",
},
library = {
csl = nil,
+ source = "biblatex",
type = "literal",
},
librarylocation = {
csl = "archive-place",
+ source = "fiwi.dbx",
type = "literal",
},
license = {
csl = "license",
+ source = "software.dbx",
type = "literal",
},
lista = {
csl = nil,
+ source = "biblatex",
type = "literal",
},
listb = {
csl = nil,
+ source = "biblatex",
type = "literal",
},
listc = {
csl = nil,
+ source = "biblatex",
type = "literal",
},
listd = {
csl = nil,
+ source = "biblatex",
type = "literal",
},
liste = {
csl = nil,
+ source = "biblatex",
type = "literal",
},
listf = {
csl = nil,
+ source = "biblatex",
type = "literal",
},
littype = {
csl = nil,
+ source = "seuthesix.bst",
},
location = {
csl = "publisher-place",
+ source = "biblatex",
type = "literal",
},
locationa = {
csl = nil,
+ source = "mla.dbx",
type = "literal",
},
locationb = {
csl = nil,
+ source = "mla.dbx",
type = "literal",
},
madadurltest = {
csl = nil,
+ source = "alpha-persian.bst",
},
main = {
csl = nil,
+ source = "figbib.bst",
},
main1 = {
csl = nil,
+ source = "figbib1.bst",
},
mainauthor = {
csl = nil,
+ source = "bookinother.dbx",
type = "name",
},
maineditor = {
csl = nil,
+ source = "morenames.dbx",
type = "name",
},
mainsubtitle = {
csl = nil,
+ source = "biblatex",
type = "literal",
},
maintainer = {
csl = nil,
+ source = "cnltx.dbx",
type = "name",
},
maintitle = {
csl = nil,
+ source = "biblatex",
type = "literal",
},
maintitleaddon = {
csl = nil,
+ source = "biblatex",
type = "literal",
},
maintitlenote = {
csl = nil,
+ source = "aefkw.dbx",
type = "literal",
},
maintranslator = {
csl = nil,
+ source = "sbl.dbx",
type = "name",
},
major = {
csl = nil,
+ source = "biblatex-cv.dbx",
type = "literal",
},
majorcode = {
csl = nil,
+ source = "gost2003.bst",
},
marginnote = {
csl = nil,
+ source = "abntex2-alf.bst",
},
mark = {
csl = nil,
+ source = "gbt7714-numerical.bst",
},
["max.best.papers"] = {
csl = nil,
+ source = "bestpapers-export.bst",
},
mcitetail = {
csl = nil,
+ source = "apsrmpM.bst",
},
media = {
csl = "medium",
+ source = "gost2003.bst",
type = "key",
},
medium = {
csl = "medium",
+ source = "gbt7714-numerical.bst",
},
meeting = {
csl = nil,
+ source = "amsra.bst",
},
minor = {
csl = nil,
+ source = "biblatex-cv.dbx",
type = "literal",
},
misctitle = {
csl = nil,
+ source = "aasjournal.bst",
},
miscyear = {
csl = nil,
+ source = "seuthesis.bst",
},
mobile = {
csl = nil,
+ source = "adrbirthday.bst",
},
modifydate = {
csl = nil,
+ source = "seuthesis.bst",
},
month = {
csl = nil,
+ notes = "Used only when `date` is empty.",
+ source = "bibtex",
type = "literal",
},
monthfiled = {
csl = nil,
+ source = "IEEEtran.bst",
},
mrnumber = {
csl = nil,
+ source = "amsplain.bst",
},
multieventdate = {
csl = nil,
+ source = "aefkw.dbx",
type = "literal",
},
multivenue = {
csl = nil,
+ source = "aefkw.dbx",
type = "literal",
},
name = {
csl = nil,
+ source = "adrbirthday.bst",
type = "name",
},
namea = {
csl = nil,
+ source = "biblatex",
type = "name",
},
nameaddon = {
csl = nil,
+ source = "biblatex",
type = "literal",
},
nameatype = {
csl = nil,
+ source = "biblatex",
type = "key",
},
nameb = {
csl = nil,
+ source = "biblatex",
type = "name",
},
namebtype = {
csl = nil,
+ source = "biblatex",
type = "key",
},
namec = {
csl = nil,
+ source = "biblatex",
type = "name",
},
namectype = {
csl = nil,
+ source = "biblatex",
type = "key",
},
narrator = {
csl = "narrator",
+ source = "apa.dbx",
type = "name",
},
nationality = {
csl = nil,
+ source = "IEEEtran.bst",
},
nbirthday = {
csl = nil,
+ source = "adrbirthday.bst",
},
neutralcite = {
csl = nil,
+ source = "oxalph.dbx",
type = "literal",
},
newpage = {
csl = nil,
+ source = "tugboat.bst",
},
newsdate = {
csl = nil,
+ source = "aefkw.dbx",
type = "date",
},
newspaper = {
csl = "container-title",
+ source = "seuthesix.bst",
type = "literal",
},
nickname = {
csl = nil,
+ source = "address-html.bst",
},
nihms = {
csl = nil,
+ source = "apacite.bst",
},
noed = {
csl = nil,
+ source = "jox.bst",
},
nolink = {
csl = nil,
+ source = "quantum.bst",
},
normal = {
csl = nil,
+ source = "bookdb.bst",
},
normalauthor = {
csl = nil,
+ source = "seuthesis.bst",
},
normaleditor = {
csl = nil,
+ source = "seuthesis.bst",
},
note = {
csl = "note",
+ source = "bibtex",
type = "literal",
},
nowarning = {
csl = nil,
+ source = "tugboat.bst",
},
number = {
csl = "number",
+ notes = "It is mapped to `issue` in `@ariticle` but to `number` in `@patent` or `@report`.",
+ source = "bibtex",
type = "literal",
},
["number-of-pages"] = {
csl = "number-of-pages",
+ source = "csl",
},
["number-of-volumes"] = {
csl = "number-of-volumes",
+ source = "csl",
},
numbera = {
csl = nil,
+ source = "mla.dbx",
type = "literal",
},
numberb = {
csl = nil,
+ source = "mla.dbx",
type = "literal",
},
numcites = {
csl = nil,
+ source = "biblatex-cv.dbx",
type = "integer",
},
numlectures = {
csl = nil,
+ source = "biblatex-cv.dbx",
type = "integer",
},
numpages = {
csl = "number-of-pages",
+ source = "ACM-Reference-Format.bst",
type = "literal",
},
numstudents = {
csl = nil,
+ source = "biblatex-cv.dbx",
type = "integer",
},
oaddress = {
csl = "original-publisher-place",
+ source = "achicago.bst",
},
officialpages = {
+ alias = "userd",
csl = nil,
+ source = "biblatex-juradiss.dbx",
type = "literal",
},
officialvolume = {
+ alias = "userc",
csl = nil,
+ source = "biblatex-juradiss.dbx",
type = "literal",
},
openaccess = {
csl = nil,
+ source = "publist.dbx",
type = "literal",
},
options = {
csl = nil,
+ notes = "Not supported.",
+ source = "biblatex",
type = "option",
},
opublisher = {
csl = "original-publisher",
+ source = "achicago.bst",
},
["org-short"] = {
csl = nil,
+ source = "abntex2-alf.bst",
},
organization = {
- csl = "publisher",
+ csl = nil,
+ notes = "The `organizer` that sponsors a conference or a `publisher` that publishes a `@manual` or `@online`.",
+ source = "bibtex",
type = "literal",
},
organizer = {
csl = "organizer",
+ source = "csl",
},
origdate = {
csl = "original-date",
+ source = "biblatex",
type = "date",
},
["origdate+an"] = {
csl = nil,
+ source = "aefkw.dbx",
type = "literal",
},
origdatetype = {
csl = nil,
+ source = "oxalph.dbx",
type = "literal",
},
origin = {
csl = nil,
+ source = "manuscripts-shared.dbx",
type = "literal",
},
["original-author"] = {
csl = "original-author",
+ source = "csl",
},
["original-date"] = {
csl = "original-date",
+ source = "csl",
},
["original-publisher"] = {
csl = "original-publisher",
+ source = "csl",
},
["original-publisher-place"] = {
csl = "original-publisher-place",
+ source = "csl",
},
["original-title"] = {
csl = "original-title",
+ source = "csl",
},
originaladdress = {
csl = "original-publisher-place",
+ source = "apacite.bst",
},
originalbooktitle = {
csl = nil,
+ source = "apacite.bst",
},
originaledition = {
csl = nil,
+ source = "apacite.bst",
},
originaleditor = {
csl = nil,
+ source = "apacite.bst",
},
originaljournal = {
csl = nil,
+ source = "apacite.bst",
},
originalnumber = {
csl = nil,
+ source = "apacite.bst",
},
originalpages = {
csl = nil,
+ source = "apacite.bst",
},
originalpublisher = {
csl = "original-publisher",
+ source = "apacite.bst",
},
originalvolume = {
csl = nil,
+ source = "apacite.bst",
},
originalyear = {
csl = "original-date",
+ source = "apacite.bst",
},
origlanguage = {
csl = nil,
+ source = "biblatex",
type = "key",
},
origlocation = {
csl = "original-publisher-place",
+ source = "biblatex",
type = "literal",
},
origpublisher = {
csl = "original-publisher",
+ source = "biblatex",
type = "literal",
},
origrealdate = {
csl = nil,
+ source = "aefkw.dbx",
type = "date",
},
origtitle = {
csl = "original-title",
+ source = "biblatex",
type = "literal",
},
owner = {
csl = nil,
+ source = "manuscripts-shared.dbx",
type = "name",
},
oyear = {
csl = nil,
+ source = "achicago.bst",
},
page = {
csl = "page",
+ source = "csl",
},
pagename = {
csl = nil,
+ source = "abntex2-alf.bst",
},
pages = {
csl = "page",
+ source = "bibtex",
type = "range",
},
pagetotal = {
csl = "number-of-pages",
+ source = "biblatex",
type = "literal",
},
pagination = {
csl = nil,
+ source = "biblatex",
type = "key",
},
paper = {
csl = nil,
+ source = "IEEEtran.bst",
},
pardate = {
csl = nil,
+ source = "oxalph.dbx",
type = "date",
},
parpages = {
csl = nil,
+ source = "oxalph.dbx",
type = "range",
},
parreporter = {
csl = nil,
+ source = "oxalph.dbx",
type = "literal",
},
parseries = {
csl = nil,
+ source = "oxalph.dbx",
type = "literal",
},
part = {
csl = "part",
+ source = "biblatex",
type = "literal",
},
["part-title"] = {
csl = "part-title",
+ source = "csl",
},
parts = {
csl = nil,
+ source = "biblatex-gost.dbx",
type = "literal",
},
parttitle = {
csl = nil,
+ source = "fiwi.dbx",
type = "literal",
},
parvolume = {
csl = nil,
+ source = "oxalph.dbx",
type = "integer",
},
patentid = {
csl = nil,
+ source = "seuthesis.bst",
},
pdf = {
+ alias = "file",
csl = nil,
+ source = "biblatex",
type = "verbatim",
},
peerreview = {
csl = nil,
+ source = "publist.dbx",
type = "literal",
},
performer = {
csl = "performer",
+ source = "csl",
},
phone = {
csl = nil,
+ source = "adrbirthday.bst",
},
pid = {
csl = nil,
+ source = "seuthesix.bst",
},
pii = {
csl = nil,
+ source = "amsra.bst",
},
pmc = {
csl = nil,
+ source = "hep-bibliography.dbx",
type = "literal",
},
pmcid = {
csl = "PMCID",
+ source = "apacite.bst",
type = "literal",
},
pmid = {
csl = "PMID",
+ source = "hep-bibliography.dbx",
type = "literal",
},
prebibitem = {
csl = nil,
+ source = "tugboat.bst",
},
preface = {
csl = nil,
+ source = "bookdb.bst",
type = "name",
},
preprint = {
csl = nil,
+ source = "amsra.bst",
},
presentationtype = {
csl = nil,
+ source = "biblatex-cv.dbx",
type = "literal",
},
presenter = {
csl = nil,
+ source = "biblatex-cv.dbx",
type = "name",
},
presort = {
csl = nil,
+ notes = "Not supported.",
+ source = "biblatex",
type = "literal",
},
price = {
csl = nil,
+ source = "is-abbrv.bst",
},
primaryclass = {
+ alias = "eprintclass",
csl = nil,
+ source = "biblatex",
type = "literal",
},
printing = {
csl = nil,
+ source = "dk-abbrv.bst",
},
["printing-number"] = {
csl = "printing-number",
+ source = "csl",
},
prioritycountry = {
csl = nil,
+ source = "gost2003.bst",
type = "literal",
},
prioritydate = {
csl = nil,
+ source = "gost2003.bst",
type = "date",
},
prioritynumber = {
csl = nil,
+ source = "gost2003.bst",
type = "literal",
},
producer = {
csl = "producer",
+ source = "apa6.dbx",
type = "name",
},
production = {
csl = nil,
+ source = "fiwi.dbx",
type = "literal",
},
protocollessurl = {
csl = nil,
+ source = "hep-bibliography.dbx",
type = "uri",
},
pseudonym = {
csl = nil,
+ source = "jox.bst",
},
publication = {
csl = nil,
+ source = "gost2003.bst",
type = "literal",
},
publicationdate = {
csl = nil,
+ source = "gost2003.bst",
type = "date",
},
publicprice = {
csl = nil,
+ source = "gzt.dbx",
type = "literal",
},
publisher = {
csl = "publisher",
+ source = "bibtex",
type = "literal",
},
["publisher-place"] = {
csl = "publisher-place",
+ source = "csl",
},
publishera = {
csl = nil,
+ source = "mla.dbx",
type = "literal",
},
publisherb = {
csl = nil,
+ source = "mla.dbx",
type = "literal",
},
pubmed = {
csl = "PMID",
+ source = "urlbst",
},
pubstate = {
csl = "status",
+ notes = "The publication state of the work, e. g., ‘in press’.",
+ source = "biblatex",
type = "key",
},
rawauthor = {
csl = nil,
+ source = "oxalph.dbx",
type = "literal",
},
realauthor = {
csl = nil,
+ source = "realauthor.dbx",
type = "name",
},
realdate = {
csl = nil,
+ source = "aefkw.dbx",
type = "date",
},
realeditor = {
csl = nil,
+ source = "realauthor.dbx",
type = "name",
},
recipient = {
csl = "recipient",
+ source = "csl",
},
references = {
csl = "references",
+ source = "csl",
},
related = {
csl = nil,
+ notes = "Not supported.",
+ source = "biblatex",
type = "entrykey",
},
relatedoptions = {
csl = nil,
+ notes = "Not supported.",
+ source = "biblatex",
type = "option",
},
relatedstring = {
csl = nil,
+ notes = "Not supported.",
+ source = "biblatex",
type = "literal",
},
relatedtype = {
csl = nil,
+ notes = "Not supported.",
+ source = "biblatex",
type = "literal",
},
reportnumber = {
csl = nil,
+ source = "hep-bibliography.dbx",
type = "literal",
},
repository = {
csl = nil,
+ source = "software.dbx",
type = "uri",
},
["reprinted-from"] = {
csl = nil,
+ source = "abntex2-alf.bst",
},
["reprinted-text"] = {
csl = nil,
+ source = "abntex2-alf.bst",
},
reprinttitle = {
csl = nil,
+ source = "biblatex",
type = "literal",
},
requestdate = {
csl = nil,
+ source = "gost2003.bst",
},
requestnumber = {
csl = nil,
+ source = "gost2003.bst",
type = "literal",
},
responsible = {
csl = nil,
+ source = "rusnat.bst",
},
revdauthor = {
csl = nil,
+ source = "sbl.dbx",
type = "name",
},
revdeditor = {
csl = nil,
+ source = "sbl.dbx",
type = "name",
},
revdshorttitle = {
csl = nil,
+ source = "sbl.dbx",
type = "literal",
},
revdsubtitle = {
csl = nil,
+ source = "sbl.dbx",
type = "literal",
},
revdtitle = {
csl = nil,
+ source = "sbl.dbx",
type = "literal",
},
revdtitleaddon = {
csl = nil,
+ source = "sbl.dbx",
type = "literal",
},
review = {
csl = nil,
+ source = "amsra.bst",
},
["reviewed-author"] = {
csl = "reviewed-author",
+ source = "csl",
},
["reviewed-genre"] = {
csl = "reviewed-genre",
+ source = "csl",
},
["reviewed-title"] = {
csl = "reviewed-title",
+ source = "csl",
},
reviewer = {
csl = nil,
+ source = "gzt.dbx",
type = "name",
},
reviewerinstitution = {
csl = nil,
+ source = "gzt.dbx",
type = "literal",
},
revision = {
csl = nil,
+ source = "IEEEtran.bst",
},
role = {
csl = nil,
+ source = "biblatex-cv.dbx",
type = "key",
},
scale = {
csl = "scale",
+ source = "csl",
},
school = {
+ alias = "institution",
csl = "publisher",
+ source = "bibtex",
type = "literal",
},
science = {
csl = nil,
+ source = "biblatex-gost.dbx",
type = "literal",
},
score = {
csl = nil,
+ source = "bestpapers-export.bst",
},
scribe = {
csl = nil,
+ source = "oxalph.dbx",
type = "name",
},
script = {
csl = nil,
+ source = "manuscripts-shared.dbx",
type = "literal",
},
["script-writer"] = {
csl = "script-writer",
+ source = "csl",
},
scriptwriter = {
csl = nil,
+ source = "fiwi.dbx",
type = "name",
},
section = {
csl = "section",
+ source = "abntex2-alf.bst",
type = "literal",
},
semesters = {
csl = nil,
+ source = "biblatex-cv.dbx",
type = "entrykey",
},
series = {
csl = "collection-title",
+ source = "bibtex",
type = "literal",
},
["series-creator"] = {
csl = "series-creator",
+ source = "csl",
},
seriesaddon = {
csl = nil,
+ source = "windycity.dbx",
type = "literal",
},
seriesedition = {
csl = nil,
+ source = "achicago.bst",
},
serieseditor = {
csl = nil,
+ source = "oxalph.dbx",
type = "name",
},
seriesseries = {
csl = nil,
+ source = "sbl.dbx",
type = "literal",
},
setlabel = {
csl = nil,
+ source = "windycity.dbx",
type = "literal",
},
shelfmark = {
csl = nil,
+ source = "bath.dbx",
type = "literal",
},
short = {
csl = nil,
+ source = "glsplain.bst",
},
shortarchive = {
csl = nil,
+ source = "jurabib.bst",
},
shortauthor = {
csl = nil,
+ source = "biblatex",
type = "name",
},
shortblog = {
csl = nil,
+ source = "windycity.dbx",
type = "literal",
},
shortbookauthor = {
csl = nil,
+ source = "windycity.dbx",
type = "name",
},
shortbooktitle = {
csl = nil,
+ source = "sbl.dbx",
type = "literal",
},
shortcollection = {
csl = nil,
+ source = "manuscripts-shared.dbx",
type = "literal",
},
shorteditor = {
csl = nil,
+ source = "biblatex",
type = "name",
},
shortform = {
csl = nil,
+ source = "aefkw.dbx",
type = "literal",
},
shorthand = {
csl = nil,
+ notes = "Not supported.",
+ source = "biblatex",
type = "literal",
},
shorthandintro = {
csl = nil,
+ notes = "Not supported.",
+ source = "biblatex",
type = "literal",
},
shortissuetitle = {
csl = nil,
+ source = "sbl.dbx",
type = "literal",
},
shortjournal = {
csl = "container-title-short",
+ source = "biblatex",
type = "literal",
},
shortlabeltitle = {
csl = nil,
+ source = "oxalph.dbx",
type = "literal",
},
shortlibrary = {
csl = nil,
+ source = "manuscripts-shared.dbx",
type = "literal",
},
shortmaintitle = {
csl = nil,
+ source = "sbl.dbx",
type = "literal",
},
shortorganization = {
csl = nil,
+ source = "windycity.dbx",
type = "literal",
},
shortserie = {
csl = nil,
+ source = "lncs.dbx",
type = "literal",
},
shortseries = {
csl = nil,
+ source = "biblatex",
type = "literal",
},
shortsubarchive = {
csl = nil,
+ source = "jurabib.bst",
},
shortsubseries = {
csl = nil,
+ source = "aefkw.dbx",
type = "literal",
},
shortsubsubseries = {
csl = nil,
+ source = "subseries.dbx",
type = "literal",
},
shorttitle = {
csl = "title-short",
+ source = "biblatex",
type = "literal",
},
shorttranslator = {
csl = nil,
+ source = "windycity.dbx",
type = "name",
},
shorturl = {
csl = nil,
+ source = "quantum.bst",
},
sig1 = {
csl = nil,
+ source = "jurabib.bst",
},
sig2 = {
csl = nil,
+ source = "jurabib.bst",
},
sig3 = {
csl = nil,
+ source = "jurabib.bst",
},
sig4 = {
csl = nil,
+ source = "jurabib.bst",
},
sign = {
+ alias = "userb",
csl = nil,
+ source = "biblatex-juradiss.dbx",
type = "literal",
},
size = {
csl = nil,
+ source = "bookdb.bst",
},
slaccitation = {
csl = nil,
+ source = "apsrev4-2.bst",
},
smfprice = {
csl = nil,
+ source = "gzt.dbx",
type = "literal",
},
["sort-short"] = {
csl = nil,
+ source = "glsplain.bst",
},
["sort-word"] = {
csl = nil,
+ source = "glsplain.bst",
},
sortas = {
csl = nil,
+ source = "adrbirthday.bst",
},
sortkey = {
csl = nil,
+ notes = "Not supported.",
+ source = "biblatex",
type = "literal",
},
sortname = {
csl = nil,
+ notes = "Not supported.",
+ source = "biblatex",
type = "name",
},
sortshelfmark = {
csl = nil,
+ source = "manuscripts-shared.dbx",
type = "literal",
},
sortshorthand = {
csl = nil,
+ notes = "Not supported.",
+ source = "biblatex",
type = "literal",
},
sorttitle = {
csl = nil,
+ notes = "Not supported.",
+ source = "biblatex",
type = "literal",
},
sortvolume = {
csl = nil,
+ source = "biblatex-gost.dbx",
type = "literal",
},
sortyear = {
csl = nil,
+ source = "biblatex",
type = "integer",
},
+ source = {
+ csl = "source",
+ source = "figbib.bst",
+ type = "literal",
+ },
source1 = {
csl = nil,
+ source = "figbib1.bst",
},
specdata = {
csl = nil,
+ source = "biblatex-gost.dbx",
type = "literal",
},
speciality = {
csl = nil,
+ source = "biblatex-gost.dbx",
type = "literal",
},
specialitycode = {
csl = nil,
+ source = "gost2003.bst",
type = "literal",
},
ssedition = {
csl = nil,
+ source = "jox.bst",
},
standard = {
csl = nil,
+ source = "udesoftec.bst",
},
startnumber = {
csl = nil,
+ source = "seuthesis.bst",
},
startvolume = {
csl = nil,
+ source = "seuthesis.bst",
},
startyear = {
csl = nil,
+ source = "seuthesis.bst",
},
state = {
csl = nil,
+ source = "address-html.bst",
},
status = {
csl = "status",
+ source = "amsra.bst",
type = "key",
},
stdcode = {
csl = "number",
+ source = "seuthesix.bst",
},
stitle = {
csl = nil,
+ source = "jox.bst",
},
street = {
csl = nil,
+ source = "adrbirthday.bst",
},
subarchive = {
csl = nil,
+ source = "jurabib.bst",
},
submitted = {
csl = "submitted",
+ source = "csl",
},
subnumber = {
csl = nil,
+ source = "aefkw.dbx",
type = "integer",
},
subseries = {
csl = nil,
+ source = "aefkw.dbx",
type = "literal",
},
subsubnumber = {
csl = nil,
+ source = "subseries.dbx",
type = "literal",
},
subsubseries = {
csl = nil,
+ source = "subseries.dbx",
type = "literal",
},
subtitle = {
csl = nil,
+ source = "biblatex",
type = "literal",
},
summarytitle = {
csl = nil,
+ source = "aefkw.dbx",
type = "literal",
},
supervisor = {
csl = nil,
+ source = "iso-alphabetic.dbx",
type = "name",
},
supplement = {
csl = "supplement",
+ source = "csl",
},
supplemental = {
csl = nil,
+ source = "mla.dbx",
type = "literal",
},
supplementala = {
csl = nil,
+ source = "mla.dbx",
type = "literal",
},
supplementalb = {
csl = nil,
+ source = "mla.dbx",
type = "literal",
},
support = {
csl = nil,
+ source = "manuscripts-shared.dbx",
type = "literal",
},
swhid = {
csl = nil,
+ source = "software.dbx",
type = "verbatim",
},
swhidcore = {
csl = nil,
+ source = "software.dbx",
type = "verbatim",
},
symposium = {
csl = nil,
+ source = "apacite.bst",
},
systemreq = {
csl = nil,
+ source = "biblatex-gost.dbx",
type = "literal",
},
text = {
csl = nil,
+ source = "apacite.bst",
},
thesisdate = {
csl = nil,
+ source = "arthistory-bonn.dbx",
type = "date",
},
thesistype = {
csl = nil,
+ source = "arthistory-bonn.dbx",
type = "verbatim",
},
thumbnail = {
csl = nil,
+ source = "gzt.dbx",
type = "verbatim",
},
timestamp = {
csl = nil,
+ source = "export.bst",
},
title = {
csl = "title",
+ source = "bibtex",
type = "literal",
},
["title-short"] = {
csl = "title-short",
+ source = "csl",
},
titlea = {
csl = nil,
+ source = "mla.dbx",
type = "literal",
},
titleaddon = {
csl = nil,
+ source = "biblatex",
type = "literal",
},
titleb = {
csl = nil,
+ source = "mla.dbx",
type = "literal",
},
titleisdescription = {
csl = nil,
+ source = "apa6.dbx",
type = "literal",
},
titlekey = {
csl = nil,
+ source = "windycity.dbx",
type = "key",
},
titlenote = {
csl = nil,
+ source = "aomalpha.bst",
type = "literal",
},
titletype = {
csl = nil,
+ source = "mla.dbx",
type = "literal",
},
totalpages = {
csl = nil,
+ source = "aomalpha.bst",
},
transissue = {
csl = nil,
+ source = "iopart-num.bst",
},
transjournal = {
csl = nil,
+ source = "iopart-num.bst",
},
translation = {
csl = nil,
+ source = "apsrev4-2.bst",
},
translator = {
csl = "translator",
+ source = "biblatex",
type = "name",
},
translatora = {
csl = nil,
+ source = "windycity.dbx",
type = "name",
},
translatoratype = {
csl = nil,
+ source = "windycity.dbx",
type = "key",
},
translatorb = {
csl = nil,
+ source = "windycity.dbx",
type = "name",
},
translatorbtype = {
csl = nil,
+ source = "windycity.dbx",
type = "key",
},
translatortype = {
csl = nil,
+ source = "windycity.dbx",
type = "key",
},
transnumber = {
csl = nil,
+ source = "iopart-num.bst",
},
transpages = {
csl = nil,
+ source = "iopart-num.bst",
},
transsection = {
csl = nil,
+ source = "iopart-num.bst",
},
transvolume = {
csl = nil,
+ source = "iopart-num.bst",
},
transyear = {
csl = nil,
+ source = "iopart-num.bst",
},
type = {
csl = "genre",
+ source = "bibtex",
type = "key",
},
typeaddon = {
csl = nil,
+ source = "windycity.dbx",
type = "literal",
},
typeoflit = {
csl = nil,
+ source = "seuthesis.bst",
},
umfnumber = {
csl = nil,
+ source = "thesnumb.bst",
},
update = {
csl = nil,
+ source = "biblatex-gost.dbx",
type = "date",
},
updated = {
csl = nil,
+ source = "vancouver.bst",
},
url = {
csl = "URL",
+ source = "biblatex",
type = "uri",
},
urlaccessdate = {
csl = "accessed",
+ source = "abntex2-alf.bst",
},
urldate = {
csl = "accessed",
+ source = "biblatex",
type = "date",
},
urldescription = {
csl = nil,
+ source = "apa6.dbx",
type = "literal",
},
urlnewline = {
csl = nil,
+ source = "tugboat.bst",
},
urls = {
csl = nil,
+ source = "acmdatamodel.dbx",
type = "uri",
},
urltype = {
csl = nil,
+ source = "asmeconf.bst",
},
urlyear = {
csl = "accessed",
+ source = "bath.bst",
},
urn = {
csl = nil,
+ source = "export.bst",
type = "verbatim",
},
usera = {
csl = nil,
+ source = "biblatex",
type = "literal",
},
userb = {
csl = nil,
+ source = "biblatex",
type = "literal",
},
userc = {
csl = nil,
+ source = "biblatex",
type = "literal",
},
userd = {
csl = nil,
+ source = "biblatex",
type = "literal",
},
usere = {
csl = nil,
+ source = "biblatex",
type = "literal",
},
userf = {
csl = nil,
+ source = "biblatex",
type = "literal",
},
usualtitle = {
csl = nil,
+ source = "manuscripts-shared.dbx",
type = "literal",
},
value = {
csl = nil,
+ source = "bookdb.bst",
},
venue = {
csl = "event-place",
+ source = "biblatex",
type = "literal",
},
verba = {
csl = nil,
+ source = "biblatex",
type = "verbatim",
},
verbb = {
csl = nil,
+ source = "biblatex",
type = "verbatim",
},
verbc = {
csl = nil,
+ source = "biblatex",
type = "verbatim",
},
version = {
csl = "version",
+ source = "biblatex",
type = "literal",
},
versiona = {
csl = nil,
+ source = "mla.dbx",
type = "literal",
},
versionb = {
csl = nil,
+ source = "mla.dbx",
type = "literal",
},
versiontype = {
csl = nil,
+ source = "asmeconf.bst",
},
volformat = {
csl = nil,
+ source = "jox.bst",
},
volsorder = {
csl = nil,
+ source = "biblatex-gost.dbx",
type = "literal",
},
volume = {
csl = "volume",
+ source = "bibtex",
type = "integer",
},
["volume-title"] = {
csl = "volume-title",
+ source = "csl",
},
["volume-title-short"] = {
csl = "volume-title-short",
+ source = "csl",
},
volumes = {
csl = "number-of-volumes",
+ source = "biblatex",
type = "integer",
},
volumetitle = {
csl = "volume-title",
+ source = "iopart-num.bst",
},
with = {
csl = nil,
+ source = "apa.dbx",
type = "name",
},
withauthor = {
csl = nil,
+ source = "sbl.dbx",
type = "name",
},
withauthortype = {
csl = nil,
+ source = "sbl.dbx",
type = "literal",
},
withbookauthor = {
csl = nil,
+ source = "sbl.dbx",
type = "name",
},
withbookauthortype = {
csl = nil,
+ source = "sbl.dbx",
type = "literal",
},
withbookeditor = {
csl = nil,
+ source = "sbl.dbx",
type = "name",
},
withbookeditortype = {
csl = nil,
+ source = "sbl.dbx",
type = "literal",
},
withbooktranslator = {
csl = nil,
+ source = "sbl.dbx",
type = "name",
},
withbooktranslatortype = {
csl = nil,
+ source = "sbl.dbx",
type = "literal",
},
witheditor = {
csl = nil,
+ source = "sbl.dbx",
type = "name",
},
witheditortype = {
csl = nil,
+ source = "sbl.dbx",
type = "literal",
},
withmainauthor = {
csl = nil,
+ source = "sbl.dbx",
type = "name",
},
withmainauthortype = {
csl = nil,
+ source = "sbl.dbx",
type = "literal",
},
withmaineditor = {
csl = nil,
+ source = "sbl.dbx",
type = "name",
},
withmaineditortype = {
csl = nil,
+ source = "sbl.dbx",
type = "literal",
},
withmaintranslator = {
csl = nil,
+ source = "sbl.dbx",
type = "name",
},
withmaintranslatortype = {
csl = nil,
+ source = "sbl.dbx",
type = "literal",
},
withtranslator = {
csl = nil,
+ source = "sbl.dbx",
type = "name",
},
withtranslatortype = {
csl = nil,
+ source = "sbl.dbx",
type = "literal",
},
word = {
csl = nil,
+ source = "vancouver.bst",
},
writer = {
csl = nil,
+ source = "apa6.dbx",
type = "name",
},
xdata = {
csl = nil,
+ notes = "inherits fields from other items.",
+ source = "biblatex",
type = "entrykey",
},
xid = {
csl = nil,
+ source = "amsra.bst",
},
xref = {
csl = nil,
+ notes = "Establishes a parent-child relationship in biblatex, but without inheriting data => no need to parse this.",
+ source = "biblatex",
type = "entrykey",
},
year = {
- csl = nil,
+ csl = "issued",
+ notes = "Used only when `date` is empty.",
+ source = "bibtex",
type = "date",
},
["year-presented"] = {
csl = nil,
+ source = "abntex2-alf.bst",
},
yearcomp = {
csl = nil,
+ source = "achicago.bst",
},
yearfiled = {
csl = nil,
+ source = "IEEEtran.bst",
},
zblnumber = {
csl = nil,
+ source = "aomalpha.bst",
},
zenon = {
csl = nil,
+ source = "archaeologie.dbx",
type = "verbatim",
},
zip = {
csl = nil,
+ source = "adrbirthday.bst",
},
},
macros = {
- jan = {
- value = "1",
- },
- feb = {
- value = "2",
+ acmcs = {
+ source = "bibtex",
+ value = "ACM Computing Surveys",
},
- mar = {
- value = "3",
+ acta = {
+ source = "bibtex",
+ value = "Acta Informatica",
},
apr = {
- value = "4",
- },
- may = {
- value = "5",
- },
- jun = {
- value = "6",
- },
- jul = {
- value = "7",
+ source = "bibtex",
+ value = "April",
},
aug = {
- value = "8",
- },
- sep = {
- value = "9",
+ source = "bibtex",
+ value = "August",
},
- oct = {
- value = "10",
- },
- nov = {
- value = "11",
+ cacm = {
+ source = "bibtex",
+ value = "Communications of the ACM",
},
dec = {
- value = "12",
- },
- acmcs = {
- value = "ACM Computing Surveys",
+ source = "bibtex",
+ value = "December",
},
- acta = {
- value = "Acta Informatica",
- },
- cacm = {
- value = "Communications of the ACM",
+ feb = {
+ source = "bibtex",
+ value = "February",
},
ibmjrd = {
+ source = "bibtex",
value = "IBM Journal of Research and Development",
},
ibmsj = {
+ source = "bibtex",
value = "IBM Systems Journal",
},
ieeese = {
+ source = "bibtex",
value = "IEEE Transactions on Software Engineering",
},
ieeetc = {
+ source = "bibtex",
value = "IEEE Transactions on Computers",
},
ieeetcad = {
+ source = "bibtex",
value = "IEEE Transactions on Computer-Aided Design of Integrated Circuits",
},
ipl = {
+ source = "bibtex",
value = "Information Processing Letters",
},
jacm = {
+ source = "bibtex",
value = "Journal of the ACM",
},
+ jan = {
+ source = "bibtex",
+ value = "January",
+ },
jcss = {
+ source = "bibtex",
value = "Journal of Computer and System Sciences",
},
+ jul = {
+ source = "bibtex",
+ value = "July",
+ },
+ jun = {
+ source = "bibtex",
+ value = "June",
+ },
+ mar = {
+ source = "bibtex",
+ value = "March",
+ },
+ may = {
+ source = "bibtex",
+ value = "May",
+ },
+ nov = {
+ source = "bibtex",
+ value = "November",
+ },
+ oct = {
+ source = "bibtex",
+ value = "October",
+ },
scp = {
+ source = "bibtex",
value = "Science of Computer Programming",
},
+ sep = {
+ source = "bibtex",
+ value = "September",
+ },
sicomp = {
+ source = "bibtex",
value = "SIAM Journal on Computing",
},
+ tcs = {
+ source = "bibtex",
+ value = "Theoretical Computer Science",
+ },
tocs = {
+ source = "bibtex",
value = "ACM Transactions on Computer Systems",
},
tods = {
+ source = "bibtex",
value = "ACM Transactions on Database Systems",
},
tog = {
+ source = "bibtex",
value = "ACM Transactions on Graphics",
},
toms = {
+ source = "bibtex",
value = "ACM Transactions on Mathematical Software",
},
toois = {
+ source = "bibtex",
value = "ACM Transactions on Office Information Systems",
},
toplas = {
+ source = "bibtex",
value = "ACM Transactions on Programming Languages and Systems",
},
- tcs = {
- value = "Theoretical Computer Science",
- },
},
language_code_map = {
+ UKenglish = "en-GB",
+ USenglish = "en-US",
acadian = "fr-CA",
afrikaans = "af-ZA",
albanian = "sq-AL",
@@ -3358,11 +4388,75 @@ return {
tibetan = "bo-CN",
turkish = "tr-TR",
turkmen = "tk-TM",
- UKenglish = "en-GB",
ukrainian = "uk-UA",
urdu = "ur-IN",
- USenglish = "en-US",
vietnamese = "vi-VN",
welsh = "cy-GB",
},
+ months = {
+ apr = "4",
+ april = "4",
+ aug = "8",
+ august = "8",
+ dec = "12",
+ december = "12",
+ feb = "2",
+ february = "2",
+ jan = "1",
+ january = "1",
+ jul = "7",
+ july = "7",
+ jun = "6",
+ june = "6",
+ mar = "3",
+ march = "3",
+ may = "5",
+ nov = "11",
+ november = "11",
+ oct = "10",
+ october = "10",
+ sep = "9",
+ september = "9",
+ },
+ primary_fields = {
+ annotation = "note",
+ ["archive-place"] = "archive-place",
+ author = "author",
+ bookauthor = "container-author",
+ chapter = "chapter-number",
+ date = "issued",
+ director = "director",
+ editor = "editor",
+ eprinttype = "archive",
+ eventdate = "event-date",
+ eventtitle = "event-title",
+ ["executive-producer"] = "executive-producer",
+ journaltitle = "container-title",
+ jurisdiction = "jurisdiction",
+ langid = "language",
+ location = "publisher-place",
+ medium = "medium",
+ number = "number",
+ origdate = "original-date",
+ origlocation = "original-publisher-place",
+ origpublisher = "original-publisher",
+ origtitle = "original-title",
+ pages = "page",
+ pagetotal = "number-of-pages",
+ performer = "performer",
+ pmid = "PMID",
+ publisher = "publisher",
+ pubstate = "status",
+ series = "collection-title",
+ shortjournal = "container-title-short",
+ shorttitle = "title-short",
+ title = "title",
+ translator = "translator",
+ type = "genre",
+ urldate = "accessed",
+ venue = "event-place",
+ version = "version",
+ ["volume-title"] = "volume-title",
+ volumes = "number-of-volumes",
+ },
}
diff --git a/biblio/citation-style-language/citeproc-bibtex-parser.lua b/biblio/citation-style-language/citeproc-bibtex-parser.lua
index 3932e7fe3f..00d66169f6 100644
--- a/biblio/citation-style-language/citeproc-bibtex-parser.lua
+++ b/biblio/citation-style-language/citeproc-bibtex-parser.lua
@@ -13,11 +13,22 @@
-- @module bibtex_parser
local bibtex_parser = {}
+local unicode
+local bibtex_data
+local util
+if kpse then
+ unicode = require("citeproc-unicode")
+ bibtex_data = require("citeproc-bibtex-data")
+ util = require("citeproc-util")
+else
+ unicode = require("citeproc.unicode")
+ bibtex_data = require("citeproc.bibtex-data")
+ util = require("citeproc.util")
+end
+
local lpeg = require("lpeg")
-local unicode = require("unicode")
-local bibtex_data = require("citeproc-bibtex-data")
local latex_parser = nil -- load as needed
-local util = require("citeproc-util")
+
local P = lpeg.P
local R = lpeg.R
@@ -151,17 +162,24 @@ function BibtexParser:new()
end
+---@alias BibtexEntry { key: string, type: string, fields: table<string, string> }
---@alias BibtexData table
---@alias Exception table
---comment
----@return BibtexData?, Exception[]?
+---@param bib_str string
+---@param strings table
+---@return BibtexData?
+---@return Exception[]?
function BibtexParser:parse(bib_str, strings)
if strings then
strings = setmetatable({}, {__index = strings})
else
strings = setmetatable({}, {__index = self.strings})
end
+ if type(bib_str) ~= "string" then
+ util.error("Invalid string.")
+ end
local bib_objects = self.grammar:match(bib_str)
if not bib_objects then
local error = {
@@ -172,7 +190,10 @@ function BibtexParser:parse(bib_str, strings)
end
local res = {
+ ---@type BibtexEntry[]
entries = {},
+ ---@type table<string, BibtexEntry>
+ entries_by_id = {},
strings = {},
preamble = nil,
}
@@ -181,7 +202,8 @@ function BibtexParser:parse(bib_str, strings)
for _, object in ipairs(bib_objects) do
if object.category == "entry" then
local entry = self:_make_entry(object, strings)
- table.insert(res.entries, object)
+ table.insert(res.entries, entry)
+ res.entries_by_id[entry.key] = entry
elseif object.category == "string" then
local string_value = concat_strings(object.contents, strings)
@@ -215,7 +237,11 @@ function BibtexParser:_make_entry(object, strings)
value = concat_strings(value, strings)
if self.options.convert_to_unicode then
- latex_parser = latex_parser or require("citeproc-latex-parser")
+ if kpse then
+ latex_parser = latex_parser or require("citeproc-latex-parser")
+ else
+ latex_parser = latex_parser or require("citeproc.latex-parser")
+ end
value = latex_parser.latex_to_unicode(value)
end
@@ -312,14 +338,6 @@ function bibtex_parser.split_name_parts(str)
return name
end
-local function is_upper_letter(char)
- return unicode.utf8.upper(char) == char and unicode.utf8.lower(char) ~= char
-end
-
-local function is_lower_letter(char)
- return unicode.utf8.lower(char) == char and unicode.utf8.upper(char) ~= char
-end
-
local function is_lower_word(word)
-- Word is a list of tokens
for _, token in ipairs(word) do
@@ -335,17 +353,17 @@ local function is_lower_word(word)
token_content = string.gsub(token, "}%s*$", "")
for i = 1, #token_content do
local char = string.sub(token_content, i, i)
- if is_lower_letter(char) then
+ if unicode.islower(char) then
return true
- elseif is_upper_letter(char) then
+ elseif unicode.isupper(char) then
return false
end
end
end
else
- if is_lower_letter(token) then
+ if unicode.islower(token) then
return true
- elseif is_upper_letter(token) then
+ elseif unicode.isupper(token) then
return false
end
end
diff --git a/biblio/citation-style-language/citeproc-bibtex2csl.lua b/biblio/citation-style-language/citeproc-bibtex2csl.lua
index 06c6de1576..83fada68ca 100644
--- a/biblio/citation-style-language/citeproc-bibtex2csl.lua
+++ b/biblio/citation-style-language/citeproc-bibtex2csl.lua
@@ -6,13 +6,28 @@
local bibtex2csl = {}
-local bibtex_parser = require("citeproc-bibtex-parser")
-local bibtex_data = require("citeproc-bibtex-data")
-local latex_parser = nil -- load as needed
-local util = require("citeproc-util")
+local uni_utf8
+local bibtex_parser
+local bibtex_data
+local latex_parser
+local unicode
+local util
+if kpse then
+ uni_utf8 = require("unicode").utf8
+ bibtex_parser = require("citeproc-bibtex-parser")
+ bibtex_data = require("citeproc-bibtex-data")
+ unicode = require("citeproc-unicode")
+ util = require("citeproc-util")
+else
+ uni_utf8 = require("lua-utf8")
+ bibtex_parser = require("citeproc.bibtex-parser")
+ bibtex_data = require("citeproc.bibtex-data")
+ unicode = require("citeproc.unicode")
+ util = require("citeproc.util")
+end
----@alias CslItem table
+---@alias CslItem table<string, nil | string | number | table>
---@alias CslData CslItem[]
@@ -48,24 +63,48 @@ end
---@return CslData
function bibtex2csl.convert_to_csl_data(bib, keep_unknown_commands, case_protection, sentence_case_title, check_sentence_case)
local csl_data = {}
+
+ -- BibTeX looks for crossref in a case-insensitive manner.
+ local entries_by_id = {}
+ for _, entry in ipairs(bib.entries) do
+ entries_by_id[unicode.casefold(entry.key)] = entry
+ end
+
for _, entry in ipairs(bib.entries) do
+ ---@type CslItem
local item = {
id = entry.key,
type = "document",
}
- -- CSL types
- local type_data = bibtex_data.types[entry.type]
- if type_data and type_data.csl then
- item.type = type_data.csl
+ -- crossref
+ if entry.fields.crossref then
+ bibtex2csl.process_cross_ref(entry, entries_by_id)
end
- --TODO: language
+ bibtex2csl.pre_process_special_fields(item, entry)
+
+ -- First convert primary fields
+ for field, csl_field in pairs(bibtex_data.primary_fields) do
+ local value = entry.fields[field]
+ if value then
+ local _, csl_value = bibtex2csl.convert_field(
+ field, value, keep_unknown_commands, case_protection, sentence_case_title, item.language, check_sentence_case)
+ if csl_field and csl_value and not item[csl_field] then
+ item[csl_field] = csl_value
+ end
+ end
+ end
- -- TODO: preprosse
- -- Merge title, maintitle, substitle, titleaddon
+ -- Convert the fields in a fixed order
+ local field_list = {}
+ for field, _ in pairs(entry.fields) do
+ table.insert(field_list, field)
+ end
+ table.sort(field_list)
- for field, value in pairs(entry.fields) do
+ for _, field in ipairs(field_list) do
+ local value = entry.fields[field]
local csl_field, csl_value = bibtex2csl.convert_field(
field, value, keep_unknown_commands, case_protection, sentence_case_title, item.language, check_sentence_case)
if csl_field and csl_value and not item[csl_field] then
@@ -73,7 +112,7 @@ function bibtex2csl.convert_to_csl_data(bib, keep_unknown_commands, case_protect
end
end
- bibtex2csl.process_special_fields(item, entry.fields)
+ bibtex2csl.post_process_special_fields(item, entry, entry.type)
table.insert(csl_data, item)
end
@@ -81,6 +120,98 @@ function bibtex2csl.convert_to_csl_data(bib, keep_unknown_commands, case_protect
end
+---@param entry BibtexEntry
+---@param entries_by_id table<string, BibtexEntry>
+function bibtex2csl.process_cross_ref(entry, entries_by_id)
+ local ref_entry = entries_by_id[unicode.casefold(entry.fields.crossref)]
+ if ref_entry then
+ for field, value in pairs(ref_entry.fields) do
+ if not entry.fields[field] then
+ entry.fields[field] = value
+ end
+ end
+ else
+ util.error(string.format('Crossref "%s" not found.', entry.fields.crossref))
+ end
+end
+
+
+---@param item CslItem
+---@param entry BibtexEntry
+function bibtex2csl.pre_process_special_fields(item, entry)
+ -- CSL types
+ local type_data = bibtex_data.types[entry.type]
+ if type_data and type_data.csl then
+ item.type = type_data.csl
+ elseif entry.fields.url then
+ item.type = "webpage"
+ end
+
+ -- BibTeX's `edition` is expected to be an ordinal.
+ if entry.fields.edition then
+ item.edition = util.convert_ordinal_to_arabic(entry.fields.edition)
+ end
+
+ -- language: convert `babel` language to ISO 639-1 language code
+ local lang = entry.fields.langid or entry.fields.language
+ if lang then
+ item.language = bibtex_data.language_code_map[unicode.casefold(lang)]
+ end
+ -- if not item.language then
+ -- if util.has_cjk_char(item.title) then
+ -- item.language = "zh"
+ -- end
+ -- end
+
+ -- Merge title, maintitle, subtitle, titleaddon
+ bibtex2csl.process_titles(entry)
+
+end
+
+
+---@param entry BibtexEntry
+function bibtex2csl.process_titles(entry)
+ local fields = entry.fields
+ if fields.subtitle then
+ if not fields.shorttitle then
+ fields.shorttitle = fields.title
+ end
+ if fields.title then
+ fields.title = util.join_title(fields.title, fields.subtitle)
+ else
+ fields.title = fields.subtitle
+ end
+ end
+ if fields.booksubtitle then
+ if not fields.shorttitle then
+ fields["container-title-short"] = fields.booktitle
+ end
+ if fields.booktitle then
+ fields.booktitle = util.join_title(fields.booktitle, fields.booksubtitle)
+ else
+ fields.booktitle = fields.booksubtitle
+ end
+ end
+ if fields.journalsubtitle then
+ if fields.journaltitle then
+ fields.journaltitle = util.join_title(fields.journaltitle, fields.journalsubtitle)
+ elseif fields.journal then
+ fields.journal = util.join_title(fields.journal, fields.journal)
+ end
+ end
+ if fields.issuesubtitle then
+ if not fields.shorttitle then
+ fields["volume-title-short"] = fields.issuetitle
+ end
+ if fields.issuetitle then
+ fields.issuetitle = util.join_title(fields.issuetitle, fields.issuesubtitle)
+ else
+ fields.issuetitle = fields.issuesubtitle
+ end
+ end
+end
+
+
---Convert BibTeX field to CSL field
---@param bib_field string
---@param value string
@@ -101,7 +232,11 @@ function bibtex2csl.convert_field(bib_field, value, keep_unknown_commands, case_
return nil, nil
end
- latex_parser = latex_parser or require("citeproc-latex-parser")
+ if kpse then
+ latex_parser = latex_parser or require("citeproc-latex-parser")
+ else
+ latex_parser = latex_parser or require("citeproc.latex-parser")
+ end
local field_type = field_data.type
local csl_value
@@ -115,7 +250,12 @@ function bibtex2csl.convert_field(bib_field, value, keep_unknown_commands, case_
csl_value[i] = bibtex2csl.convert_to_csl_name(name_dict)
end
- elseif bib_field == "title" or bib_field == "booktitle" then
+ elseif field_type == "date" then
+ csl_value = latex_parser.latex_to_pseudo_html(value, false, false)
+ csl_value = bibtex2csl._parse_edtf_date(csl_value)
+
+ elseif bib_field == "title" or bib_field == "shorttitle"
+ or bib_field == "booktitle" or bib_field == "container-title-short" then
-- util.debug(value)
-- 1. unicode 2. sentence case 3. html tag
if sentence_case_title and (not language or util.startswith(language, "en")) then
@@ -129,9 +269,7 @@ function bibtex2csl.convert_field(bib_field, value, keep_unknown_commands, case_
else
-- 1. unicode 2. html tag
csl_value = latex_parser.latex_to_pseudo_html(value, keep_unknown_commands, case_protection)
- if field_type == "date" then
- csl_value = bibtex2csl._parse_edtf_date(csl_value)
- elseif csl_field == "volume" or csl_field == "page" then
+ if csl_field == "volume" or csl_field == "page" then
csl_value = string.gsub(csl_value, util.unicode["en dash"], "-")
end
end
@@ -166,56 +304,47 @@ function bibtex2csl.convert_to_csl_name(bibtex_name)
end
-function bibtex2csl.process_special_fields(item, bib_fields)
- -- Default entry type `document`
- if item.type == "document" then
- if item.URL then
- item.type = "webpage"
- else
- item.type = "article"
- end
- end
-
+---@param item CslItem
+---@param entry BibtexEntry
+function bibtex2csl.post_process_special_fields(item, entry)
+ local bib_type = entry.type
+ local bib_fields = entry.fields
-- event-title: for compatibility with CSL v1.0.1 and earlier versions
if item["event-title"] then
item.event = item["event-title"]
end
- -- issued date
- if bib_fields.year and not item.issued then
- item.issued = bibtex2csl._parse_edtf_date(bib_fields.year)
+ -- Jounal abbreviations
+ if item.type == "article-journal" or item.type == "article-magazine"
+ or item.type == "article-newspaper" then
+ util.check_journal_abbreviations(item)
end
- local month = bib_fields.month
- if month and string.match(month, "^%d+$") then
- if item.issued and item.issued["date-parts"] and
+
+ -- month
+ -- local month = bib_fields.month
+ local month_text = bib_fields.month
+ if month_text then
+ month_text = latex_parser.latex_to_pseudo_html(month_text, false, false)
+ local month, day = uni_utf8.match(month_text, "^(%a+)%.?,?%s+(%d+)%a*$")
+ if not month then
+ day, month = uni_utf8.match(month_text, "^(%d+)%a*%s+(%a+)%.?$")
+ end
+ if not month then
+ month = string.match(month_text, "^(%a+)%.?$")
+ end
+ if month then
+ month = bibtex_data.months[unicode.casefold(month)]
+ end
+ if month and item.issued and item.issued["date-parts"] and
item.issued["date-parts"][1] and
item.issued["date-parts"][1][2] == nil then
item.issued["date-parts"][1][2] = tonumber(month)
+ if day then
+ item.issued["date-parts"][1][3] = tonumber(day)
+ end
end
end
- -- language: convert `babel` language to ISO 639-1 language code
- if not item.language and bib_fields.language then
- item.language = bib_fields.language
- end
- if item.language then
- local language_code = bibtex_data.language_code_map[item.language]
- if language_code then
- item.language = language_code
- end
- end
- -- if not item.language then
- -- if util.has_cjk_char(item.title) then
- -- item.language = "zh"
- -- end
- -- end
-
- -- Jounal abbreviations
- if item.type == "article-journal" or item.type == "article-magazine"
- or item.type == "article-newspaper" then
- util.check_journal_abbreviations(item)
- end
-
-- number
if item.number then
if item.type == "article-journal" or item.type == "article-magazine" or
@@ -230,8 +359,22 @@ function bibtex2csl.process_special_fields(item, bib_fields)
end
end
+ -- organization: the `organizer` that sponsors a conference or a `publisher` that publishes a `@manual` or `@online`.
+ if bib_fields.organization then
+ if item.publisher or bib_type == "inproceedings" or bib_type == "proceedings" then
+ if not item.organizer then
+ item.organizer = {
+ literal = bib_fields.organization
+ }
+ end
+ elseif not item.publisher then
+ item.publisher = bib_fields.organization
+ end
+ end
+
-- PMID
- if bib_fields.eprint and string.lower(bib_fields.eprinttype) == "pubmed" and not item.PMID then
+ if bib_fields.eprint and type(bib_fields.eprinttype) == "string" and
+ string.lower(bib_fields.eprinttype) == "pubmed" and not item.PMID then
item.PMID = bib_fields.eprint
end
diff --git a/biblio/citation-style-language/citeproc-cli.lua b/biblio/citation-style-language/citeproc-cli.lua
index 709e676ec3..e9309e313a 100644
--- a/biblio/citation-style-language/citeproc-cli.lua
+++ b/biblio/citation-style-language/citeproc-cli.lua
@@ -8,6 +8,8 @@
local cli = {}
+local lpeg = require("lpeg")
+
require("lualibs")
local citeproc = require("citeproc")
local bibtex2csl -- = require("citeproc-bibtex-parser") -- load on demand
@@ -74,52 +76,76 @@ local function convert_bib(path, output_path)
if not output_path then
output_path = string.gsub(path, "%.bib$", ".json")
end
- local file = io.open(output_path, "w")
- if not file then
- util.error(string.format('Cannot write "%s".', output_path))
- return
+ util.write_file(utilities.json.tojson(csl_data) .. "\n", output_path)
+end
+
+
+local balanced = lpeg.P{ "{" * lpeg.V(1)^0 * "}" + (1 - lpeg.S"{}") }
+
+
+---@param text string
+---@return string?
+local function get_command_argument(text, command)
+ if string.match(text, command) then
+ local grammar = (lpeg.P(command) * lpeg.S(" \t\r\n")^0 * lpeg.C(balanced) + 1)^0
+ local argument = grammar:match(text)
+ if not argument then
+ return nil
+ end
+ argument = string.sub(argument, 2, -2)
+ return argument
end
- file:write(utilities.json.tojson(csl_data) .. "\n")
- file:close()
+ return nil
end
+---comment
+---@param aux_file any
+---@return string
+---@return string[]
+---@return Citation[]
+---@return table<string, string>
+---@return string[]
local function read_aux_file(aux_file)
local bib_style = nil
local bib_files = {}
local citations = {}
local csl_options = {}
+ local bibliographies = {}
local file = io.open(aux_file, "r")
if not file then
error(string.format('Cannot read "%s"', aux_file))
- return
end
for line in file:lines() do
- local match
-- TODO: Use lpeg-based method and detect multiple lines
- match = string.match(line, "^\\csl@aux@style%s*(%b{})")
- if match then
- bib_style = string.sub(match, 2, -2)
+ local style = get_command_argument(line, "\\csl@aux@style")
+ if style then
+ bib_style = style
else
- match = string.match(line, "^\\csl@aux@data%s*(%b{})")
- if match then
- for _, bib in ipairs(util.split(string.sub(match, 2, -2), "%s*,%s*")) do
- table.insert(bib_files, bib)
+ local data = get_command_argument(line, "\\csl@aux@data")
+ if data then
+ for _, bib_file in ipairs(latex_parser.parse_seq(data)) do
+ table.insert(bib_files, bib_file)
end
else
- match = string.match(line, "^\\csl@aux@cite%s*(%b{})")
- if match then
- local citation = core.make_citation(string.sub(match, 2, -2))
+ local cite = get_command_argument(line, "\\csl@aux@cite")
+ if cite then
+ local citation = core.make_citation(cite)
table.insert(citations, citation)
else
- match = string.match(line, "^\\csl@aux@options%s*(%b{})")
- if match then
- local options = latex_parser.parse_prop(string.sub(match, 2, -2))
+ local options = get_command_argument(line, "\\csl@aux@options")
+ if options then
+ options = latex_parser.parse_prop(options)
for key, value in pairs(options) do
csl_options[key] = value
end
+ else
+ local bib = get_command_argument(line, "\\csl@aux@bibliography")
+ if bib then
+ table.insert(bibliographies, bib)
+ end
end
end
end
@@ -127,20 +153,24 @@ local function read_aux_file(aux_file)
end
file:close()
- return bib_style, bib_files, citations, csl_options
+ return bib_style, bib_files, citations, csl_options, bibliographies
end
+---@param aux_file string
local function process_aux_file(aux_file)
if not util.endswith(aux_file, ".aux") then
aux_file = aux_file .. ".aux"
end
- local style_name, bib_files, citations, csl_options = read_aux_file(aux_file)
+ local style_name, bib_files, citations, csl_options, bibliographies = read_aux_file(aux_file)
local lang = csl_options.locale
local engine = core.init(style_name, bib_files, lang)
+ if not engine then
+ error("citeproc-lua: fails in initialize engine")
+ end
if csl_options.linking then
engine:enable_linking()
end
@@ -156,7 +186,7 @@ local function process_aux_file(aux_file)
-- util.debug(citation_strings)
- local output_string = ""
+ local output_string = string.format("\\cslsetup{class = %s}\n\n", style_class)
for _, citation in ipairs(citations) do
local citation_id = citation.citationID
@@ -172,15 +202,13 @@ local function process_aux_file(aux_file)
core.set_categories(engine, categories_str)
end
- local filter_str = csl_options["bib-filter"]
-
- local result = core.make_bibliography(engine, filter_str)
- output_string = output_string .. result
+ for _, bib_filter_str in ipairs(bibliographies) do
+ local result = core.make_bibliography(engine, bib_filter_str)
+ output_string = output_string .. "\n\n\n" .. result
+ end
local output_path = string.gsub(aux_file, "%.aux$", ".bbl")
- local bbl_file = io.open(output_path, "w")
- bbl_file:write(output_string)
- bbl_file:close()
+ util.write_file(output_string, output_path)
end
diff --git a/biblio/citation-style-language/citeproc-context.lua b/biblio/citation-style-language/citeproc-context.lua
index 24bb2b7d7a..973c39a728 100644
--- a/biblio/citation-style-language/citeproc-context.lua
+++ b/biblio/citation-style-language/citeproc-context.lua
@@ -6,9 +6,19 @@
local context = {}
-local LocalizedQuotes = require("citeproc-output").LocalizedQuotes
-
-local util = require("citeproc-util")
+local unicode
+local LocalizedQuotes
+local util
+
+if kpse then
+ unicode = require("citeproc-unicode")
+ LocalizedQuotes = require("citeproc-output").LocalizedQuotes
+ util = require("citeproc-util")
+else
+ unicode = require("citeproc.unicode")
+ LocalizedQuotes = require("citeproc.output").LocalizedQuotes
+ util = require("citeproc.util")
+end
local Context = {
@@ -179,7 +189,7 @@ function Context:split_ndp_family(name)
if ndp and family then
table.insert(ndp_parts, ndp)
parts[i] = family
- elseif i < #parts and util.is_lower(part) then
+ elseif i < #parts and unicode.islower(part) then
table.insert(ndp_parts, part)
end
end
@@ -190,7 +200,7 @@ function Context:split_ndp_family(name)
end
break
end
- if not util.is_lower(part) then
+ if not unicode.islower(part) then
for j = i, #parts do
table.insert(family_parts, parts[j])
end
@@ -212,7 +222,7 @@ function Context:split_given_dp(name)
local parts = util.split(name.given)
for i = #parts, 1, -1 do
local part = parts[i]
- if i == 1 or not util.is_lower(part) then
+ if i == 1 or not unicode.islower(part) then
for j = 1, i do
table.insert(given_parts, parts[j])
end
diff --git a/biblio/citation-style-language/citeproc-element.lua b/biblio/citation-style-language/citeproc-element.lua
index 4d3226dc70..956095e622 100644
--- a/biblio/citation-style-language/citeproc-element.lua
+++ b/biblio/citation-style-language/citeproc-element.lua
@@ -6,12 +6,25 @@
local element = {}
-local SeqIr = require("citeproc-ir-node").SeqIr
+local context
+local ir_node
+local output
+local util
-local InlineElement = require("citeproc-output").InlineElement
-local Micro = require("citeproc-output").Micro
+if kpse then
+ ir_node = require("citeproc-ir-node")
+ output = require("citeproc-output")
+ util = require("citeproc-util")
+else
+ ir_node = require("citeproc.ir-node")
+ output = require("citeproc.output")
+ util = require("citeproc.util")
+end
+
+local SeqIr = ir_node.SeqIr
-local util = require("citeproc-util")
+local InlineElement = output.InlineElement
+local Micro = output.Micro
---@class Element
diff --git a/biblio/citation-style-language/citeproc-engine.lua b/biblio/citation-style-language/citeproc-engine.lua
index 83cc2654ee..ac50da02d8 100644
--- a/biblio/citation-style-language/citeproc-engine.lua
+++ b/biblio/citation-style-language/citeproc-engine.lua
@@ -6,20 +6,45 @@
local engine = {}
-local dom = require("luaxml-domobject")
-
-local nodes = require("citeproc-nodes")
-local Element = require("citeproc-element").Element
-local Style = require("citeproc-node-style").Style
-local Locale = require("citeproc-node-locale").Locale
-local Context = require("citeproc-context").Context
-local IrState = require("citeproc-context").IrState
-local InlineElement = require("citeproc-output").InlineElement
--- local OutputFormat = require("citeproc-output").OutputFormat
-local LatexWriter = require("citeproc-output").LatexWriter
-local HtmlWriter = require("citeproc-output").HtmlWriter
-local SortStringFormat = require("citeproc-output").SortStringFormat
-local util = require("citeproc-util")
+local dom
+local context
+local element
+local nodes
+local node_locale
+local node_style
+local output
+local util
+
+if kpse then
+ dom = require("luaxml-domobject")
+ context = require("citeproc-context")
+ element = require("citeproc-element")
+ nodes = require("citeproc-nodes")
+ node_locale = require("citeproc-node-locale")
+ node_style = require("citeproc-node-style")
+ output = require("citeproc-output")
+ util = require("citeproc-util")
+else
+ dom = require("citeproc.luaxml.domobject")
+ context = require("citeproc.context")
+ element = require("citeproc.element")
+ nodes = require("citeproc.nodes")
+ node_locale = require("citeproc.node-locale")
+ node_style = require("citeproc.node-style")
+ output = require("citeproc.output")
+ util = require("citeproc.util")
+end
+
+local Element = element.Element
+local Style = node_style.Style
+local Locale = node_locale.Locale
+local Context = context.Context
+local IrState = context.IrState
+local InlineElement = output.InlineElement
+-- local OutputFormat = output.OutputFormat
+local LatexWriter = output.LatexWriter
+local HtmlWriter = output.HtmlWriter
+local SortStringFormat = output.SortStringFormat
---@class CiteProc
@@ -74,7 +99,7 @@ function CiteProc.new(sys, style, lang, force_lang)
uncited_list = {},
previous_citation = nil,
requires_sorting = false,
- longest_label = "",
+ widest_label = "",
maxoffset = 0,
}
@@ -602,7 +627,7 @@ function CiteProc:makeBibliography(bibsection)
local res = {}
- self.registry.longest_label = ""
+ self.registry.widest_label = ""
self.registry.maxoffset = 0
local ids = self:get_sorted_refs()
@@ -629,6 +654,7 @@ function CiteProc:makeBibliography(bibsection)
linespacing = self.style.bibliography.line_spacing,
entryspacing = self.style.bibliography.entry_spacing,
maxoffset = self.registry.maxoffset,
+ widest_label = self.registry.widest_label,
bibstart = bib_start,
bibend = bib_end,
entry_ids = util.clone(self.registry.reflist),
diff --git a/biblio/citation-style-language/citeproc-ir-node.lua b/biblio/citation-style-language/citeproc-ir-node.lua
index 5770d8d0dc..b9324a15bb 100644
--- a/biblio/citation-style-language/citeproc-ir-node.lua
+++ b/biblio/citation-style-language/citeproc-ir-node.lua
@@ -6,7 +6,13 @@
local irnode = {}
-local util = require("citeproc-util")
+local util
+
+if kpse then
+ util = require("citeproc-util")
+else
+ util = require("citeproc.util")
+end
---@class IrNode
diff --git a/biblio/citation-style-language/citeproc-latex-core.lua b/biblio/citation-style-language/citeproc-latex-core.lua
index c8fcf475a3..1d734c43ac 100644
--- a/biblio/citation-style-language/citeproc-latex-core.lua
+++ b/biblio/citation-style-language/citeproc-latex-core.lua
@@ -8,6 +8,7 @@ local core = {}
local citeproc = require("citeproc")
local bibtex2csl -- = require("citeproc-bibtex-parser") -- load on demand
+local unicode = require("citeproc-unicode")
local util = citeproc.util
require("lualibs")
local latex_parser = require("citeproc-latex-parser")
@@ -22,7 +23,7 @@ core.item_dict = {}
function core.read_file(file_name, ftype, file_info)
if file_info then
- file_info = util.capitalize(file_info)
+ file_info = unicode.capitalize(file_info)
else
file_info = "File"
end
@@ -40,6 +41,7 @@ function core.read_file(file_name, ftype, file_info)
return nil
end
local contents = file:read("*a")
+ contents = util.remove_bom(contents)
file:close()
return contents
end
@@ -139,6 +141,11 @@ function core.make_citeproc_sys(data_files)
return citeproc_sys
end
+---comment
+---@param style_name string
+---@param data_files string[]
+---@param lang string?
+---@return CiteProc?
function core.init(style_name, data_files, lang)
if style_name == "" or #data_files == 0 then
return nil
@@ -288,23 +295,47 @@ function core.update_cited_and_uncited_ids(engine, citations)
end
+
+---Convert to a filter object described in
+--- <https://citeproc-js.readthedocs.io/en/latest/running.html#selective-output-with-makebibliography>
+---@param filter_str string e.g., "type={book},notcategory={csl},notcategory={tex}"
+---@return table
function core.parser_filter(filter_str)
- -- util.debug(filter_str)
- local filter = latex_parser.parse_prop(filter_str)
- for filter_type, conditions in pairs(filter) do
- conditions = latex_parser.parse_seq(conditions)
- filter[filter_type] = conditions
- for i, condition in ipairs(conditions) do
- conditions[i] = latex_parser.parse_prop(condition)
+ local conditions = {}
+ for i, condition in ipairs(latex_parser.parse_seq(filter_str)) do
+ local negative
+ local field, value = string.match(condition, "(%w+)%s*=%s*{([^}]+)}")
+ if field then
+ if string.match(field, "^not") then
+ negative = true
+ field = string.gsub(field, "^not", "")
+ end
+ if field == "category" then
+ field = "categories"
+ end
+ if field == "keyword" or field == "type" or field == "categories" then
+ table.insert(conditions, {
+ field = field,
+ value = value,
+ negative = negative,
+ })
+ end
end
end
- return filter
+ -- util.debug(conditions)
+ return {select = conditions}
end
-function core.make_bibliography(engine, filter_str)
+---comment
+---@param engine CiteProc
+---@param option_str string
+---@return unknown
+function core.make_bibliography(engine, option_str)
local filter
- if filter_str then
- filter = core.parser_filter(filter_str)
+ local options = {}
+ if option_str and option_str ~= "" then
+ options = latex_parser.parse_prop(option_str)
+ filter = core.parser_filter(option_str)
end
local result = engine:makeBibliography(filter)
@@ -313,20 +344,23 @@ function core.make_bibliography(engine, filter_str)
local res = ""
- local bib_options = {}
- bib_options["class"] = engine:get_style_class()
- local bib_option_list = {"class"}
+ ---@type table<string, any>
+ local bib_options = {
+ index = options.index or "1"
+ }
local bib_option_map = {
+ ["hanging-indent"] = "hangingindent",
["entry-spacing"] = "entryspacing",
["line-spacing"] = "linespacing",
- ["hanging-indent"] = "hangingindent",
+ ["widest-label"] = "widest_label",
}
local bib_option_order = {
- "class",
+ "index",
"hanging-indent",
"line-spacing",
"entry-spacing",
+ "widest-label",
}
for option, param in pairs(bib_option_map) do
@@ -335,20 +369,23 @@ function core.make_bibliography(engine, filter_str)
end
end
- local bib_options_str = "\\cslsetup{\n"
+ local bib_option_list = {}
for _, option in ipairs(bib_option_order) do
local value = bib_options[option]
- if value then
- bib_options_str = bib_options_str .. string.format(" %s = %s,\n", option, tostring(value))
+ if value and value ~= "" then
+ table.insert(bib_option_list, string.format("%s = %s", option, tostring(value)))
end
end
- bib_options_str = bib_options_str .. "}\n"
- res = res .. bib_options_str .. "\n"
+ local bib_options_str = table.concat(bib_option_list, ", ")
-- util.debug(params.bibstart)
- if params.bibstart then
- res = res .. params.bibstart
- end
+ -- if params.bibstart then
+ -- res = res .. params.bibstart
+ -- end
+
+ local bibstart = string.format("\\begin{thebibliography}{%s}\n", bib_options_str)
+ res = res .. bibstart
+
for _, bib_item in ipairs(bib_items) do
res = res .. "\n" .. bib_item
diff --git a/biblio/citation-style-language/citeproc-latex-data.lua b/biblio/citation-style-language/citeproc-latex-data.lua
index d7b5355265..283d3430d5 100644
--- a/biblio/citation-style-language/citeproc-latex-data.lua
+++ b/biblio/citation-style-language/citeproc-latex-data.lua
@@ -44,6 +44,32 @@ return {
inline_type = "Formatted",
num_args = 0,
},
+ ["\\mkbibbold"] = {
+ formatting_key = "font-weight",
+ formatting_value = "bold",
+ inline_type = "Formatted",
+ num_args = 1,
+ },
+ ["\\mkbibemph"] = {
+ formatting_key = "font-style",
+ formatting_value = "italic",
+ inline_type = "Formatted",
+ num_args = 1,
+ },
+ ["\\mkbibitalic"] = {
+ formatting_key = "font-style",
+ formatting_value = "italic",
+ inline_type = "Formatted",
+ num_args = 1,
+ },
+ ["\\mkbibquote"] = {
+ inline_type = "Quoted",
+ num_args = 1,
+ },
+ ["\\noopsort"] = {
+ action = "gobble",
+ num_args = 1,
+ },
["\\sl"] = {
formatting_key = "font-style",
formatting_value = "oblique",
@@ -466,109 +492,124 @@ return {
},
unicode_commands = {
['\\"'] = {
- A = "00C4",
- E = "00CB",
- I = "00CF",
- O = "00D6",
- U = "00DC",
- Y = "0178",
- ["\\i"] = "00EF",
- a = "00E4",
- e = "00EB",
- i = "00EF",
- o = "00F6",
- u = "00FC",
- y = "00FF",
+ code_point = "0308",
+ composites = {
+ A = "00C4",
+ E = "00CB",
+ I = "00CF",
+ O = "00D6",
+ U = "00DC",
+ Y = "0178",
+ ["\\i"] = "00EF",
+ a = "00E4",
+ e = "00EB",
+ i = "00EF",
+ o = "00F6",
+ u = "00FC",
+ y = "00FF",
+ },
},
["\\#"] = "0023",
["\\$"] = "0024",
["\\%"] = "0025",
["\\&"] = "0026",
["\\'"] = {
- A = "00C1",
- C = "0106",
- E = "00C9",
- G = "01F4",
- I = "00CD",
- K = "1E30",
- L = "0139",
- N = "0143",
- O = "00D3",
- R = "0154",
- S = "015A",
- U = "00DA",
- Y = "00DD",
- Z = "0179",
- ["\\AE"] = "01FC",
- ["\\ae"] = "01FD",
- ["\\i"] = "00ED",
- a = "00E1",
- c = "0107",
- e = "00E9",
- g = "01F5",
- i = "00ED",
- k = "1E31",
- l = "013A",
- n = "0144",
- o = "00F3",
- r = "0155",
- s = "015B",
- u = "00FA",
- y = "00FD",
- z = "017A",
- ["Æ"] = "01FC",
- ["æ"] = "01FD",
+ code_point = "0301",
+ composites = {
+ A = "00C1",
+ C = "0106",
+ E = "00C9",
+ G = "01F4",
+ I = "00CD",
+ K = "1E30",
+ L = "0139",
+ N = "0143",
+ O = "00D3",
+ R = "0154",
+ S = "015A",
+ U = "00DA",
+ Y = "00DD",
+ Z = "0179",
+ ["\\AE"] = "01FC",
+ ["\\ae"] = "01FD",
+ ["\\i"] = "00ED",
+ a = "00E1",
+ c = "0107",
+ e = "00E9",
+ g = "01F5",
+ i = "00ED",
+ k = "1E31",
+ l = "013A",
+ n = "0144",
+ o = "00F3",
+ r = "0155",
+ s = "015B",
+ u = "00FA",
+ y = "00FD",
+ z = "017A",
+ ["Æ"] = "01FC",
+ ["æ"] = "01FD",
+ },
},
["\\-"] = "00AD",
["\\."] = {
- [""] = "02D9",
- B = "1E02",
- C = "010A",
- E = "0116",
- F = "1E1E",
- G = "0120",
- I = "0130",
- Y = "1E8E",
- Z = "017B",
- b = "1E03",
- c = "010B",
- e = "0117",
- f = "1E1F",
- g = "0121",
- n = "1E45",
- y = "1E8F",
- z = "017C",
+ code_point = "0307",
+ composites = {
+ [""] = "02D9",
+ B = "1E02",
+ C = "010A",
+ E = "0116",
+ F = "1E1E",
+ G = "0120",
+ I = "0130",
+ Y = "1E8E",
+ Z = "017B",
+ b = "1E03",
+ c = "010B",
+ e = "0117",
+ f = "1E1F",
+ g = "0121",
+ n = "1E45",
+ y = "1E8F",
+ z = "017C",
+ },
},
["\\="] = {
- A = "0100",
- E = "0112",
- G = "1E20",
- I = "012A",
- O = "014C",
- U = "016A",
- Y = "0232",
- ["\\AE"] = "01E2",
- ["\\ae"] = "01E3",
- ["\\i"] = "012B",
- a = "0101",
- e = "0113",
- g = "1E21",
- i = "012B",
- o = "014D",
- u = "016B",
- y = "0233",
- ["Æ"] = "01E2",
- ["æ"] = "01E3",
+ code_point = "0304",
+ composites = {
+ A = "0100",
+ E = "0112",
+ G = "1E20",
+ I = "012A",
+ O = "014C",
+ U = "016A",
+ Y = "0232",
+ ["\\AE"] = "01E2",
+ ["\\ae"] = "01E3",
+ ["\\i"] = "012B",
+ a = "0101",
+ e = "0113",
+ g = "1E21",
+ i = "012B",
+ o = "014D",
+ u = "016B",
+ y = "0233",
+ ["Æ"] = "01E2",
+ ["æ"] = "01E3",
+ },
},
["\\AA"] = "00C5",
["\\AE"] = "00C6",
["\\DH"] = "00D0",
["\\DJ"] = "0110",
["\\H"] = {
- O = "0150",
- U = "0170",
- o = "0151",
- u = "0171",
+ code_point = "030B",
+ composites = {
+ O = "0150",
+ U = "0170",
+ o = "0151",
+ u = "0171",
+ },
},
["\\Hwithstroke"] = "0126",
["\\IJ"] = "0132",
@@ -579,113 +620,128 @@ return {
["\\SS"] = "1E9E",
["\\TH"] = "00DE",
["\\^"] = {
- [""] = "005E",
- A = "00C2",
- C = "0108",
- E = "00CA",
- G = "011C",
- H = "0124",
- I = "00CE",
- J = "0134",
- O = "00D4",
- S = "015C",
- U = "00DB",
- W = "0174",
- Y = "0176",
- Z = "1E90",
- ["\\i"] = "00EE",
- ["\\j"] = "0135",
- a = "00E2",
- c = "0109",
- e = "00EA",
- g = "011D",
- h = "0125",
- i = "00EE",
- j = "0135",
- o = "00F4",
- s = "015D",
- u = "00FB",
- w = "0175",
- y = "0177",
- z = "1E91",
+ code_point = "0302",
+ composites = {
+ [""] = "005E",
+ A = "00C2",
+ C = "0108",
+ E = "00CA",
+ G = "011C",
+ H = "0124",
+ I = "00CE",
+ J = "0134",
+ O = "00D4",
+ S = "015C",
+ U = "00DB",
+ W = "0174",
+ Y = "0176",
+ Z = "1E90",
+ ["\\i"] = "00EE",
+ ["\\j"] = "0135",
+ a = "00E2",
+ c = "0109",
+ e = "00EA",
+ g = "011D",
+ h = "0125",
+ i = "00EE",
+ j = "0135",
+ o = "00F4",
+ s = "015D",
+ u = "00FB",
+ w = "0175",
+ y = "0177",
+ z = "1E91",
+ },
},
["\\_"] = "005F",
["\\`"] = {
- A = "00C0",
- E = "00C8",
- I = "00CC",
- O = "00D2",
- U = "00D9",
- Y = "1EF2",
- ["\\i"] = "00EC",
- a = "00E0",
- e = "00E8",
- i = "00EC",
- o = "00F2",
- u = "00F9",
- y = "1EF3",
+ code_point = "0300",
+ composites = {
+ A = "00C0",
+ E = "00C8",
+ I = "00CC",
+ O = "00D2",
+ U = "00D9",
+ Y = "1EF2",
+ ["\\i"] = "00EC",
+ a = "00E0",
+ e = "00E8",
+ i = "00EC",
+ o = "00F2",
+ u = "00F9",
+ y = "1EF3",
+ },
},
["\\aa"] = "00E5",
["\\ae"] = "00E6",
+ ["\\b"] = {
+ code_point = "0332",
+ },
["\\bgroup"] = "007B",
["\\c"] = {
- C = "00C7",
- G = "0122",
- K = "0136",
- L = "013B",
- N = "0145",
- R = "0156",
- S = "015E",
- T = "0162",
- ["\\ "] = "00B8",
- c = "00E7",
- g = "0123",
- k = "0137",
- l = "013C",
- n = "0146",
- r = "0157",
- s = "015F",
- t = "0163",
+ code_point = "0327",
+ composites = {
+ C = "00C7",
+ G = "0122",
+ K = "0136",
+ L = "013B",
+ N = "0145",
+ R = "0156",
+ S = "015E",
+ T = "0162",
+ ["\\ "] = "00B8",
+ c = "00E7",
+ g = "0123",
+ k = "0137",
+ l = "013C",
+ n = "0146",
+ r = "0157",
+ s = "015F",
+ t = "0163",
+ },
},
["\\d"] = {
- A = "1EA0",
- B = "1E04",
- D = "1E0C",
- E = "1EB8",
- H = "1E24",
- I = "1ECA",
- K = "1E32",
- L = "1E36",
- M = "1E42",
- N = "1E46",
- O = "1ECC",
- R = "1E5A",
- S = "1E62",
- T = "1E6C",
- U = "1EE4",
- V = "1E7E",
- W = "1E88",
- Y = "1EF4",
- Z = "1E92",
- a = "1EA1",
- b = "1E05",
- d = "1E0D",
- e = "1EB9",
- h = "1E25",
- i = "1ECB",
- k = "1E33",
- l = "1E37",
- m = "1E43",
- n = "1E47",
- o = "1ECD",
- r = "1E5B",
- s = "1E63",
- t = "1E6D",
- u = "1EE5",
- v = "1E7F",
- w = "1E89",
- y = "1EF5",
- z = "1E93",
+ code_point = "0323",
+ composites = {
+ A = "1EA0",
+ B = "1E04",
+ D = "1E0C",
+ E = "1EB8",
+ H = "1E24",
+ I = "1ECA",
+ K = "1E32",
+ L = "1E36",
+ M = "1E42",
+ N = "1E46",
+ O = "1ECC",
+ R = "1E5A",
+ S = "1E62",
+ T = "1E6C",
+ U = "1EE4",
+ V = "1E7E",
+ W = "1E88",
+ Y = "1EF4",
+ Z = "1E92",
+ a = "1EA1",
+ b = "1E05",
+ d = "1E0D",
+ e = "1EB9",
+ h = "1E25",
+ i = "1ECB",
+ k = "1E33",
+ l = "1E37",
+ m = "1E43",
+ n = "1E47",
+ o = "1ECD",
+ r = "1E5B",
+ s = "1E63",
+ t = "1E6D",
+ u = "1EE5",
+ v = "1E7F",
+ w = "1E89",
+ y = "1EF5",
+ z = "1E93",
+ },
},
["\\dh"] = "00F0",
["\\dj"] = "0111",
@@ -701,24 +757,29 @@ return {
["\\ij"] = "0133",
["\\j"] = "0237",
["\\k"] = {
- [""] = "02DB",
- A = "0104",
- E = "0118",
- I = "012E",
- O = "01EA",
- U = "0172",
- ["\\i"] = "012F",
- a = "0105",
- e = "0119",
- i = "012F",
- o = "01EB",
- u = "0173",
+ code_point = "0328",
+ composites = {
+ [""] = "02DB",
+ A = "0104",
+ E = "0118",
+ I = "012E",
+ O = "01EA",
+ U = "0172",
+ ["\\i"] = "012F",
+ a = "0105",
+ e = "0119",
+ i = "012F",
+ o = "01EB",
+ u = "0173",
+ },
},
["\\l"] = "0142",
["\\lbrack"] = "005B",
["\\lq"] = "2018",
["\\mbox"] = {
- ["-"] = "2011",
+ composites = {
+ ["-"] = "2011",
+ },
},
["\\ng"] = "014B",
["\\nobreak"] = "FEFF",
@@ -729,10 +790,13 @@ return {
["\\quotedblbase"] = "201E",
["\\quotesinglbase"] = "201A",
["\\r"] = {
- A = "00C5",
- U = "016E",
- a = "00E5",
- u = "016F",
+ code_point = "030A",
+ composites = {
+ A = "00C5",
+ U = "016E",
+ a = "00E5",
+ u = "016F",
+ },
},
["\\rbrack"] = "005D",
["\\rq"] = "2019",
@@ -762,10 +826,12 @@ return {
["\\textcircledP"] = "2117",
["\\textcolonmonetary"] = "20A1",
["\\textcommabelow"] = {
- S = "0218",
- T = "021A",
- s = "0219",
- t = "021B",
+ composites = {
+ S = "0218",
+ T = "021A",
+ s = "0219",
+ t = "021B",
+ },
},
["\\textcompwordmark"] = "200C",
["\\textcopyright"] = "00A9",
@@ -845,70 +911,79 @@ return {
["\\textyen"] = "00A5",
["\\th"] = "00FE",
["\\u"] = {
- A = "0102",
- E = "0114",
- G = "011E",
- I = "012C",
- O = "014E",
- U = "016C",
- ["\\i"] = "012D",
- a = "0103",
- e = "0115",
- g = "011F",
- i = "012D",
- o = "014F",
- u = "016D",
+ code_point = "0306",
+ composites = {
+ A = "0102",
+ E = "0114",
+ G = "011E",
+ I = "012C",
+ O = "014E",
+ U = "016C",
+ ["\\i"] = "012D",
+ a = "0103",
+ e = "0115",
+ g = "011F",
+ i = "012D",
+ o = "014F",
+ u = "016D",
+ },
},
["\\v"] = {
- A = "01CD",
- C = "010C",
- D = "010E",
- E = "011A",
- G = "01E6",
- I = "01CF",
- K = "01E8",
- L = "013D",
- N = "0147",
- O = "01D1",
- R = "0158",
- S = "0160",
- T = "0164",
- U = "01D3",
- Z = "017D",
- ["\\i"] = "01D0",
- ["\\j"] = "01F0",
- a = "01CE",
- c = "010D",
- d = "010F",
- e = "011B",
- g = "01E7",
- i = "01D0",
- j = "01F0",
- k = "01E9",
- l = "013E",
- n = "0148",
- o = "01D2",
- r = "0159",
- s = "0161",
- t = "0165",
- u = "01D4",
- z = "017E",
+ code_point = "030C",
+ composites = {
+ A = "01CD",
+ C = "010C",
+ D = "010E",
+ E = "011A",
+ G = "01E6",
+ I = "01CF",
+ K = "01E8",
+ L = "013D",
+ N = "0147",
+ O = "01D1",
+ R = "0158",
+ S = "0160",
+ T = "0164",
+ U = "01D3",
+ Z = "017D",
+ ["\\i"] = "01D0",
+ ["\\j"] = "01F0",
+ a = "01CE",
+ c = "010D",
+ d = "010F",
+ e = "011B",
+ g = "01E7",
+ i = "01D0",
+ j = "01F0",
+ k = "01E9",
+ l = "013E",
+ n = "0148",
+ o = "01D2",
+ r = "0159",
+ s = "0161",
+ t = "0165",
+ u = "01D4",
+ z = "017E",
+ },
},
["\\{"] = "007B",
["\\}"] = "007D",
["\\~"] = {
- [""] = "007E",
- A = "00C3",
- I = "0128",
- N = "00D1",
- O = "00D5",
- U = "0168",
- ["\\i"] = "0129",
- a = "00E3",
- i = "0129",
- n = "00F1",
- o = "00F5",
- u = "0169",
+ code_point = "0303",
+ composites = {
+ [""] = "007E",
+ A = "00C3",
+ I = "0128",
+ N = "00D1",
+ O = "00D5",
+ U = "0168",
+ ["\\i"] = "0129",
+ a = "00E3",
+ i = "0129",
+ n = "00F1",
+ o = "00F5",
+ u = "0169",
+ },
},
},
}
diff --git a/biblio/citation-style-language/citeproc-latex-parser.lua b/biblio/citation-style-language/citeproc-latex-parser.lua
index 2606888998..3c7aac601c 100644
--- a/biblio/citation-style-language/citeproc-latex-parser.lua
+++ b/biblio/citation-style-language/citeproc-latex-parser.lua
@@ -6,10 +6,21 @@
local latex_parser = {}
+local bibtex_parser
+local latex_data
+local markup
+local util
+if kpse then
+ latex_data = require("citeproc-latex-data")
+ markup = require("citeproc-output")
+ util = require("citeproc-util")
+else
+ latex_data = require("citeproc.latex-data")
+ markup = require("citeproc.output")
+ util = require("citeproc.util")
+end
+
local lpeg = require("lpeg")
-local latex_data = require("citeproc-latex-data")
-local markup = require("citeproc-output")
-local util = require("citeproc-util")
-- Convert LaTeX string to Unicode string
@@ -35,6 +46,7 @@ end
-- Convert LaTeX string to string with HTML-like tags
function latex_parser.latex_to_pseudo_html(str, strict, case_protection)
local ast = latex_parser.latex_grammar:match(str)
+ -- util.debug(ast)
latex_parser.convert_ast_to_unicode(ast)
local inlines = latex_parser.convert_tokens_to_inlines(ast, strict, case_protection)
-- util.debug(inlines)
@@ -196,13 +208,20 @@ local function _remove_braces_of_diacritic(tokens, i, orig_first_token)
end
end
-local function _replace_diacritic_with_unicode(tokens, i, code_point)
+---comment
+---@param tokens any
+---@param i any
+---@param command_info string | table
+local function _replace_diacritic_with_unicode(tokens, i, command_info)
local unicode_char
- if type(code_point) == "string" then
- unicode_char = utf8.char(tonumber(code_point, 16))
+ if type(command_info) == "string" then
+ unicode_char = utf8.char(tonumber(command_info, 16))
tokens[i] = unicode_char
- elseif type(code_point) == "table" then
+ elseif type(command_info) == "table" then
+ if not command_info.composites then
+ error('Missing "composites"')
+ end
-- The command takes an argument (\"{o})
local arg
local j = i + 1
@@ -230,12 +249,19 @@ local function _replace_diacritic_with_unicode(tokens, i, code_point)
end
end
end
- if arg and code_point[arg] then
- unicode_char = utf8.char(tonumber(code_point[arg], 16))
+ if arg and command_info.composites[arg] then
+ unicode_char = utf8.char(tonumber(command_info.composites[arg], 16))
tokens[i] = unicode_char
for k = j, i + 1, -1 do
table.remove(tokens, k)
end
+ elseif command_info.code_point then
+ -- Move the Diacritic after the next token
+ unicode_char = utf8.char(tonumber(command_info.code_point, 16))
+ for k = i, j - 1 do
+ tokens[k] = tokens[k + 1]
+ end
+ tokens[j] = unicode_char
end
end
end
@@ -253,9 +279,9 @@ function latex_parser.convert_ast_to_unicode(tokens)
elseif token.type == "control_sequence" then
local cs = token
- local code_point = latex_data.unicode_commands[cs.name]
- if code_point then
- _replace_diacritic_with_unicode(tokens, i, code_point)
+ local command_info = latex_data.unicode_commands[cs.name]
+ if command_info then
+ _replace_diacritic_with_unicode(tokens, i, command_info)
end
end
end
@@ -309,6 +335,14 @@ function latex_parser.convert_cs_to_inlines(tokens, i, strict, case_protection)
-- NoCase
table.insert(inlines, markup[inline_type]:new(arg_inlines))
end
+
+ elseif command_info.action then
+ if command_info.action == "gobble" then
+ table.remove(tokens, i)
+ for j = 1, command_info.num_args do
+ table.remove(tokens, i)
+ end
+ end
end
else
@@ -331,7 +365,7 @@ function latex_parser.convert_cs_to_inlines(tokens, i, strict, case_protection)
return inlines, i
end
-function latex_parser.convert_group_to_inlines(token, strict, case_protection)
+function latex_parser.convert_group_to_inlines(token, strict, case_protection, force_add_braces)
if case_protection then
local first_token = token.contents[1]
if type(first_token) == "table" and first_token.type == "control_sequence" then
@@ -340,6 +374,10 @@ function latex_parser.convert_group_to_inlines(token, strict, case_protection)
end
end
local inlines = latex_parser.convert_tokens_to_inlines(token.contents, strict, false)
+ if #inlines == 0 then
+ -- Empty group like `{\\noopsort{1973b}}`
+ return inlines
+ end
if case_protection then
inlines = {markup.NoCase:new(inlines)}
end
@@ -351,7 +389,7 @@ function latex_parser.convert_group_to_inlines(token, strict, case_protection)
break
end
end
- if has_command then
+ if force_add_braces or has_command then
table.insert(inlines, 1, markup.Code:new("{"))
table.insert(inlines, markup.Code:new("}"))
end
@@ -360,7 +398,9 @@ function latex_parser.convert_group_to_inlines(token, strict, case_protection)
end
----comment
+---A group is surrounded with braces in these cases:
+---1. Following a command; e.g, `\textbf{foo}` and `\textcolor{red}{flag}`
+---2. Containing a command; e.g, {\bfseies foo}
---@param tokens table
---@param strict boolean? Convert unrecognized LaTeX command to Code element
---@param case_protection boolean? Protect case with BibTeX's rules
@@ -369,6 +409,7 @@ function latex_parser.convert_tokens_to_inlines(tokens, strict, case_protection)
local inlines = {}
local i = 1
+ local add_group_braces = false
while i <= #tokens do
local token = tokens[i]
if type(token) == "string" then
@@ -382,15 +423,17 @@ function latex_parser.convert_tokens_to_inlines(tokens, strict, case_protection)
end
end
table.insert(inlines, markup.PlainText:new(token))
+ add_group_braces = false
elseif type(token) == "table" then
if token.type == "control_sequence" then
local cs_inlines
cs_inlines, i = latex_parser.convert_cs_to_inlines(tokens, i, strict, case_protection)
util.extend(inlines, cs_inlines)
+ add_group_braces = true
elseif token.type == "group" then
- util.extend(inlines, latex_parser.convert_group_to_inlines(token, strict, case_protection))
+ util.extend(inlines, latex_parser.convert_group_to_inlines(token, strict, case_protection, add_group_braces))
elseif token.type == "math" then
table.insert(inlines, markup.MathTeX:new(token.text))
diff --git a/biblio/citation-style-language/citeproc-lua.1 b/biblio/citation-style-language/citeproc-lua.1
index c8fe3c3d68..ab588bea42 100644
--- a/biblio/citation-style-language/citeproc-lua.1
+++ b/biblio/citation-style-language/citeproc-lua.1
@@ -1,4 +1,4 @@
-.TH citeproc-lua 1 "0.1.1"
+.TH citeproc-lua 1 "0.4.1"
.SH NAME
citeproc-lua \- make CSL citations and bibliography for LaTeX
.SH SYNOPSIS
diff --git a/biblio/citation-style-language/citeproc-node-bibliography.lua b/biblio/citation-style-language/citeproc-node-bibliography.lua
index 6db7e53e67..93797196a2 100644
--- a/biblio/citation-style-language/citeproc-node-bibliography.lua
+++ b/biblio/citation-style-language/citeproc-node-bibliography.lua
@@ -6,18 +6,38 @@
local bibliography_module = {}
-local dom = require("luaxml-domobject")
+local context
+local element
+local ir_node
+local output
+local node_names
+local util
+
+if kpse then
+ context = require("citeproc-context")
+ element = require("citeproc-element")
+ ir_node = require("citeproc-ir-node")
+ output = require("citeproc-output")
+ node_names = require("citeproc-node-names")
+ util = require("citeproc-util")
+else
+ context = require("citeproc.context")
+ element = require("citeproc.element")
+ ir_node = require("citeproc.ir-node")
+ output = require("citeproc.output")
+ node_names = require("citeproc.node-names")
+ util = require("citeproc.util")
+end
-local Context = require("citeproc-context").Context
-local IrState = require("citeproc-context").IrState
-local Element = require("citeproc-element").Element
-local IrNode = require("citeproc-ir-node").IrNode
-local Rendered = require("citeproc-ir-node").Rendered
-local SeqIr = require("citeproc-ir-node").SeqIr
-local PlainText = require("citeproc-output").PlainText
-local DisamStringFormat = require("citeproc-output").DisamStringFormat
-local YearSuffix = require("citeproc-ir-node").YearSuffix
-local util = require("citeproc-util")
+local Context = context.Context
+local IrState = context.IrState
+local Element = element.Element
+local IrNode = ir_node.IrNode
+local Rendered = ir_node.Rendered
+local SeqIr = ir_node.SeqIr
+local PlainText = output.PlainText
+local DisamStringFormat = output.DisamStringFormat
+local YearSuffix = ir_node.YearSuffix
---@class Bibliography: Element
@@ -71,7 +91,7 @@ function Bibliography:from_node(node, style)
o:set_attribute(node, "subsequent-author-substitute")
o:set_attribute(node, "subsequent-author-substitute-rule")
- local name_inheritance = require("citeproc-node-names").Name:new()
+ local name_inheritance = node_names.Name:new()
for key, value in pairs(style.name_inheritance) do
if value ~= nil then
name_inheritance[key] = value
diff --git a/biblio/citation-style-language/citeproc-node-choose.lua b/biblio/citation-style-language/citeproc-node-choose.lua
index 4a9329c297..5e6f5993ff 100644
--- a/biblio/citation-style-language/citeproc-node-choose.lua
+++ b/biblio/citation-style-language/citeproc-node-choose.lua
@@ -6,9 +6,22 @@
local choose = {}
-local Element = require("citeproc-element").Element
-local SeqIr = require("citeproc-ir-node").SeqIr
-local util = require("citeproc-util")
+local element
+local ir_node
+local util
+
+if kpse then
+ element = require("citeproc-element")
+ ir_node = require("citeproc-ir-node")
+ util = require("citeproc-util")
+else
+ element = require("citeproc.element")
+ ir_node = require("citeproc.ir-node")
+ util = require("citeproc.util")
+end
+
+local Element = element.Element
+local SeqIr = ir_node.SeqIr
-- [Choose](https://docs.citationstyles.org/en/stable/specification.html#choose)
local Choose = Element:derive("choose")
diff --git a/biblio/citation-style-language/citeproc-node-citation.lua b/biblio/citation-style-language/citeproc-node-citation.lua
index aca01a7c93..7812c33a9b 100644
--- a/biblio/citation-style-language/citeproc-node-citation.lua
+++ b/biblio/citation-style-language/citeproc-node-citation.lua
@@ -1,4 +1,3 @@
-
--
-- Copyright (c) 2021-2023 Zeping Lee
-- Released under the MIT license.
@@ -7,23 +6,43 @@
local citation_module = {}
-local dom = require("luaxml-domobject")
-
-local Context = require("citeproc-context").Context
-local IrState = require("citeproc-context").IrState
-local Element = require("citeproc-element").Element
-local IrNode = require("citeproc-ir-node").IrNode
-local Rendered = require("citeproc-ir-node").Rendered
-local SeqIr = require("citeproc-ir-node").SeqIr
-local YearSuffix = require("citeproc-ir-node").YearSuffix
-local Micro = require("citeproc-output").Micro
-local Formatted = require("citeproc-output").Formatted
-local PlainText = require("citeproc-output").PlainText
-local InlineElement = require("citeproc-output").InlineElement
-local CiteInline = require("citeproc-output").CiteInline
-local DisamStringFormat = require("citeproc-output").DisamStringFormat
-local SortStringFormat = require("citeproc-output").SortStringFormat
-local util = require("citeproc-util")
+local context
+local element
+local ir_node
+local output
+local node_names
+local util
+
+if kpse then
+ context = require("citeproc-context")
+ element = require("citeproc-element")
+ ir_node = require("citeproc-ir-node")
+ output = require("citeproc-output")
+ node_names = require("citeproc-node-names")
+ util = require("citeproc-util")
+else
+ context = require("citeproc.context")
+ element = require("citeproc.element")
+ ir_node = require("citeproc.ir-node")
+ output = require("citeproc.output")
+ node_names = require("citeproc.node-names")
+ util = require("citeproc.util")
+end
+
+local Context = context.Context
+local IrState = context.IrState
+local Element = element.Element
+local IrNode = ir_node.IrNode
+local Rendered = ir_node.Rendered
+local SeqIr = ir_node.SeqIr
+local YearSuffix = ir_node.YearSuffix
+local Micro = output.Micro
+local Formatted = output.Formatted
+local PlainText = output.PlainText
+local InlineElement = output.InlineElement
+local CiteInline = output.CiteInline
+local DisamStringFormat = output.DisamStringFormat
+local SortStringFormat = output.SortStringFormat
---@class Citation: Element
@@ -95,7 +114,7 @@ function Citation:from_node(node, style)
-- Note Distance
o:set_number_attribute(node, "near-note-distance")
- local name_inheritance = require("citeproc-node-names").Name:new()
+ local name_inheritance = node_names.Name:new()
for key, value in pairs(style.name_inheritance) do
if value ~= nil then
name_inheritance[key] = value
diff --git a/biblio/citation-style-language/citeproc-node-date.lua b/biblio/citation-style-language/citeproc-node-date.lua
index 94d5365849..1e0f11d25e 100644
--- a/biblio/citation-style-language/citeproc-node-date.lua
+++ b/biblio/citation-style-language/citeproc-node-date.lua
@@ -6,12 +6,28 @@
local date_module = {}
-local Element = require("citeproc-element").Element
-local IrNode = require("citeproc-ir-node").IrNode
-local Rendered = require("citeproc-ir-node").Rendered
-local SeqIr = require("citeproc-ir-node").SeqIr
-local PlainText = require("citeproc-output").PlainText
-local util = require("citeproc-util")
+local element
+local ir_node
+local output
+local util
+
+if kpse then
+ element = require("citeproc-element")
+ ir_node = require("citeproc-ir-node")
+ output = require("citeproc-output")
+ util = require("citeproc-util")
+else
+ element = require("citeproc.element")
+ ir_node = require("citeproc.ir-node")
+ output = require("citeproc.output")
+ util = require("citeproc.util")
+end
+
+local Element = element.Element
+local IrNode = ir_node.IrNode
+local Rendered = ir_node.Rendered
+local SeqIr = ir_node.SeqIr
+local PlainText = output.PlainText
-- [Date](https://docs.citationstyles.org/en/stable/specification.html#date)
diff --git a/biblio/citation-style-language/citeproc-node-group.lua b/biblio/citation-style-language/citeproc-node-group.lua
index ecc638ee55..a89199128f 100644
--- a/biblio/citation-style-language/citeproc-node-group.lua
+++ b/biblio/citation-style-language/citeproc-node-group.lua
@@ -6,9 +6,22 @@
local group = {}
-local SeqIr = require("citeproc-ir-node").SeqIr
-local Element = require("citeproc-element").Element
-local util = require("citeproc-util")
+local element
+local ir_node
+local util
+
+if kpse then
+ element = require("citeproc-element")
+ ir_node = require("citeproc-ir-node")
+ util = require("citeproc-util")
+else
+ element = require("citeproc.element")
+ ir_node = require("citeproc.ir-node")
+ util = require("citeproc.util")
+end
+
+local SeqIr = ir_node.SeqIr
+local Element = element.Element
local Group = Element:derive("group")
diff --git a/biblio/citation-style-language/citeproc-node-label.lua b/biblio/citation-style-language/citeproc-node-label.lua
index 1861c99049..6f89bdb123 100644
--- a/biblio/citation-style-language/citeproc-node-label.lua
+++ b/biblio/citation-style-language/citeproc-node-label.lua
@@ -6,11 +6,27 @@
local label = {}
-local Element = require("citeproc-element").Element
-local IrNode = require("citeproc-ir-node").IrNode
-local Rendered = require("citeproc-ir-node").Rendered
-local PlainText = require("citeproc-output").PlainText
-local util = require("citeproc-util")
+local element
+local ir_node
+local output
+local util
+
+if kpse then
+ element = require("citeproc-element")
+ ir_node = require("citeproc-ir-node")
+ output = require("citeproc-output")
+ util = require("citeproc-util")
+else
+ element = require("citeproc.element")
+ ir_node = require("citeproc.ir-node")
+ output = require("citeproc.output")
+ util = require("citeproc.util")
+end
+
+local Element = element.Element
+local IrNode = ir_node.IrNode
+local Rendered = ir_node.Rendered
+local PlainText = output.PlainText
-- [Label](https://docs.citationstyles.org/en/stable/specification.html#label)
diff --git a/biblio/citation-style-language/citeproc-node-layout.lua b/biblio/citation-style-language/citeproc-node-layout.lua
index 4996ddd9f2..e6e9310be6 100644
--- a/biblio/citation-style-language/citeproc-node-layout.lua
+++ b/biblio/citation-style-language/citeproc-node-layout.lua
@@ -6,9 +6,22 @@
local layout = {}
-local Element = require("citeproc-element").Element
-local SeqIr = require("citeproc-ir-node").SeqIr
-local util = require("citeproc-util")
+local element
+local ir_node
+local util
+
+if kpse then
+ element = require("citeproc-element")
+ ir_node = require("citeproc-ir-node")
+ util = require("citeproc-util")
+else
+ element = require("citeproc.element")
+ ir_node = require("citeproc.ir-node")
+ util = require("citeproc.util")
+end
+
+local Element = element.Element
+local SeqIr = ir_node.SeqIr
---@class Layout: Element
diff --git a/biblio/citation-style-language/citeproc-node-locale.lua b/biblio/citation-style-language/citeproc-node-locale.lua
index 394785477f..99c32a878f 100644
--- a/biblio/citation-style-language/citeproc-node-locale.lua
+++ b/biblio/citation-style-language/citeproc-node-locale.lua
@@ -6,8 +6,18 @@
local locale = {}
-local Element = require("citeproc-element").Element
-local util = require("citeproc-util")
+local element
+local util
+
+if kpse then
+ element = require("citeproc-element")
+ util = require("citeproc-util")
+else
+ element = require("citeproc.element")
+ util = require("citeproc.util")
+end
+
+local Element = element.Element
local Locale = Element:derive("locale")
diff --git a/biblio/citation-style-language/citeproc-node-names.lua b/biblio/citation-style-language/citeproc-node-names.lua
index 385110c1e9..9b7fae2263 100644
--- a/biblio/citation-style-language/citeproc-node-names.lua
+++ b/biblio/citation-style-language/citeproc-node-names.lua
@@ -6,19 +6,36 @@
local names_module = {}
-local unicode = require("unicode")
+local unicode
+local element
+local ir_node
+local output
+local util
+
+if kpse then
+ unicode = require("citeproc-unicode")
+ element = require("citeproc-element")
+ ir_node = require("citeproc-ir-node")
+ output = require("citeproc-output")
+ util = require("citeproc-util")
+else
+ unicode = require("citeproc.unicode")
+ element = require("citeproc.element")
+ ir_node = require("citeproc.ir-node")
+ output = require("citeproc.output")
+ util = require("citeproc.util")
+end
-local IrNode = require("citeproc-ir-node").IrNode
-local NameIr = require("citeproc-ir-node").NameIr
-local PersonNameIr = require("citeproc-ir-node").PersonNameIr
-local SeqIr = require("citeproc-ir-node").SeqIr
-local Rendered = require("citeproc-ir-node").Rendered
-local InlineElement = require("citeproc-output").InlineElement
-local PlainText = require("citeproc-output").PlainText
-local SortStringFormat = require("citeproc-output").SortStringFormat
+local IrNode = ir_node.IrNode
+local NameIr = ir_node.NameIr
+local PersonNameIr = ir_node.PersonNameIr
+local SeqIr = ir_node.SeqIr
+local Rendered = ir_node.Rendered
+local InlineElement = output.InlineElement
+local PlainText = output.PlainText
+local SortStringFormat = output.SortStringFormat
-local Element = require("citeproc-element").Element
-local util = require("citeproc-util")
+local Element = element.Element
local Names = Element:derive("names")
@@ -869,7 +886,7 @@ function Name:initialize_name(given, with, initialize_with_hyphen)
local is_abbreviation = false
local first_letter = utf8.char(utf8.codepoint(name))
- if util.is_lower(first_letter) then
+ if unicode.islower(first_letter) then
is_particle = true
elseif #name == 1 then
is_abbreviation = true
@@ -890,14 +907,14 @@ function Name:initialize_name(given, with, initialize_with_hyphen)
name_list[i] = name .. with
else
if self.initialize then
- if util.is_upper(name) then
+ if unicode.isupper(name) then
name = first_letter
else
-- Long abbreviation: "TSerendorjiin" -> "Ts."
local abbreviation = ""
for _, c in utf8.codes(name) do
local char = utf8.char(c)
- local lower = unicode.utf8.lower(char)
+ local lower = unicode.lower(char)
if lower == char then
break
end
diff --git a/biblio/citation-style-language/citeproc-node-number.lua b/biblio/citation-style-language/citeproc-node-number.lua
index d96b3fe519..24b970edde 100644
--- a/biblio/citation-style-language/citeproc-node-number.lua
+++ b/biblio/citation-style-language/citeproc-node-number.lua
@@ -6,11 +6,22 @@
local number_module = {}
-local Element = require("citeproc-element").Element
+local element
+local ir_node
+local util
-local Rendered = require("citeproc-ir-node").Rendered
+if kpse then
+ element = require("citeproc-element")
+ ir_node = require("citeproc-ir-node")
+ util = require("citeproc-util")
+else
+ element = require("citeproc.element")
+ ir_node = require("citeproc.ir-node")
+ util = require("citeproc.util")
+end
-local util = require("citeproc-util")
+local Element = element.Element
+local Rendered = ir_node.Rendered
local Number = Element:derive("number")
diff --git a/biblio/citation-style-language/citeproc-node-sort.lua b/biblio/citation-style-language/citeproc-node-sort.lua
index 1cd53c22ef..04fe46c045 100644
--- a/biblio/citation-style-language/citeproc-node-sort.lua
+++ b/biblio/citation-style-language/citeproc-node-sort.lua
@@ -6,13 +6,36 @@
local sort = {}
-local unicode = require("unicode")
+local uca_languages
+local uca_ducet
+local uca_collator
+
+local element
+local output
+local util
+local node_date
+
+if kpse then
+ uca_languages = require("lua-uca-languages")
+ uca_ducet = require("lua-uca-ducet")
+ uca_collator = require("lua-uca-collator")
+ element = require("citeproc-element")
+ output = require("citeproc-output")
+ util = require("citeproc-util")
+ node_date = require("citeproc-node-date")
+else
+ uca_languages = require("citeproc.lua-uca.languages")
+ uca_ducet = require("citeproc.lua-uca.ducet")
+ uca_collator = require("citeproc.lua-uca.collator")
+ element = require("citeproc.element")
+ output = require("citeproc.output")
+ util = require("citeproc.util")
+ node_date = require("citeproc.node-date")
+end
-local Element = require("citeproc-element").Element
-local Date = require("citeproc-node-date").Date
-local names = require("citeproc-node-names")
-local InlineElement = require("citeproc-output").InlineElement
-local util = require("citeproc-util")
+local Element = element.Element
+local Date = node_date.Date
+local InlineElement = output.InlineElement
-- [Sorting](https://docs.citationstyles.org/en/stable/specification.html#sorting)
@@ -46,13 +69,8 @@ function Sort:sort(items, state, context)
if not Sort.collator then
local lang = context.engine.lang
local language = string.sub(lang, 1, 2)
- -- It's 6 seconds slower to run the whole test-suite if these package
- -- loading statements are put in the header.
- local uca_ducet = require("lua-uca.lua-uca-ducet")
- local uca_collator = require("lua-uca.lua-uca-collator")
Sort.collator = uca_collator.new(uca_ducet)
if language ~= "en" then
- local uca_languages = require("lua-uca.lua-uca-languages")
if uca_languages[language] then
Sort.collator = uca_languages[language](Sort.collator)
else
diff --git a/biblio/citation-style-language/citeproc-node-style.lua b/biblio/citation-style-language/citeproc-node-style.lua
index 6c8d184fda..2fbff54067 100644
--- a/biblio/citation-style-language/citeproc-node-style.lua
+++ b/biblio/citation-style-language/citeproc-node-style.lua
@@ -6,15 +6,35 @@
local style_module = {}
-local dom = require("luaxml-domobject")
+local dom
+local element
+local ir_node
+local output
+local node_names
+local util
+
+if kpse then
+ dom = require("luaxml-domobject")
+ element = require("citeproc-element")
+ ir_node = require("citeproc-ir-node")
+ output = require("citeproc-output")
+ node_names = require("citeproc-node-names")
+ util = require("citeproc-util")
+else
+ dom = require("citeproc.luaxml.domobject")
+ element = require("citeproc.element")
+ ir_node = require("citeproc.ir-node")
+ output = require("citeproc.output")
+ node_names = require("citeproc.node-names")
+ util = require("citeproc.util")
+end
-local Element = require("citeproc-element").Element
-local IrNode = require("citeproc-ir-node").IrNode
-local Rendered = require("citeproc-ir-node").Rendered
-local SeqIr = require("citeproc-ir-node").SeqIr
-local PlainText = require("citeproc-output").PlainText
-local DisamStringFormat = require("citeproc-output").DisamStringFormat
-local util = require("citeproc-util")
+local Element = element.Element
+local IrNode = ir_node.IrNode
+local Rendered = ir_node.Rendered
+local SeqIr = ir_node.SeqIr
+local PlainText = output.PlainText
+local DisamStringFormat = output.DisamStringFormat
local Style = Element:derive("style")
@@ -67,7 +87,7 @@ function Style:from_node(node)
-- Inheritable Name Options
-- https://docs.citationstyles.org/en/stable/specification.html#inheritable-name-options
- o.name_inheritance = require("citeproc-node-names").Name:new()
+ o.name_inheritance = node_names.Name:new()
Element.make_name_inheritance(o.name_inheritance, node)
if o.page_range_format == "chicago" then
diff --git a/biblio/citation-style-language/citeproc-node-text.lua b/biblio/citation-style-language/citeproc-node-text.lua
index b5c9ea61a6..e74ab3e4d9 100644
--- a/biblio/citation-style-language/citeproc-node-text.lua
+++ b/biblio/citation-style-language/citeproc-node-text.lua
@@ -6,12 +6,28 @@
local text_module = {}
-local Element = require("citeproc-element").Element
-local Rendered = require("citeproc-ir-node").Rendered
-local YearSuffix = require("citeproc-ir-node").YearSuffix
-local PlainText = require("citeproc-output").PlainText
-local Linked = require("citeproc-output").Linked
-local util = require("citeproc-util")
+local element
+local ir_node
+local output
+local util
+
+if kpse then
+ element = require("citeproc-element")
+ ir_node = require("citeproc-ir-node")
+ output = require("citeproc-output")
+ util = require("citeproc-util")
+else
+ element = require("citeproc.element")
+ ir_node = require("citeproc.ir-node")
+ output = require("citeproc.output")
+ util = require("citeproc.util")
+end
+
+local Element = element.Element
+local Rendered = ir_node.Rendered
+local YearSuffix = ir_node.YearSuffix
+local PlainText = output.PlainText
+local Linked = output.Linked
-- [Text](https://docs.citationstyles.org/en/stable/specification.html#text)
diff --git a/biblio/citation-style-language/citeproc-nodes.lua b/biblio/citation-style-language/citeproc-nodes.lua
index b1466eee90..fa7ead38e6 100644
--- a/biblio/citation-style-language/citeproc-nodes.lua
+++ b/biblio/citation-style-language/citeproc-nodes.lua
@@ -4,20 +4,49 @@
-- Repository: https://github.com/zepinglee/citeproc-lua
--
-local style = require("citeproc-node-style")
-local citation = require("citeproc-node-citation")
-local citation = require("citeproc-node-citation")
-local bibliography = require("citeproc-node-bibliography")
-local locale = require("citeproc-node-locale")
-local layout = require("citeproc-node-layout")
-local text = require("citeproc-node-text")
-local date = require("citeproc-node-date")
-local number = require("citeproc-node-number")
-local names = require("citeproc-node-names")
-local label = require("citeproc-node-label")
-local group = require("citeproc-node-group")
-local choose = require("citeproc-node-choose")
-local sort = require("citeproc-node-sort")
+local style
+local citation
+local bibliography
+local locale
+local layout
+local text
+local date
+local number
+local names
+local label
+local group
+local choose
+local sort
+
+if kpse then
+ style = require("citeproc-node-style")
+ citation = require("citeproc-node-citation")
+ bibliography = require("citeproc-node-bibliography")
+ locale = require("citeproc-node-locale")
+ layout = require("citeproc-node-layout")
+ text = require("citeproc-node-text")
+ date = require("citeproc-node-date")
+ number = require("citeproc-node-number")
+ names = require("citeproc-node-names")
+ label = require("citeproc-node-label")
+ group = require("citeproc-node-group")
+ choose = require("citeproc-node-choose")
+ sort = require("citeproc-node-sort")
+else
+ style = require("citeproc.node-style")
+ citation = require("citeproc.node-citation")
+ bibliography = require("citeproc.node-bibliography")
+ locale = require("citeproc.node-locale")
+ layout = require("citeproc.node-layout")
+ text = require("citeproc.node-text")
+ date = require("citeproc.node-date")
+ number = require("citeproc.node-number")
+ names = require("citeproc.node-names")
+ label = require("citeproc.node-label")
+ group = require("citeproc.node-group")
+ choose = require("citeproc.node-choose")
+ sort = require("citeproc.node-sort")
+end
local nodes = {
["style"] = style.Style,
diff --git a/biblio/citation-style-language/citeproc-output.lua b/biblio/citation-style-language/citeproc-output.lua
index b162328e66..aa1a733c3e 100644
--- a/biblio/citation-style-language/citeproc-output.lua
+++ b/biblio/citation-style-language/citeproc-output.lua
@@ -6,11 +6,22 @@
local output_module = {}
-local unicode = require("unicode")
-local citeproc_unicode = require("citeproc-unicode")
-local dom = require("luaxml-domobject")
+local uni_utf8
+local unicode
+local dom
+local util
-local util = require("citeproc-util")
+if kpse then
+ uni_utf8 = require("unicode").utf8
+ unicode = require("citeproc-unicode")
+ dom = require("luaxml-domobject")
+ util = require("citeproc-util")
+else
+ uni_utf8 = require("lua-utf8")
+ unicode = require("citeproc.unicode")
+ dom = require("citeproc.luaxml.domobject")
+ util = require("citeproc.util")
+end
local LocalizedQuotes = {
@@ -609,7 +620,7 @@ end
function InlineElement:capitalize_first_term()
-- util.debug(self)
if self._type == "PlainText" then
- self.value = util.capitalize(self.value)
+ self.value = unicode.capitalize(self.value)
elseif self._type ~= "Code" and self._type ~= "MathML" and self._type ~= "MathTeX" then
if self.inlines[1] then
self.inlines[1]:capitalize_first_term()
@@ -728,9 +739,9 @@ end
---@param str string
---@return boolean
local function is_str_sentence_case(str)
- local words = citeproc_unicode.words(str)
+ local words = unicode.words(str)
for _, word in ipairs(words) do
- if util.is_lower(word) and not util.stop_words[word] then
+ if unicode.islower(word) and not util.stop_words[word] then
-- util.debug(word)
return true
end
@@ -851,12 +862,12 @@ function OutputFormat:apply_text_case_inner(inlines, text_case, seen_one, is_upp
end
local function transform_lowercase(str)
- return string.gsub(str, utf8.charpattern, unicode.utf8.lower)
+ return unicode.lower(str)
end
local function transform_uppercase(str)
-- TODO: locale specific uppercase: textcase_LocaleUnicode.txt
- return string.gsub(str, utf8.charpattern, unicode.utf8.upper)
+ return unicode.upper(str)
end
---comment
@@ -866,9 +877,11 @@ end
---@return string
local function transform_first_word(str, is_first, transform)
if is_first then
- local segments = citeproc_unicode.split_word_bounds(str)
+ local segments = unicode.split_word_bounds(str)
for i, segment in ipairs(segments) do
- if citeproc_unicode.isalnum(segment) then
+ -- bugreports_ThesisUniversityAppearsTwice.txt: "Ph.D"
+ if uni_utf8.match(segment, "%a") then
+ -- util.debug(segment)
segments[i] = transform(segment)
break
end
@@ -894,7 +907,7 @@ local SegmentType = {
---@param transform function
---@return string
local function transform_each_word(str, seen_one, is_last_inline, transform)
- local segments = citeproc_unicode.split_word_bounds(str)
+ local segments = unicode.split_word_bounds(str)
-- util.debug(segments)
local segment_type_list = {}
@@ -903,11 +916,11 @@ local function transform_each_word(str, seen_one, is_last_inline, transform)
segment_type_list[i] = SegmentType.Other
-- Do not use isalnum(): "can't"
- if unicode.grapheme.match(segment, "%w") then
+ if uni_utf8.match(segment, "%w") then
segment_type_list[i] = SegmentType.Word
last_word_idx = i
- elseif unicode.grapheme.match(segment, "%p") then
+ elseif uni_utf8.match(segment, "%p") then
segment_type_list[i] = SegmentType.Puctuation
if segment == "!" or segment == "?" then
segment_type_list[i] = SegmentType.EndingPunctuation
@@ -934,7 +947,7 @@ local function transform_each_word(str, seen_one, is_last_inline, transform)
-- util.debug(segment)
-- util.debug(after_colon)
-- See "07-x" in `textcase_LastChar.txt`
- if not (segments[i-1] == "-" and unicode.grapheme.len(segment) == 1) then
+ if not (segments[i-1] == "-" and unicode.len(segment) == 1) then
segments[i] = transform(segment, is_first_word, after_colon, is_last_word, ignore_stop_word)
end
@@ -958,8 +971,8 @@ end
---@param word string
---@return string
local function transform_capitalize_word_if_lower(word)
- if citeproc_unicode.islower(word) then
- local res = string.gsub(word, utf8.charpattern, unicode.utf8.upper, 1)
+ if unicode.islower(word) then
+ local res = unicode.capitalize(word)
return res
else
return word
@@ -973,18 +986,19 @@ local function title_case_word(word, is_first, after_end_punct, is_last, ignore_
-- util.debug(word)
-- util.debug(ignore_stop_word)
if (is_first or is_last or after_end_punct or ignore_stop_word or not util.stop_words[word])
- and string.match(word, "%a") and citeproc_unicode.islower(word) then
- return citeproc_unicode.capitalize(word)
+ and string.match(word, "%a") and unicode.islower(word) then
+ return unicode.capitalize(word)
else
return word
end
end
local function transform_lowercase_if_capitalize(word, is_first, after_end_punct, is_last, is_stop_word)
+ -- util.debug(word)
if not (is_first or after_end_punct) then
local is_capitalize_word = false
- local lower_first = string.gsub(word, utf8.charpattern, unicode.utf8.lower, 1)
- if util.is_lower(lower_first) then
+ local lower_first = string.gsub(word, utf8.charpattern, unicode.lower, 1)
+ if unicode.islower(lower_first) then
return lower_first
else
return word
@@ -1560,7 +1574,7 @@ local LatexWriter = Markup:new()
LatexWriter.markups = {
["bibstart"] = function (engine)
- return string.format("\\begin{thebibliography}{%s}\n", engine.registry.longest_label)
+ return string.format("\\begin{thebibliography}{%s}\n", engine.registry.widest_label)
end,
["bibend"] = "\\end{thebibliography}",
["@font-style/normal"] = "{\\normalshape %s}",
@@ -1633,7 +1647,7 @@ function LatexWriter:write_display(inline, context)
local len = utf8.len(str)
if len > context.engine.registry.maxoffset then
context.engine.registry.maxoffset = len
- context.engine.registry.longest_label = str
+ context.engine.registry.widest_label = str
end
end
@@ -1741,10 +1755,11 @@ function HtmlWriter:write_display(inline, context)
if inline.div == "left-margin" then
local plainter_text_writer = output_module.PlainTextWriter:new()
local str = plainter_text_writer:write_inline(inline, context)
+ --TODO: width of CJK characters
local len = utf8.len(str)
if len > context.engine.registry.maxoffset then
context.engine.registry.maxoffset = len
- context.engine.registry.longest_label = str
+ context.engine.registry.widest_label = str
end
end
diff --git a/biblio/citation-style-language/citeproc-unicode.lua b/biblio/citation-style-language/citeproc-unicode.lua
index 530206ae3f..2aa12b29bf 100644
--- a/biblio/citation-style-language/citeproc-unicode.lua
+++ b/biblio/citation-style-language/citeproc-unicode.lua
@@ -6,14 +6,36 @@
local unicode = {}
-local sln = require("unicode")
-local uni_case = require("lua-uni-case")
-local uni_words = nil
-if kpse.find_file("lua-uni-words", "lua") then
- uni_words = require("lua-uni-words")
+local uni_utf8
+local uni_algos_words
+local uni_algos_case
+local util
+
+if kpse then
+ -- Load `slnunicode` if in LuaTeX
+ uni_utf8 = require("unicode").utf8
+ if kpse.find_file("lua-uni-words", "lua") then
+ uni_algos_words = require("lua-uni-words")
+ end
+ uni_algos_case = require("lua-uni-case")
+ util = require("citeproc-util")
+else
+ uni_utf8 = require("lua-utf8")
+ if not utf8 then
+ -- Lua < 5.3
+ utf8 = uni_utf8
+ end
+ uni_algos_words = require("citeproc.lua-uni-algos.words")
+ uni_algos_case = require("citeproc.lua-uni-algos.case")
+ util = require("citeproc.util")
end
-local util = require("citeproc-util")
+
+---@param str any
+---@return integer
+function unicode.len(str)
+ return uni_utf8.len(str)
+end
---Return a copy of the string with its first character capitalized and the rest lowercased.
@@ -26,7 +48,7 @@ function unicode.capitalize(str, locale)
end
-- TODO: locale and unicode titlecase Lt
str = unicode.lower(str, locale)
- str = sln.grapheme.gsub(str, ".", sln.grapheme.upper, 1)
+ str = uni_utf8.gsub(str, ".", uni_utf8.upper, 1)
return str
end
@@ -43,7 +65,7 @@ function unicode.casefold(str, locale)
if locale and string.match(locale, "^tr") then
enable_special = true
end
- return uni_case.casefold(str, true, enable_special)
+ return uni_algos_case.casefold(str, true, enable_special)
end
@@ -54,7 +76,7 @@ function unicode.isalnum(str)
if type(str) ~= "string" then
error(string.format("bad argument #1 to 'isalnum' (string expected, got %s)", type(str)))
end
- return sln.grapheme.match(str, "^%w+$") ~= nil
+ return uni_utf8.match(str, "^%w+$") ~= nil
end
@@ -65,7 +87,7 @@ function unicode.isalpha(str)
if type(str) ~= "string" then
error(string.format("bad argument #1 to 'isalpha' (string expected, got %s)", type(str)))
end
- return sln.grapheme.match(str, "^%a+$") ~= nil
+ return uni_utf8.match(str, "^%a+$") ~= nil
end
@@ -99,7 +121,7 @@ function unicode.islower(str)
error(string.format("bad argument #1 to 'islower' (string expected, got %s)", type(str)))
end
--TODO: No titlecased letters
- return sln.grapheme.find(str, "%l") and not sln.grapheme.find(str, "%u")
+ return uni_utf8.find(str, "%l") and not uni_utf8.find(str, "%u")
end
@@ -114,6 +136,16 @@ function unicode.isnumeric(str)
end
+---@param str string
+---@return boolean
+function unicode.ispunct(str)
+ if type(str) ~= "string" then
+ error(string.format("bad argument #1 to 'isnumeric' (string expected, got %s)", type(str)))
+ end
+ return uni_utf8.match(str, "^%p+$") ~= nil
+end
+
+
-- ---Return True if the string is a titlecased string and there is at least one character, for example uppercase characters may only follow uncased characters and lowercase characters only cased ones. Return False otherwise.
-- ---@param str string
-- ---@return boolean
@@ -134,7 +166,7 @@ function unicode.isupper(str)
error(string.format("bad argument #1 to 'isupper' (string expected, got %s)", type(str)))
end
--TODO: No titlecased letters
- return sln.grapheme.find(str, "%u") and not sln.grapheme.find(str, "%l")
+ return uni_utf8.find(str, "%u") and not uni_utf8.find(str, "%l")
end
@@ -147,7 +179,7 @@ function unicode.lower(str, locale)
error(string.format("bad argument #1 to 'lower' (string expected, got %s)", type(str)))
end
-- TODO: locale
- return sln.grapheme.lower(str)
+ return uni_utf8.lower(str)
end
@@ -172,7 +204,7 @@ function unicode.upper(str, locale)
error(string.format("bad argument #1 to 'upper' (string expected, got %s)", type(str)))
end
-- TODO: locale
- return sln.grapheme.lower(str)
+ return uni_utf8.upper(str)
end
@@ -189,8 +221,8 @@ local CharState = {
---@return string[]
function unicode.words(str)
local words = {}
- if uni_words then
- for _, _, segment in uni_words.word_boundaries(str) do
+ if uni_algos_words then
+ for _, _, segment in uni_algos_words.word_boundaries(str) do
if unicode.isalnum(segment) then
table.insert(words, segment)
end
@@ -200,9 +232,9 @@ function unicode.words(str)
-- A naive implementation
local state = CharState.Other
local last_idx = 1
- for idx, char in sln.grapheme.gmatch(str, "()(.)") do
+ for idx, char in uni_utf8.gmatch(str, "()(.)") do
local new_state = CharState.Other
- if sln.grapheme.match(char, "%w") or char == "'" or char == "’" or char == "`" then
+ if uni_utf8.match(char, "%w") or char == "'" or char == "’" or char == "`" then
new_state = CharState.Word
else
new_state = CharState.Other
@@ -231,39 +263,56 @@ end
---@param str string
---@return string[]
function unicode.split_word_bounds(str)
+ -- util.debug(str)
local segments = {}
- if uni_words then
- for _, _, segment in uni_words.word_boundaries(str) do
+ if uni_algos_words then
+ for _, _, segment in uni_algos_words.word_boundaries(str) do
table.insert(segments, segment)
end
+ -- textcase_NoSpaceBeforeApostrophe.txt: "Marcus Shafi`" -> ["Marcus" "Shafi`"]
+ for i = #segments, 1, -1 do
+ local segment = segments[i]
+ if segment == "`" then
+ if i < #segments and not uni_utf8.match(segments[i+1], "^%s") then
+ segments[i] = segment .. segments[i+1]
+ table.remove(segments, i+1)
+ end
+ if i > 1 and not uni_utf8.match(segments[i-1], "%s") then
+ segments[i-1] = segments[i-1] .. segments[i]
+ table.remove(segments, i)
+ end
+ end
+ end
+ -- util.debug(segments)
else
-- A naive implementation
local state = CharState.Other
- local last_idx = 1
- for idx, char in sln.grapheme.gmatch(str, "()(.)") do
+ local segment = ""
+ for idx, code_point in utf8.codes(str) do
+ local char = utf8.char(code_point)
local new_state = CharState.Other
- if sln.grapheme.match(char, "%w") or char == "'" or char == "’" or char == "`" then
+ if uni_utf8.match(char, "%w") or char == "'" or char == "’" or char == "`" then
new_state = CharState.Word
- elseif sln.grapheme.match(char, "%p") then
+ elseif uni_utf8.match(char, "%p") then
new_state = CharState.Punctuation
- elseif sln.grapheme.match(char, "%s") then
+ elseif uni_utf8.match(char, "%s") then
new_state = CharState.Space
else
new_state = CharState.Other
end
if new_state ~= state then
- if idx > 1 then
- local segment = string.sub(str, last_idx, idx - 1)
+ if segment ~= "" then
table.insert(segments, segment)
+ segment = ""
end
state = new_state
- last_idx = idx
end
+ segment = segment .. char
end
- local segment = string.sub(str, last_idx, #str)
table.insert(segments, segment)
+ -- util.debug(segments)
end
return segments
diff --git a/biblio/citation-style-language/citeproc-util.lua b/biblio/citation-style-language/citeproc-util.lua
index 92fc1d49d7..8cd00159f6 100644
--- a/biblio/citation-style-language/citeproc-util.lua
+++ b/biblio/citation-style-language/citeproc-util.lua
@@ -6,8 +6,14 @@
local util = {}
--- load `slnunicode` from LuaTeX
-local unicode = require("unicode")
+local uni_utf8
+if kpse then
+ uni_utf8 = require("unicode").utf8
+else
+ uni_utf8 = require("lua-utf8")
+end
+
+
local inspect -- only load it when debugging
local journal_data = nil -- load as needed
@@ -80,6 +86,25 @@ function util.to_list(str)
return util.split(str)
end
+
+--- Concat with CJK or western colon
+---@param main_title string
+---@param substitle string
+function util.join_title(main_title, substitle)
+ local code_point = utf8.codepoint(main_title, utf8.len(main_title))
+ if util.is_cjk_char(code_point) then
+ return main_title .. ":" .. substitle
+ else
+ code_point = utf8.codepoint(substitle, 1)
+ if util.is_cjk_char(code_point) then
+ return main_title .. ":" .. substitle
+ else
+ return main_title .. ": " .. substitle
+ end
+ end
+end
+
+
function util.to_ordinal (n)
-- assert(type(n) == "number")
local last_digit = n % 10
@@ -151,6 +176,11 @@ function util.debug(obj)
end
-- Similar to re.split() in Python
+---comment
+---@param str string
+---@param sep string?
+---@param maxsplit integer?
+---@return string[]
function util.split(str, sep, maxsplit)
if type(str) ~= "string" then
util.error("Invalid string.")
@@ -318,10 +348,6 @@ function util.endswith(str, suffix)
return string.sub(str, -#suffix) == suffix
end
-function util.is_punct(str)
- return string.match(str, "^%p$")
-end
-
function util.is_numeric (str)
if str == nil or str == "" then
return false
@@ -551,51 +577,6 @@ util.word_boundaries = {
}
--- Text-case
-
---- Return True if all cased characters in the string are lowercase and there
---- is at least one cased character, False otherwise.
----@param str string
----@return boolean
-function util.is_lower(str)
- if not str then
- print(debug.traceback())
- end
- return unicode.utf8.lower(str) == str and unicode.utf8.upper(str) ~= str
-end
-
---- Return True if all cased characters in the string are uppercase and there
---- is at least one cased character, False otherwise.
----@param str string
----@return boolean
-function util.is_upper(str)
- return unicode.utf8.upper(str) == str and unicode.utf8.lower(str) ~= str
-end
-
-function util.capitalize(str)
- -- if not str then
- -- print(debug.traceback())
- -- end
- local res = string.gsub(str, utf8.charpattern, unicode.utf8.upper, 1)
- return res
-end
-
-function util.sentence (str)
- if util.is_upper(str) then
- return util.capitalize(str)
- else
- local output = {}
- for i, word in ipairs(util.split(str)) do
- if i == 1 and util.is_lower(word) then
- table.insert(output, util.capitalize(word))
- else
- table.insert(output, word)
- end
- end
- return table.concat(output, " ")
- end
-end
-
-- TODO: process multiple words
util.stop_words = {
["a"] = true,
@@ -717,23 +698,6 @@ util.stop_words = {
["yet"] = true,
}
-function util.title (str)
- local output = {}
- local previous = ":"
- for i, word in ipairs(util.split(str)) do
- local lower = unicode.utf8.lower(word)
- if previous ~= ":" and util.stop_words[string.match(lower, "%w+")] then
- table.insert(output, lower)
- elseif util.is_lower(word) or util.is_upper(word) then
- table.insert(output, util.capitalize(word))
- else
- table.insert(output, word)
- end
- end
- local res = table.concat(output, " ")
- return res
-end
-
function util.all (t)
for _, item in ipairs(t) do
if not item then
@@ -862,6 +826,57 @@ function util.has_cjk_char(s)
return false
end
+
+---@param ordinal string
+---@return string
+function util.convert_ordinal_to_arabic(ordinal)
+ -- "1st", "2nd"
+ local numeral, suffix = string.match(ordinal, "^(%d+)(%a+)$")
+ if numeral then
+ return numeral
+ end
+ local arabic = util.ordinal_to_arabic_map[string.lower(ordinal)]
+ if arabic then
+ return arabic
+ else
+ return ordinal
+ end
+end
+
+util.ordinal_to_arabic_map = {
+ first = "1",
+ second = "2",
+ third = "3",
+ fourth = "4",
+ fifth = "5",
+ sixth = "6",
+ seventh = "7",
+ eighth = "8",
+ ninth = "9",
+ tenth = "10",
+ eleventh = "11",
+ twelfth = "12",
+ thirteenth = "13",
+ fourteenth = "14",
+ fifteenth = "15",
+ sixteenth = "16",
+ seventeenth = "17",
+ eighteenth = "18",
+ nineteenth = "19",
+ twentieth = "20",
+ ["twenty-first"] = "21",
+ ["twenty-second"] = "22",
+ ["twenty-third"] = "23",
+ ["twenty-fourth"] = "24",
+ ["twenty-fifth"] = "25",
+ ["twenty-sixth"] = "26",
+ ["twenty-seventh"] = "27",
+ ["twenty-eighth"] = "28",
+ ["twenty-ninth"] = "29",
+ thirtieth = "30",
+}
+
+
function util.convert_roman (number)
-- assert(type(number) == "number")
local output = {}
@@ -1013,21 +1028,46 @@ util.superscripts = {
-- File IO
+function util.remove_bom(text)
+ if type(text) == "string" then
+ return string.gsub(text, "^\xEF\xBB\xBF", "")
+ else
+ return text
+ end
+end
+
+
+---@param path string
+---@return string?
function util.read_file(path)
- -- if not path then
- -- print(debug.traceback())
- -- end
+ if type(path) ~= "string" then
+ error("Invalid path.")
+ end
local file = io.open(path, "r")
if not file then
- -- util.error(string.format('Cannot read file "%s".', path))
+ util.error(string.format('Cannot open file "%s".', path))
return nil
end
local content = file:read("*a")
+ content = util.remove_bom(content)
file:close()
return content
end
+---@param text string
+---@param path string
+function util.write_file(text, path)
+ local file = io.open(path, "w")
+ if not file then
+ util.error(string.format('Cannot write to file "%s".', path))
+ return
+ end
+ file:write(text)
+ file:close()
+end
+
+
function util.parse_iso_date(str)
local date
local date_parts = util.split(str, "/")
@@ -1062,9 +1102,13 @@ end
function util.check_journal_abbreviations(item)
if item["container-title"] and not item["container-title-short"] then
if not journal_data then
- journal_data = require("citeproc-journal-data")
+ if kpse then
+ journal_data = require("citeproc-journal-data")
+ else
+ journal_data = require("citeproc.journal-data")
+ end
end
- local key = unicode.utf8.upper(string.gsub(item["container-title"], "%.", ""))
+ local key = uni_utf8.upper(string.gsub(item["container-title"], "%.", ""))
local full = journal_data.unabbrevs[key]
if full then
item["container-title-short"] = item["container-title"]
diff --git a/biblio/citation-style-language/citeproc.lua b/biblio/citation-style-language/citeproc.lua
index 9f93901382..aa5870d7a0 100644
--- a/biblio/citation-style-language/citeproc.lua
+++ b/biblio/citation-style-language/citeproc.lua
@@ -6,10 +6,17 @@
local citeproc = {}
-local engine = require("citeproc-engine")
-local util = require("citeproc-util")
+local engine
+local util
+if kpse then
+ engine = require("citeproc-engine")
+ util = require("citeproc-util")
+else
+ engine = require("citeproc.engine")
+ util = require("citeproc.util")
+end
-citeproc.__VERSION__ = "0.4.0"
+citeproc.__VERSION__ = "0.4.1"
citeproc.new = engine.CiteProc.new
citeproc.util = util
diff --git a/biblio/ctan-bibdata/ctan.bib b/biblio/ctan-bibdata/ctan.bib
index 9723f98b25..e56b507504 100644
--- a/biblio/ctan-bibdata/ctan.bib
+++ b/biblio/ctan-bibdata/ctan.bib
@@ -1,7 +1,7 @@
%% bib file of all CTAN packages
%% (C) Herbert Voß
%%
-%% created at 13-04-2023, 02:00:09
+%% created at 14-04-2023, 02:00:12
%%
%% This file is provided under the terms of the LPPL v1.3 or
@@ -12520,8 +12520,8 @@
title = {The \texttt{citation-style-language} package},
subtitle = {Bibliography formatting with Citation Style Language},
author = {Zeping Lee},
- date = {2023-04-03},
- version = {0.4.0},
+ date = {2023-04-13},
+ version = {0.4.1},
license = {mit,cc-by-sa-3},
mirror = {https://mirror.ctan.org/biblio/citation-style-language},
url = {https://ctan.org/pkg/citation-style-language},
@@ -12850,7 +12850,7 @@
title = {The \texttt{cleveref-usedon} package},
subtitle = {Adds forward-referencing functionality to the cleveref package},
author = {Sven Pistre},
- date = {2023-04-12},
+ date = {2023-04-13},
version = {0.2.0},
license = {lppl1.3},
mirror = {https://mirror.ctan.org/macros/latex/contrib/cleveref-usedon},
@@ -40875,8 +40875,8 @@
title = {The \texttt{lua-typo} package},
subtitle = {Highlighting typographical flaws with LuaLaTeX},
author = {Daniel Flipo},
- date = {2023-03-09},
- version = {0.65},
+ date = {2023-04-13},
+ version = {0.70},
license = {lppl1.3c},
mirror = {https://mirror.ctan.org/macros/luatex/latex/lua-typo},
url = {https://ctan.org/pkg/lua-typo},
@@ -62138,8 +62138,8 @@
title = {The \texttt{siunitx} package},
subtitle = {A comprehensive (SI) units package},
author = {Joseph Wright},
- date = {2023-04-04},
- version = {3.2.4},
+ date = {2023-04-13},
+ version = {3.2.5},
license = {lppl1.3c},
mirror = {https://mirror.ctan.org/macros/latex/contrib/siunitx},
url = {https://ctan.org/pkg/siunitx},
diff --git a/biblio/ctan-bibdata/ctan.pdf b/biblio/ctan-bibdata/ctan.pdf
index 4131c9938a..e7f02c19c0 100644
--- a/biblio/ctan-bibdata/ctan.pdf
+++ b/biblio/ctan-bibdata/ctan.pdf
Binary files differ
diff --git a/macros/latex/contrib/siunitx/CHANGELOG.md b/macros/latex/contrib/siunitx/CHANGELOG.md
index 49a16c2766..8f8d0a1972 100644
--- a/macros/latex/contrib/siunitx/CHANGELOG.md
+++ b/macros/latex/contrib/siunitx/CHANGELOG.md
@@ -7,12 +7,18 @@ Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
## [Unreleased]
-## [v3.2.4] - 2023-04-04
+## [v3.2.5] - 2023-04-13
+### Fixed
+- Use of `\mathsf` for sanserif text documents (see issues
+ [\#655](https://github.com/josephwright/siunitx/issues/655))
+
+## [v3.2.4] - 2023-04-04
### Fixed
- Parsing of 'full' uncertainty parts with leading zeros (see issues
[\#652](https://github.com/josephwright/siunitx/issues/652))
+
## [v3.2.3] - 2023-03-14
### Fixed
@@ -1888,7 +1894,8 @@ Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
### Added
- First public testing release (as `si`)
-[Unreleased]: https://github.com/josephwright/siunitx/compare/v3.2.4...HEAD
+[Unreleased]: https://github.com/josephwright/siunitx/compare/v3.2.5...HEAD
+[v3.2.5]: https://github.com/josephwright/siunitx/compare/v3.2.4...v3.2.5
[v3.2.4]: https://github.com/josephwright/siunitx/compare/v3.2.3...v3.2.4
[v3.2.3]: https://github.com/josephwright/siunitx/compare/v3.2.2...v3.2.3
[v3.2.2]: https://github.com/josephwright/siunitx/compare/v3.2.1...v3.2.2
diff --git a/macros/latex/contrib/siunitx/siunitx-code.pdf b/macros/latex/contrib/siunitx/siunitx-code.pdf
index 3fa73c2087..e757f4d116 100644
--- a/macros/latex/contrib/siunitx/siunitx-code.pdf
+++ b/macros/latex/contrib/siunitx/siunitx-code.pdf
Binary files differ
diff --git a/macros/latex/contrib/siunitx/siunitx-unit.dtx b/macros/latex/contrib/siunitx/siunitx-unit.dtx
index eccc0349bb..398eb7187e 100644
--- a/macros/latex/contrib/siunitx/siunitx-unit.dtx
+++ b/macros/latex/contrib/siunitx/siunitx-unit.dtx
@@ -2975,14 +2975,18 @@
}
% \end{macrocode}
%
-% Cover the case where the default font is sanserif.
+% Cover the case where the default font is sanserif with \pkg{beamer}.
% \begin{macrocode}
\AtBeginDocument
{
- \str_if_eq:eeT
- { \exp_not:o { \familydefault } }
- { \exp_not:n { \sfdefault } }
- { \keys_set:nn { siunitx } { unit-font-command = \mathsf } }
+ \@ifclassloaded { beamer }
+ {
+ \str_if_eq:eeT
+ { \exp_not:o { \familydefault } }
+ { \exp_not:n { \sfdefault } }
+ { \keys_set:nn { siunitx } { unit-font-command = \mathsf } }
+ }
+ { }
}
% \end{macrocode}
%
diff --git a/macros/latex/contrib/siunitx/siunitx.dtx b/macros/latex/contrib/siunitx/siunitx.dtx
index 78b5ffa776..84e10ad678 100644
--- a/macros/latex/contrib/siunitx/siunitx.dtx
+++ b/macros/latex/contrib/siunitx/siunitx.dtx
@@ -122,7 +122,7 @@
%
% Identify the package and give the over all version information.
% \begin{macrocode}
-\ProvidesExplPackage {siunitx} {2023-04-04} {3.2.4}
+\ProvidesExplPackage {siunitx} {2023-04-13} {3.2.5}
{A comprehensive (SI) units package}
% \end{macrocode}
%
diff --git a/macros/latex/contrib/siunitx/siunitx.pdf b/macros/latex/contrib/siunitx/siunitx.pdf
index bdff52cf3b..71c7720642 100644
--- a/macros/latex/contrib/siunitx/siunitx.pdf
+++ b/macros/latex/contrib/siunitx/siunitx.pdf
Binary files differ
diff --git a/macros/luatex/latex/lua-typo/README.md b/macros/luatex/latex/lua-typo/README.md
index 9577fee1cf..82c1c9b0c4 100644
--- a/macros/luatex/latex/lua-typo/README.md
+++ b/macros/luatex/latex/lua-typo/README.md
@@ -88,6 +88,10 @@ Changes
on top of next page.
- code cleaning.
+* v.0.70:
+ - Options handled via `ltkeys` instead of `kvoptions`.
+ - code cleaning, bug fixes.
+
--
Copyright 2020--2023 Daniel Flipo
E-mail: daniel (dot) flipo (at) free (dot) fr
diff --git a/macros/luatex/latex/lua-typo/doc/lua-typo-demo.pdf b/macros/luatex/latex/lua-typo/doc/lua-typo-demo.pdf
index 35fe6bc907..a7b1d9a40f 100644
--- a/macros/luatex/latex/lua-typo/doc/lua-typo-demo.pdf
+++ b/macros/luatex/latex/lua-typo/doc/lua-typo-demo.pdf
Binary files differ
diff --git a/macros/luatex/latex/lua-typo/doc/lua-typo-fr.pdf b/macros/luatex/latex/lua-typo/doc/lua-typo-fr.pdf
index ed50a38d11..cd64bdaf45 100644
--- a/macros/luatex/latex/lua-typo/doc/lua-typo-fr.pdf
+++ b/macros/luatex/latex/lua-typo/doc/lua-typo-fr.pdf
Binary files differ
diff --git a/macros/luatex/latex/lua-typo/doc/lua-typo.pdf b/macros/luatex/latex/lua-typo/doc/lua-typo.pdf
index 6990971202..537414c80d 100644
--- a/macros/luatex/latex/lua-typo/doc/lua-typo.pdf
+++ b/macros/luatex/latex/lua-typo/doc/lua-typo.pdf
Binary files differ
diff --git a/macros/luatex/latex/lua-typo/lua-typo-2023-03-08.sty b/macros/luatex/latex/lua-typo/lua-typo-2023-03-08.sty
new file mode 100644
index 0000000000..aa876b82fa
--- /dev/null
+++ b/macros/luatex/latex/lua-typo/lua-typo-2023-03-08.sty
@@ -0,0 +1,1345 @@
+%%
+%% This is file `lua-typo.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lua-typo.dtx (with options: `sty')
+%%
+%% IMPORTANT NOTICE:
+%% For the copyright see the source file `lua-typo.dtx’.
+%%
+\NeedsTeXFormat{LaTeX2e}[2021/06/01]
+\ProvidesPackage{lua-typo}
+ [2023-03-08 v.0.65 Daniel Flipo]
+\ifdefined\DeclareRelease
+ \DeclareRelease{v0.4}{2021-01-01}{lua-typo-2021-04-18.sty}
+ \DeclareCurrentRelease{}{2023-03-08}
+\else
+ \PackageWarning{lua-typo}{Your LaTeX kernel is too old to provide
+ access\MessageBreak to former versions of the lua-typo package.%
+ \MessageBreak Anyway, lua-typo requires a LaTeX kernel dated%
+ \MessageBreak 2020-01-01 or newer; reported}
+\fi
+\NeedsTeXFormat{LaTeX2e}[2021/06/01]
+\ifdefined\directlua
+ \RequirePackage{luatexbase,luacode,luacolor}
+ \RequirePackage{kvoptions,atveryend}
+\else
+ \PackageError{This package is meant for LuaTeX only! Aborting}
+ {No more information available, sorry!}
+\fi
+\newdimen\luatypoLLminWD
+\newdimen\luatypoBackPI
+\newdimen\luatypoBackFuzz
+\newcount\luatypoStretchMax
+\newcount\luatypoHyphMax
+\newcount\luatypoPageMin
+\newcount\luatypoMinFull
+\newcount\luatypoMinPart
+\newcount\luatypoMinLen
+\newcount\luatypo@LANGno
+\newcount\luatypo@options
+\newtoks\luatypo@single
+\newtoks\luatypo@double
+\begin{luacode}
+luatypo = { }
+\end{luacode}
+\SetupKeyvalOptions{
+ family=luatypo,
+ prefix=LT@,
+}
+\DeclareBoolOption[false]{ShowOptions}
+\DeclareBoolOption[false]{None}
+\DeclareBoolOption[false]{All}
+\DeclareBoolOption[false]{BackParindent}
+\DeclareBoolOption[false]{ShortLines}
+\DeclareBoolOption[false]{ShortPages}
+\DeclareBoolOption[false]{OverfullLines}
+\DeclareBoolOption[false]{UnderfullLines}
+\DeclareBoolOption[false]{Widows}
+\DeclareBoolOption[false]{Orphans}
+\DeclareBoolOption[false]{EOPHyphens}
+\DeclareBoolOption[false]{RepeatedHyphens}
+\DeclareBoolOption[false]{ParLastHyphen}
+\DeclareBoolOption[false]{EOLShortWords}
+\DeclareBoolOption[false]{FirstWordMatch}
+\DeclareBoolOption[false]{LastWordMatch}
+\DeclareBoolOption[false]{FootnoteSplit}
+\DeclareBoolOption[false]{ShortFinalWord}
+\AddToKeyvalOption{luatypo}{All}{%
+ \LT@ShortLinestrue \LT@ShortPagestrue
+ \LT@OverfullLinestrue \LT@UnderfullLinestrue
+ \LT@Widowstrue \LT@Orphanstrue
+ \LT@EOPHyphenstrue \LT@RepeatedHyphenstrue
+ \LT@ParLastHyphentrue \LT@EOLShortWordstrue
+ \LT@FirstWordMatchtrue \LT@LastWordMatchtrue
+ \LT@BackParindenttrue \LT@FootnoteSplittrue
+ \LT@ShortFinalWordtrue
+}
+\ProcessKeyvalOptions{luatypo}
+\AtEndOfPackage{%
+ \ifLT@None
+ \directlua{ luatypo.None = true }%
+ \else
+ \directlua{ luatypo.None = false }%
+ \fi
+ \ifLT@BackParindent
+ \advance\luatypo@options by 1
+ \directlua{ luatypo.BackParindent = true }%
+ \else
+ \directlua{ luatypo.BackParindent = false }%
+ \fi
+ \ifLT@ShortLines
+ \advance\luatypo@options by 1
+ \directlua{ luatypo.ShortLines = true }%
+ \else
+ \directlua{ luatypo.ShortLines = false }%
+ \fi
+ \ifLT@ShortPages
+ \advance\luatypo@options by 1
+ \directlua{ luatypo.ShortPages = true }%
+ \else
+ \directlua{ luatypo.ShortPages = false }%
+ \fi
+ \ifLT@OverfullLines
+ \advance\luatypo@options by 1
+ \directlua{ luatypo.OverfullLines = true }%
+ \else
+ \directlua{ luatypo.OverfullLines = false }%
+ \fi
+ \ifLT@UnderfullLines
+ \advance\luatypo@options by 1
+ \directlua{ luatypo.UnderfullLines = true }%
+ \else
+ \directlua{ luatypo.UnderfullLines = false }%
+ \fi
+ \ifLT@Widows
+ \advance\luatypo@options by 1
+ \directlua{ luatypo.Widows = true }%
+ \else
+ \directlua{ luatypo.Widows = false }%
+ \fi
+ \ifLT@Orphans
+ \advance\luatypo@options by 1
+ \directlua{ luatypo.Orphans = true }%
+ \else
+ \directlua{ luatypo.Orphans = false }%
+ \fi
+ \ifLT@EOPHyphens
+ \advance\luatypo@options by 1
+ \directlua{ luatypo.EOPHyphens = true }%
+ \else
+ \directlua{ luatypo.EOPHyphens = false }%
+ \fi
+ \ifLT@RepeatedHyphens
+ \advance\luatypo@options by 1
+ \directlua{ luatypo.RepeatedHyphens = true }%
+ \else
+ \directlua{ luatypo.RepeatedHyphens = false }%
+ \fi
+ \ifLT@ParLastHyphen
+ \advance\luatypo@options by 1
+ \directlua{ luatypo.ParLastHyphen = true }%
+ \else
+ \directlua{ luatypo.ParLastHyphen = false }%
+ \fi
+ \ifLT@EOLShortWords
+ \advance\luatypo@options by 1
+ \directlua{ luatypo.EOLShortWords = true }%
+ \else
+ \directlua{ luatypo.EOLShortWords = false }%
+ \fi
+ \ifLT@FirstWordMatch
+ \advance\luatypo@options by 1
+ \directlua{ luatypo.FirstWordMatch = true }%
+ \else
+ \directlua{ luatypo.FirstWordMatch = false }%
+ \fi
+ \ifLT@LastWordMatch
+ \advance\luatypo@options by 1
+ \directlua{ luatypo.LastWordMatch = true }%
+ \else
+ \directlua{ luatypo.LastWordMatch = false }%
+ \fi
+ \ifLT@FootnoteSplit
+ \advance\luatypo@options by 1
+ \directlua{ luatypo.FootnoteSplit = true }%
+ \else
+ \directlua{ luatypo.FootnoteSplit = false }%
+ \fi
+ \ifLT@ShortFinalWord
+ \advance\luatypo@options by 1
+ \directlua{ luatypo.ShortFinalWord = true }%
+ \else
+ \directlua{ luatypo.ShortFinalWord = false }%
+ \fi
+}
+\ifLT@ShowOptions
+ \GenericWarning{* }{%
+ *** List of possible options for lua-typo ***\MessageBreak
+ [Default values between brackets]%
+ \MessageBreak
+ ShowOptions [false]\MessageBreak
+ None [false]\MessageBreak
+ BackParindent [false]\MessageBreak
+ ShortLines [false]\MessageBreak
+ ShortPages [false]\MessageBreak
+ OverfullLines [false]\MessageBreak
+ UnderfullLines [false]\MessageBreak
+ Widows [false]\MessageBreak
+ Orphans [false]\MessageBreak
+ EOPHyphens [false]\MessageBreak
+ RepeatedHyphens [false]\MessageBreak
+ ParLastHyphen [false]\MessageBreak
+ EOLShortWords [false]\MessageBreak
+ FirstWordMatch [false]\MessageBreak
+ LastWordMatch [false]\MessageBreak
+ FootnoteSplit [false]\MessageBreak
+ ShortFinalWord [false]\MessageBreak
+ \MessageBreak
+ *********************************************%
+ \MessageBreak Lua-typo [ShowOptions]
+ }%
+\fi
+\AtBeginDocument{%
+ \directlua{
+ luatypo.HYPHmax = tex.count.luatypoHyphMax
+ luatypo.PAGEmin = tex.count.luatypoPageMin
+ luatypo.Stretch = tex.count.luatypoStretchMax
+ luatypo.MinFull = tex.count.luatypoMinFull
+ luatypo.MinPart = tex.count.luatypoMinPart
+ luatypo.MinLen = tex.count.luatypoMinLen
+ luatypo.LLminWD = tex.dimen.luatypoLLminWD
+ luatypo.BackPI = tex.dimen.luatypoBackPI
+ luatypo.BackFuzz = tex.dimen.luatypoBackFuzz
+ }%
+}
+\AtVeryEndDocument{%
+\ifnum\luatypo@options = 0 \LT@Nonetrue \fi
+\ifLT@None
+ \directlua{
+ texio.write_nl(' ')
+ texio.write_nl('***********************************')
+ texio.write_nl('*** lua-typo loaded with NO option:')
+ texio.write_nl('*** NO CHECK PERFORMED! ***')
+ texio.write_nl('***********************************')
+ texio.write_nl(' ')
+ }%
+\else
+ \directlua{
+ texio.write_nl(' ')
+ texio.write_nl('*************************************')
+ if luatypo.pagelist == " " then
+ texio.write_nl('*** lua-typo: No Typo Flaws found.')
+ else
+ texio.write_nl('*** lua-typo: WARNING *************')
+ texio.write_nl('The following pages need attention:')
+ texio.write(luatypo.pagelist)
+ end
+ texio.write_nl('***********************************')
+ texio.write_nl(' ')
+ local fileout= tex.jobname .. ".typo"
+ local out=io.open(fileout,"w+")
+ out:write(luatypo.buffer)
+ io.close(out)
+ }%
+\fi}
+\newcommand*{\luatypoOneChar}[2]{%
+ \def\luatypo@LANG{#1}\luatypo@single={#2}%
+ \ifcsname l@\luatypo@LANG\endcsname
+ \luatypo@LANGno=\the\csname l@\luatypo@LANG\endcsname \relax
+ \directlua{
+ local langno = \the\luatypo@LANGno
+ local string = \the\luatypo@single
+ luatypo.single[langno] = " "
+ for p, c in utf8.codes(string) do
+ local s = utf8.char(c)
+ luatypo.single[langno] = luatypo.single[langno] .. s
+ end
+ }%
+ \else
+ \PackageWarning{luatypo}{Unknown language "\luatypo@LANG",
+ \MessageBreak \protect\luatypoOneChar\space command ignored}%
+ \fi}
+\newcommand*{\luatypoTwoChars}[2]{%
+ \def\luatypo@LANG{#1}\luatypo@double={#2}%
+ \ifcsname l@\luatypo@LANG\endcsname
+ \luatypo@LANGno=\the\csname l@\luatypo@LANG\endcsname \relax
+ \directlua{
+ local langno = \the\luatypo@LANGno
+ local string = \the\luatypo@double
+ luatypo.double[langno] = " "
+ for p, c in utf8.codes(string) do
+ local s = utf8.char(c)
+ luatypo.double[langno] = luatypo.double[langno] .. s
+ end
+ }%
+ \else
+ \PackageWarning{luatypo}{Unknown language "\luatypo@LANG",
+ \MessageBreak \protect\luatypoTwoChars\space command ignored}%
+ \fi}
+\newcommand*{\luatypoSetColor}[2]{%
+ \begingroup
+ \color{#2}%
+ \directlua{luatypo.colortbl[#1]=\the\LuaCol@Attribute}%
+ \endgroup
+}
+\begin{luacode}
+luatypo.single = { }
+luatypo.double = { }
+luatypo.colortbl = { }
+luatypo.pagelist = " "
+luatypo.buffer = "List of typographic flaws found for "
+ .. tex.jobname .. ".pdf:\string\n\string\n"
+
+local char_to_discard = { }
+char_to_discard[string.byte(",")] = true
+char_to_discard[string.byte(".")] = true
+char_to_discard[string.byte("!")] = true
+char_to_discard[string.byte("?")] = true
+char_to_discard[string.byte(":")] = true
+char_to_discard[string.byte(";")] = true
+char_to_discard[string.byte("-")] = true
+
+local eow_char = { }
+eow_char[string.byte(".")] = true
+eow_char[string.byte("!")] = true
+eow_char[string.byte("?")] = true
+eow_char[utf8.codepoint("…")] = true
+
+local DISC = node.id("disc")
+local GLYPH = node.id("glyph")
+local GLUE = node.id("glue")
+local KERN = node.id("kern")
+local RULE = node.id("rule")
+local HLIST = node.id("hlist")
+local VLIST = node.id("vlist")
+local LPAR = node.id("local_par")
+local MKERN = node.id("margin_kern")
+local PENALTY = node.id("penalty")
+local WHATSIT = node.id("whatsit")
+local USRSKIP = 0
+local PARSKIP = 3
+local LFTSKIP = 8
+local RGTSKIP = 9
+local TOPSKIP = 10
+local PARFILL = 15
+local LINE = 1
+local BOX = 2
+local INDENT = 3
+local ALIGN = 4
+local EQN = 6
+local USER = 0
+local HYPH = 0x2D
+local LIGA = 0x102
+local parline = 0
+local dimensions = node.dimensions
+local rangedimensions = node.rangedimensions
+local effective_glue = node.effective_glue
+local set_attribute = node.set_attribute
+local slide = node.slide
+local traverse = node.traverse
+local traverse_id = node.traverse_id
+local has_field = node.has_field
+local uses_font = node.uses_font
+local is_glyph = node.is_glyph
+local utf8_find = unicode.utf8.find
+local utf8_gsub = unicode.utf8.gsub
+local utf8_reverse = function (s)
+ if utf8.len(s) > 1 then
+ local so = ""
+ for p, c in utf8.codes(s) do
+ so = utf8.char(c) .. so
+ end
+ s = so
+ end
+ return s
+end
+local color_node = function (node, color)
+ local attr = oberdiek.luacolor.getattribute()
+ if node and node.id == DISC then
+ local pre = node.pre
+ local post = node.post
+ local repl = node.replace
+ if pre then
+ set_attribute(pre,attr,color)
+ end
+ if post then
+ set_attribute(post,attr,color)
+ end
+ if repl then
+ set_attribute(repl,attr,color)
+ end
+ elseif node then
+ set_attribute(node,attr,color)
+ end
+end
+local color_line = function (head, color)
+ local first = head.head
+ for n in traverse(first) do
+ if n.id == HLIST or n.id == VLIST then
+ local ff = n.head
+ for nn in traverse(ff) do
+ if nn.id == HLIST or nn.id == VLIST then
+ local f3 = nn.head
+ for n3 in traverse(f3) do
+ if n3.id == HLIST or n3.id == VLIST then
+ local f4 = n3.head
+ for n4 in traverse(f4) do
+ if n4.id == HLIST or n4.id == VLIST then
+ local f5 = n4.head
+ for n5 in traverse(f5) do
+ if n5.id == HLIST or n5.id == VLIST then
+ local f6 = n5.head
+ for n6 in traverse(f6) do
+ color_node(n6, color)
+ end
+ else
+ color_node(n5, color)
+ end
+ end
+ else
+ color_node(n4, color)
+ end
+ end
+ else
+ color_node(n3, color)
+ end
+ end
+ else
+ color_node(nn, color)
+ end
+ end
+ else
+ color_node(n, color)
+ end
+ end
+end
+log_flaw= function (msg, line, colno, footnote)
+ local pageno = tex.getcount("c@page")
+ local prt ="p. " .. pageno
+ if colno then
+ prt = prt .. ", col." .. colno
+ end
+ if line then
+ local l = string.format("%2d, ", line)
+ if footnote then
+ prt = prt .. ", (ftn.) line " .. l
+ else
+ prt = prt .. ", line " .. l
+ end
+ end
+ prt = prt .. msg
+ luatypo.buffer = luatypo.buffer .. prt .. "\string\n"
+end
+local signature = function (node, string, swap)
+ local n = node
+ local str = string
+ if n and n.id == GLYPH then
+ local b = n.char
+ if b and not char_to_discard[b] then
+ if n.components then
+ local c = ""
+ for nn in traverse_id(GLYPH, n.components) do
+ c = c .. utf8.char(nn.char)
+ end
+ if swap then
+ str = str .. utf8_reverse(c)
+ else
+ str = str .. c
+ end
+ else
+ str = str .. utf8.char(b)
+ end
+ end
+ elseif n and n.id == DISC then
+ local pre = n.pre
+ local post = n.post
+ local c1 = ""
+ local c2 = ""
+ if pre and pre.char then
+ if pre.components then
+ for nn in traverse_id(GLYPH, post.components) do
+ c1 = c1 .. utf8.char(nn.char)
+ end
+ else
+ c1 = utf8.char(pre.char)
+ end
+ c1 = utf8_gsub(c1, "-", "")
+ end
+ if post and post.char then
+ if post.components then
+ for nn in traverse_id(GLYPH, post.components) do
+ c2 = c2 .. utf8.char(nn.char)
+ end
+ else
+ c2 = utf8.char(post.char)
+ end
+ end
+ if swap then
+ str = str .. utf8_reverse(c2) .. c1
+ else
+ str = str .. c1 .. c2
+ end
+ end
+ local len = utf8.len(str)
+ if utf8_find(str, "_") then
+ len = len - 1
+ end
+ return len, str
+end
+local check_line_last_word = function (old, node, line, colno, flag)
+ local COLOR = luatypo.colortbl[11]
+ local match = false
+ local new = ""
+ local maxlen = 0
+ if node then
+ local swap = true
+ local box, go
+ local lastn = node
+ while lastn and lastn.id ~= GLYPH and lastn.id ~= DISC and
+ lastn.id ~= HLIST do
+ lastn = lastn.prev
+ end
+ local n = lastn
+ if n and n.id == HLIST then
+ box = n
+ prev = n.prev
+ lastn = slide(n.head)
+ n = lastn
+ end
+ while n and n.id ~= GLUE do
+ maxlen, new = signature (n, new, swap)
+ n = n.prev
+ end
+ if n and n.id == GLUE then
+ new = new .. "_"
+ go = true
+ elseif box and not n then
+ local p = box.prev
+ if p.id == GLUE then
+ new = new .. "_"
+ n = p
+ else
+ n = box
+ end
+ go = true
+ end
+ if go then
+ repeat
+ n = n.prev
+ maxlen, new = signature (n, new, swap)
+ until not n or n.id == GLUE
+ end
+ new = utf8_reverse(new)
+ if flag then
+ local MinFull = luatypo.MinFull
+ local MinPart = luatypo.MinPart
+ MinFull = math.min(MinPart,MinFull)
+ local k = MinPart
+ local dlo = utf8_reverse(old)
+ local wen = utf8_reverse(new)
+ local oldlast = utf8_gsub (old, ".*_", "_")
+ local newlast = utf8_gsub (new, ".*_", "_")
+ local i
+ if utf8_find(newlast, "_") then
+ i = utf8.len(newlast)
+ end
+ if i and i > maxlen - MinPart + 1 then
+ k = MinPart + 1
+ end
+ local oldsub = ""
+ local newsub = ""
+ for p, c in utf8.codes(dlo) do
+ if utf8.len(oldsub) < k then
+ oldsub = utf8.char(c) .. oldsub
+ end
+ end
+ for p, c in utf8.codes(wen) do
+ if utf8.len(newsub) < k then
+ newsub = utf8.char(c) .. newsub
+ end
+ end
+ local l = utf8.len(new)
+ if oldsub == newsub and l >= k then
+ match = true
+ elseif oldlast == newlast and utf8.len(newlast) > MinFull then
+ match = true
+ oldsub = oldlast
+ newsub = newlast
+ k = utf8.len(newlast)
+ end
+ if match then
+ local osub = oldsub
+ local nsub = newsub
+ while osub == nsub and k <= maxlen do
+ k = k +1
+ osub = string.sub(old,-k)
+ nsub = string.sub(new,-k)
+ if osub == nsub then
+ newsub = nsub
+ end
+ end
+ newsub = utf8_gsub(newsub, "^_", "")
+ local msg = "E.O.L. MATCH=" .. newsub
+ log_flaw(msg, line, colno, footnote)
+ oldsub = utf8_reverse(newsub)
+ local newsub = ""
+ local n = lastn
+ repeat
+ if n and n.id ~= GLUE then
+ color_node(n, COLOR)
+ l, newsub = signature(n, newsub, swap)
+ elseif n and n.id == GLUE then
+ newsub = newsub .. "_"
+ elseif not n and box then
+ n = box
+ else
+ break
+ end
+ n = n.prev
+ until newsub == oldsub or l >= k
+ end
+ end
+ end
+ return new, match
+end
+local check_line_first_word = function (old, node, line, colno, flag)
+ local COLOR = luatypo.colortbl[10]
+ local match = false
+ local swap = false
+ local new = ""
+ local maxlen = 0
+ local n = node
+ local box, go
+ while n and n.id ~= GLYPH and n.id ~= DISC and
+ (n.id ~= HLIST or n.subtype == INDENT) do
+ n = n.next
+ end
+ local start = n
+ if n and n.id == HLIST then
+ box = n
+ start = n.head
+ n = n.head
+ end
+ while n and n.id ~= GLUE do
+ maxlen, new = signature (n, new, swap)
+ n = n.next
+ end
+ if n and n.id == GLUE then
+ new = new .. "_"
+ go = true
+ elseif box and not n then
+ local bn = box.next
+ if bn.id == GLUE then
+ new = new .. "_"
+ n = bn
+ else
+ n = box
+ end
+ go = true
+ end
+ if go then
+ repeat
+ n = n.next
+ maxlen, new = signature (n, new, swap)
+ until not n or n.id == GLUE
+ end
+ if flag then
+ local MinFull = luatypo.MinFull
+ local MinPart = luatypo.MinPart
+ MinFull = math.min(MinPart,MinFull)
+ local k = MinPart
+ local oldfirst = utf8_gsub (old, "_.*", "_")
+ local newfirst = utf8_gsub (new, "_.*", "_")
+ local i
+ if utf8_find(newfirst, "_") then
+ i = utf8.len(newfirst)
+ end
+ if i and i <= MinPart then
+ k = MinPart + 1
+ end
+ local oldsub = ""
+ local newsub = ""
+ for p, c in utf8.codes(old) do
+ if utf8.len(oldsub) < k then oldsub = oldsub .. utf8.char(c) end
+ end
+ for p, c in utf8.codes(new) do
+ if utf8.len(newsub) < k then newsub = newsub .. utf8.char(c) end
+ end
+ local l = utf8.len(newsub)
+ if oldsub == newsub and l >= k then
+ match = true
+ elseif oldfirst == newfirst and utf8.len(newfirst) > MinFull then
+ match = true
+ oldsub = oldfirst
+ newsub = newfirst
+ k = utf8.len(newfirst)
+ end
+ if match then
+ local osub = oldsub
+ local nsub = newsub
+ while osub == nsub and k <= maxlen do
+ k = k + 1
+ osub = string.sub(old,1,k)
+ nsub = string.sub(new,1,k)
+ if osub == nsub then
+ newsub = nsub
+ end
+ end
+ newsub = utf8_gsub(newsub, "_$", "") --$
+ local msg = "B.O.L. MATCH=" .. newsub
+ log_flaw(msg, line, colno, footnote)
+ oldsub = newsub
+ local newsub = ""
+ local k = utf8.len(oldsub)
+ local n = start
+ repeat
+ if n and n.id ~= GLUE then
+ color_node(n, COLOR)
+ l, newsub = signature(n, newsub, swap)
+ elseif n and n.id == GLUE then
+ newsub = newsub .. "_"
+ elseif not n and box then
+ n = box
+ else
+ break
+ end
+ n = n.next
+ until newsub == oldsub or l >= k
+ end
+ end
+ return new, match
+end
+local check_page_first_word = function (node, colno)
+ local COLOR = luatypo.colortbl[14]
+ local match = false
+ local swap = false
+ local new = ""
+ local maxlen = luatypo.MinLen
+ local len = 0
+ local n = node
+ local pn
+ while n and n.id ~= GLYPH and n.id ~= DISC and
+ (n.id ~= HLIST or n.subtype == INDENT) do
+ n = n.next
+ end
+ local start = n
+ if n and n.id == HLIST then
+ start = n.head
+ n = n.head
+ end
+ repeat
+ len, new = signature (n, new, swap)
+ n = n.next
+ until len > maxlen or (n and n.id == GLYPH and eow_char[n.char]) or
+ (n and n.id == GLUE) or
+ (n and n.id == KERN and n.subtype == 1)
+ if n and (n.id == GLUE or n.id == KERN) then
+ pn = n
+ n = n.next
+ end
+ if len <= maxlen and n and n.id == GLYPH and eow_char[n.char] then
+ match =true
+ if pn and (pn.id == GLUE or pn.id == KERN) then
+ new = new .. " "
+ len = len + 1
+ end
+ len = len + 1
+ end
+ if match then
+ local msg = "ShortFinalWord=" .. new
+ log_flaw(msg, 1, colno, false)
+ local n = start
+ repeat
+ color_node(n, COLOR)
+ n = n.next
+ until eow_char[n.char]
+ color_node(n, COLOR)
+ end
+ return match
+end
+local check_regexpr = function (glyph, line, colno)
+ local COLOR = luatypo.colortbl[3]
+ local lang = glyph.lang
+ local match = false
+ local retflag = false
+ local lchar, id = is_glyph(glyph)
+ local previous = glyph.prev
+ if lang and luatypo.single[lang] then
+ if lchar and previous and previous.id == GLUE then
+ match = utf8_find(luatypo.single[lang], utf8.char(lchar))
+ if match then
+ retflag = true
+ local msg = "RGX MATCH=" .. utf8.char(lchar)
+ log_flaw(msg, line, colno, footnote)
+ color_node(glyph,COLOR)
+ end
+ end
+ end
+ if lang and luatypo.double[lang] then
+ if lchar and previous and previous.id == GLYPH then
+ local pchar, id = is_glyph(previous)
+ local pprev = previous.prev
+ if pchar and pprev and pprev.id == GLUE then
+ local pattern = utf8.char(pchar) .. utf8.char(lchar)
+ match = utf8_find(luatypo.double[lang], pattern)
+ if match then
+ retflag = true
+ local msg = "RGX MATCH=" .. pattern
+ log_flaw(msg, line, colno, footnote)
+ color_node(previous,COLOR)
+ color_node(glyph,COLOR)
+ end
+ end
+ elseif lchar and previous and previous.id == KERN then
+ local pprev = previous.prev
+ if pprev and pprev.id == GLYPH then
+ local pchar, id = is_glyph(pprev)
+ local ppprev = pprev.prev
+ if pchar and ppprev and ppprev.id == GLUE then
+ local pattern = utf8.char(pchar) .. utf8.char(lchar)
+ match = utf8_find(luatypo.double[lang], pattern)
+ if match then
+ retflag = true
+ local msg = "REGEXP MATCH=" .. pattern
+ log_flaw(msg, line, colno, footnote)
+ color_node(pprev,COLOR)
+ color_node(glyph,COLOR)
+ end
+ end
+ end
+ end
+ end
+return retflag
+end
+local show_pre_disc = function (disc, color)
+ local n = disc
+ while n and n.id ~= GLUE do
+ color_node(n, color)
+ n = n.prev
+ end
+ return n
+ end
+local footnoterule_ahead = function (head)
+ local n = head
+ local flag = false
+ local totalht, ruleht, ht1, ht2, ht3
+ if n and n.id == KERN and n.subtype == 1 then
+ totalht = n.kern
+ n = n.next
+ while n and n.id == GLUE do n = n.next end
+ if n and n.id == RULE and n.subtype == 0 then
+ ruleht = n.height
+ totalht = totalht + ruleht
+ n = n.next
+ if n and n.id == KERN and n.subtype == 1 then
+ totalht = totalht + n.kern
+ if totalht == 0 or totalht == ruleht then
+ flag = true
+ else
+ end
+ end
+ end
+ end
+ return flag
+end
+local get_pagebody = function (head)
+ local textht = tex.getdimen("textheight")
+ local fn = head.list
+ local body = nil
+ repeat
+ fn = fn.next
+ until fn.id == VLIST and fn.height > 0
+ first = fn.list
+ for n in traverse_id(VLIST,first) do
+ if n.subtype == 0 and n.height == textht then
+ body = n
+ break
+ else
+ first = n.list
+ for n in traverse_id(VLIST,first) do
+ if n.subtype == 0 and n.height == textht then
+ body = n
+ break
+ end
+ end
+ end
+ end
+ if not body then
+ texio.write_nl("***lua-typo ERROR: PAGE BODY *NOT* FOUND!***")
+ end
+ return body
+end
+check_vtop = function (head, colno, vpos)
+ local PAGEmin = luatypo.PAGEmin
+ local HYPHmax = luatypo.HYPHmax
+ local LLminWD = luatypo.LLminWD
+ local BackPI = luatypo.BackPI
+ local BackFuzz = luatypo.BackFuzz
+ local BackParindent = luatypo.BackParindent
+ local ShortLines = luatypo.ShortLines
+ local ShortPages = luatypo.ShortPages
+ local OverfullLines = luatypo.OverfullLines
+ local UnderfullLines = luatypo.UnderfullLines
+ local Widows = luatypo.Widows
+ local Orphans = luatypo.Orphans
+ local EOPHyphens = luatypo.EOPHyphens
+ local RepeatedHyphens = luatypo.RepeatedHyphens
+ local FirstWordMatch = luatypo.FirstWordMatch
+ local ParLastHyphen = luatypo.ParLastHyphen
+ local EOLShortWords = luatypo.EOLShortWords
+ local LastWordMatch = luatypo.LastWordMatch
+ local FootnoteSplit = luatypo.FootnoteSplit
+ local ShortFinalWord = luatypo.ShortFinalWord
+ local Stretch = math.max(luatypo.Stretch/100,1)
+ local blskip = tex.getglue("baselineskip")
+ local vpos_min = PAGEmin * blskip
+ vpos_min = vpos_min * 1.5
+ local linewd = tex.getdimen("textwidth")
+ local first_bot = true
+ local footnote = false
+ local ftnsplit = false
+ local orphanflag = false
+ local widowflag = false
+ local pageshort = false
+ local firstwd = ""
+ local lastwd = ""
+ local hyphcount = 0
+ local pageline = 0
+ local ftnline = 0
+ local line = 0
+ local body_bottom = false
+ local page_bottom = false
+ local pageflag = false
+ local pageno = tex.getcount("c@page")
+ while head do
+ local nextnode = head.next
+ if head.id == HLIST and head.subtype == LINE and
+ (head.height > 0 or head.depth > 0) then
+ vpos = vpos + head.height + head.depth
+ local linewd = head.width
+ local first = head.head
+ local ListItem = false
+ if footnote then
+ ftnline = ftnline + 1
+ line = ftnline
+ else
+ pageline = pageline + 1
+ line = pageline
+ end
+ local n = nextnode
+ while n and (n.id == GLUE or n.id == PENALTY or
+ n.id == WHATSIT ) do
+ n = n.next
+ end
+ if not n then
+ page_bottom = true
+ body_bottom = true
+ elseif footnoterule_ahead(n) then
+ body_bottom = true
+ end
+ local hmax = linewd + tex.hfuzz
+ local w,h,d = dimensions(1,2,0, first)
+ if w > hmax and OverfullLines then
+ pageflag = true
+ local wpt = string.format("%.2fpt", (w-head.width)/65536)
+ local msg = "OVERFULL line " .. wpt
+ log_flaw(msg, line, colno, footnote)
+ local COLOR = luatypo.colortbl[7]
+ color_line (head, COLOR)
+ elseif head.glue_set > Stretch and head.glue_sign == 1 and
+ head.glue_order == 0 and UnderfullLines then
+ pageflag = true
+ local s = string.format("%.0f%s", 100*head.glue_set, "%")
+ local msg = "UNDERFULL line stretch=" .. s
+ log_flaw(msg, line, colno, footnote)
+ local COLOR = luatypo.colortbl[8]
+ color_line (head, COLOR)
+ end
+ if footnote and page_bottom then
+ ftnsplit = true
+ end
+ while first.id == MKERN or
+ (first.id == GLUE and first.subtype == LFTSKIP) do
+ first = first.next
+ end
+ if first.id == LPAR then
+ hyphcount = 0
+ firstwd = ""
+ lastwd = ""
+ if not footnote then
+ parline = 1
+ if body_bottom then
+ orphanflag = true
+ end
+ end
+ local nn = first.next
+ if nn and nn.id == HLIST and nn.subtype == BOX then
+ ListItem = true
+ end
+ elseif not footnote then
+ parline = parline + 1
+ end
+ local ln = slide(first)
+ local pn = ln.prev
+ if pn and pn.id == GLUE and pn.subtype == PARFILL then
+ hyphcount = 0
+ ftnsplit = false
+ orphanflag = false
+ if pageline == 1 and parline > 1 then
+ widowflag = true
+ end
+ local PFskip = effective_glue(pn,head)
+ if ShortLines then
+ local llwd = linewd - PFskip
+ if llwd < LLminWD then
+ pageflag = true
+ local msg = "SHORT LINE: length=" ..
+ string.format("%.0fpt", llwd/65536)
+ log_flaw(msg, line, colno, footnote)
+ local COLOR = luatypo.colortbl[6]
+ local attr = oberdiek.luacolor.getattribute()
+ color_line (head, COLOR)
+ end
+ end
+ if BackParindent and PFskip < BackPI and
+ PFskip >= BackFuzz and parline > 1 then
+ pageflag = true
+ local msg = "NEARLY FULL line: backskip=" ..
+ string.format("%.1fpt", PFskip/65536)
+ log_flaw(msg, line, colno, footnote)
+ local COLOR = luatypo.colortbl[12]
+ local attr = oberdiek.luacolor.getattribute()
+ color_line (head, COLOR)
+ end
+ if Widows and widowflag then
+ pageflag = true
+ local msg = "WIDOW"
+ log_flaw(msg, line, colno, footnote)
+ local COLOR = luatypo.colortbl[4]
+ color_line (head, COLOR)
+ widowflag = false
+ end
+ if FirstWordMatch then
+ local flag = not ListItem
+ firstwd, flag =
+ check_line_first_word(firstwd, first, line, colno, flag)
+ if flag then
+ pageflag = true
+ end
+ end
+ if LastWordMatch then
+ local flag = true
+ if PFskip > BackPI then
+ flag = false
+ end
+ lastwd, flag =
+ check_line_last_word(lastwd, pn, line, colno, flag)
+ if flag then
+ pageflag = true
+ end
+ end
+ elseif pn and pn.id == DISC then
+ hyphcount = hyphcount + 1
+ if orphanflag and Orphans then
+ pageflag = true
+ local msg = "ORPHAN"
+ log_flaw(msg, line, colno, footnote)
+ local COLOR = luatypo.colortbl[5]
+ color_line (head, COLOR)
+ end
+ if ftnsplit and FootnoteSplit then
+ pageflag = true
+ local msg = "FOOTNOTE SPLIT"
+ log_flaw(msg, line, colno, footnote)
+ local COLOR = luatypo.colortbl[13]
+ color_line (head, COLOR)
+ end
+ if (page_bottom or body_bottom) and EOPHyphens then
+ pageflag = true
+ local msg = "LAST WORD SPLIT"
+ log_flaw(msg, line, colno, footnote)
+ local COLOR = luatypo.colortbl[1]
+ local pg = show_pre_disc (pn,COLOR)
+ end
+ if FirstWordMatch then
+ local flag = not ListItem
+ firstwd, flag =
+ check_line_first_word(firstwd, first, line, colno, flag)
+ if flag then
+ pageflag = true
+ end
+ end
+ if LastWordMatch then
+ local flag = true
+ lastwd, flag =
+ check_line_last_word(lastwd, ln, line, colno, flag)
+ if flag then
+ pageflag = true
+ end
+ end
+ if hyphcount > HYPHmax and RepeatedHyphens then
+ local COLOR = luatypo.colortbl[2]
+ local pg = show_pre_disc (pn,COLOR)
+ pageflag = true
+ local msg = "REPEATED HYPHENS: more than " .. HYPHmax
+ log_flaw(msg, line, colno, footnote)
+ end
+ if nextnode and ParLastHyphen then
+ local nn = nextnode.next
+ local nnn = nil
+ if nn and nn.next then
+ nnn = nn.next
+ if nnn.id == HLIST and nnn.subtype == LINE and
+ nnn.glue_order == 2 then
+ pageflag = true
+ local msg = "HYPHEN on next to last line"
+ log_flaw(msg, line, colno, footnote)
+ local COLOR = luatypo.colortbl[0]
+ local pg = show_pre_disc (pn,COLOR)
+ end
+ end
+ end
+ else
+ hyphcount = 0
+ if orphanflag and Orphans then
+ pageflag = true
+ local msg = "ORPHAN"
+ log_flaw(msg, line, colno, footnote)
+ local COLOR = luatypo.colortbl[5]
+ color_line (head, COLOR)
+ end
+ if ftnsplit and FootnoteSplit then
+ pageflag = true
+ local msg = "FOOTNOTE SPLIT"
+ log_flaw(msg, line, colno, footnote)
+ local COLOR = luatypo.colortbl[13]
+ color_line (head, COLOR)
+ end
+ if FirstWordMatch then
+ local flag = not ListItem
+ firstwd, flag =
+ check_line_first_word(firstwd, first, line, colno, flag)
+ if flag then
+ pageflag = true
+ end
+ end
+ if LastWordMatch and pn then
+ local flag = true
+ lastwd, flag =
+ check_line_last_word(lastwd, pn, line, colno, flag)
+ if flag then
+ pageflag = true
+ end
+ end
+ if EOLShortWords then
+ while pn and pn.id ~= GLYPH and pn.id ~= HLIST do
+ pn = pn.prev
+ end
+ if pn and pn.id == GLYPH then
+ if check_regexpr(pn, line, colno) then
+ pageflag = true
+ end
+ end
+ end
+ end
+ if ShortFinalWord and pageline == 1 and parline > 1 and
+ check_page_first_word(first,colno) then
+ pageflag = true
+ end
+ elseif head.id == HLIST and
+ (head.subtype == EQN or head.subtype == ALIGN) and
+ (head.height > 0 or head.depth > 0) then
+ vpos = vpos + head.height + head.depth
+ if footnote then
+ ftnline = ftnline + 1
+ line = ftnline
+ else
+ pageline = pageline + 1
+ line = pageline
+ end
+ local fl = true
+ local wd = 0
+ local hmax = 0
+ if head.subtype == EQN then
+ local f = head.list
+ wd = rangedimensions(head,f)
+ hmax = head.width + tex.hfuzz
+ else
+ wd = head.width
+ hmax = tex.getdimen("linewidth") + tex.hfuzz
+ end
+ if wd > hmax and OverfullLines then
+ if head.subtype == ALIGN then
+ local first = head.list
+ for n in traverse_id(HLIST, first) do
+ local last = slide(n.list)
+ if last.id == GLUE and last.subtype == USER then
+ wd = wd - effective_glue(last,n)
+ if wd <= hmax then fl = false end
+ end
+ end
+ end
+ if fl then
+ pageflag = true
+ local w = wd - hmax + tex.hfuzz
+ local wpt = string.format("%.2fpt", w/65536)
+ local msg = "OVERFULL equation " .. wpt
+ log_flaw(msg, line, colno, footnote)
+ local COLOR = luatypo.colortbl[7]
+ color_line (head, COLOR)
+ end
+ end
+ elseif head and head.id == RULE and head.subtype == 0 then
+ vpos = vpos + head.height + head.depth
+ if body_bottom then
+ footnote = true
+ ftnline = 0
+ body_bottom = false
+ orphanflag = false
+ hyphcount = 0
+ firstwd = ""
+ lastwd = ""
+ end
+ elseif body_bottom and head.id == GLUE and head.subtype == 0 then
+ if first_bot then
+ if pageline > 1 and pageline < PAGEmin and ShortPages then
+ pageshort = true
+ end
+ if pageshort and vpos < vpos_min then
+ pageflag = true
+ local msg = "SHORT PAGE: only " .. pageline .. " lines"
+ log_flaw(msg, line, colno, footnote)
+ local COLOR = luatypo.colortbl[9]
+ local n = head
+ repeat
+ n = n.prev
+ until n.id == HLIST
+ color_line (n, COLOR)
+ end
+ first_bot = false
+ end
+ elseif head.id == GLUE then
+ vpos = vpos + effective_glue(head,body)
+ elseif head.id == KERN and head.subtype == 1 then
+ vpos = vpos + head.kern
+ elseif head.id == VLIST then
+ vpos = vpos + head.height + head.depth
+ elseif head.id == HLIST and head.subtype == BOX then
+ local hf = head.list
+ if hf and hf.id == VLIST and hf.subtype == 0 then
+ break
+ end
+ end
+ head = nextnode
+ end
+ if pageflag then
+ local plist = luatypo.pagelist
+ local lastp = tonumber(string.match(plist, "%s(%d+),%s$"))
+ if not lastp or pageno > lastp then
+ luatypo.pagelist = luatypo.pagelist .. tostring(pageno) .. ", "
+ end
+ end
+ return head
+end
+luatypo.check_page = function (head)
+ local textwd = tex.getdimen("textwidth")
+ local vpos = 0
+ local n2, n3, col, colno
+ local body = get_pagebody(head)
+ local footnote = false
+ local top = body
+ local first = body.list
+ if (first and first.id == HLIST and first.subtype == BOX) or
+ (first and first.id == VLIST and first.subtype == 0) then
+ top = body.list
+ first = top.list
+ end
+ while top do
+ first = top.list
+ if top and top.id == VLIST and top.subtype == 0 and
+ top.width > textwd/2 then
+ local next = check_vtop(first,colno,vpos)
+ if next then
+ top = next
+ elseif top then
+ top = top.next
+ end
+ elseif (top and top.id == HLIST and top.subtype == BOX) and
+ (first and first.id == VLIST and first.subtype == 0) and
+ (first.height > 0 and first.width > 0) then
+ colno = 0
+ for n in traverse_id(VLIST, first) do
+ colno = colno + 1
+ col = n.list
+ check_vtop(col,colno,vpos)
+ end
+ colno = nil
+ top = top.next
+ elseif (top and top.id == HLIST and top.subtype == BOX) and
+ (first and first.id == HLIST and first.subtype == BOX) and
+ (first.height > 0 and first.width > 0) then
+ colno = 0
+ for n in traverse_id(HLIST, first) do
+ colno = colno + 1
+ local nn = n.list
+ if nn and nn.list then
+ col = nn.list
+ check_vtop(col,colno,vpos)
+ end
+ end
+ colno = nil
+ top = top.next
+ else
+ top = top.next
+ end
+ end
+ return true
+end
+return luatypo.check_page
+\end{luacode}
+\AtEndOfPackage{%
+ \directlua{
+ if not luatypo.None then
+ luatexbase.add_to_callback
+ ("pre_shipout_filter",luatypo.check_page,"check_page",1)
+ end
+ }%
+}
+\InputIfFileExists{lua-typo.cfg}%
+ {\PackageInfo{lua-typo.sty}{"lua-typo.cfg" file loaded}}%
+ {\PackageInfo{lua-typo.sty}{"lua-typo.cfg" file not found.
+ \MessageBreak Providing default values.}%
+ \definecolor{LTgrey}{gray}{0.6}%
+ \definecolor{LTred}{rgb}{1,0.55,0}
+ \luatypoSetColor0{red}% Paragraph last full line hyphenated
+ \luatypoSetColor1{red}% Page last word hyphenated
+ \luatypoSetColor2{red}% Hyphens on to many consecutive lines
+ \luatypoSetColor3{red}% Short word at end of line
+ \luatypoSetColor4{cyan}% Widow
+ \luatypoSetColor5{cyan}% Orphan
+ \luatypoSetColor6{cyan}% Paragraph ending on a short line
+ \luatypoSetColor7{blue}% Overfull lines
+ \luatypoSetColor8{blue}% Underfull lines
+ \luatypoSetColor9{red}% Nearly empty page
+ \luatypoSetColor{10}{LTred}% First word matches
+ \luatypoSetColor{11}{LTred}% Last word matches
+ \luatypoSetColor{12}{LTgrey}% Paragraph ending on a nearly full line
+ \luatypoSetColor{13}{cyan}% Footnote split
+ \luatypoSetColor{14}{red}% Too short first (final) word on the page
+ \luatypoBackPI=1em\relax
+ \luatypoBackFuzz=2pt\relax
+ \ifdim\parindent=0pt \luatypoLLminWD=20pt\relax
+ \else\luatypoLLminWD=2\parindent\relax\fi
+ \luatypoStretchMax=200\relax
+ \luatypoHyphMax=2\relax
+ \luatypoPageMin=5\relax
+ \luatypoMinFull=4\relax
+ \luatypoMinPART=4\relax
+ \luatypoMinLen=4\relax
+ }%
+%%
+%%
+%% End of file `lua-typo.sty'.
diff --git a/macros/luatex/latex/lua-typo/source/lua-typo.dtx b/macros/luatex/latex/lua-typo/source/lua-typo.dtx
index 41a9966280..dfcc363cd4 100644
--- a/macros/luatex/latex/lua-typo/source/lua-typo.dtx
+++ b/macros/luatex/latex/lua-typo/source/lua-typo.dtx
@@ -72,7 +72,7 @@
%<+docfr>\frenchsetup{og=«, fg=»}
\usepackage[ShortPages, OverfullLines, UnderfullLines,
- Widows, Orphans, EOPHyphens, RepeatedHyphens
+ EOPHyphens, RepeatedHyphens, % Widows, Orphans,
]{lua-typo}
\renewcommand*\descriptionlabel[1]{%
\hspace{\labelsep}\texttt{#1}}
@@ -325,9 +325,8 @@
% exactement les réglages internes, il se trouve normalement dans le
% répertoire \texdir{texmfdist} des distributions TeXLive, MikTeX, etc.
% L’utilisateur a la possibilité de recopier ce fichier soit dans son
-% répertoire de travail pour un document particulier, soit dans son
-% répertoire \texdir{texmfhome} ou \texdir{texmflocal} et de le
-% personnaliser comme il l’entend.
+% répertoire de travail, soit dans son répertoire \texdir{texmfhome}
+% ou \texdir{texmflocal} et de le personnaliser comme il l’entend.
%
% Voici la liste complète des paramètres personnalisables avec leur
% valeur par défaut, leurs noms sont systématiquement préfixés par
@@ -374,9 +373,11 @@
% mot) au début ou à la fin de deux lignes consécutives
% déclenchant l’avertissement.
% Avec ce réglage (3 et 4), seront détectées deux lignes se
-% terminant par « cible» et « invincible » (quatre lettres en
-% commun), ainsi que la présence de « mon » en début ou fin de
-% deux lignes consécutives (trois lettres en commun).
+% terminant par « cible » et « irrésistible » ou
+% « irrésistible-(ment) » (quatre lettres en commun), ainsi que la
+% présence de « mon » en début ou fin de deux lignes consécutives
+% (trois lettres en commun), mais « mon » et « mont » en début de
+% ligne échappent à la détection.
%
% \item[EOLShortWords:] cette option signale la présence en fin de
% ligne de mots très courts (une ou deux lettres)
@@ -425,7 +426,7 @@
% \luatypoSetColor9{red} % Page presque vide (qq. lignes)
% \luatypoSetColor{10}{LTred} % Répétitions en début de ligne
% \luatypoSetColor{11}{LTred} % Répétitions en fin de ligne
-% \luatypoSetColor{12}{LTgrey}% Dernière ligne d’alinéa presque pleine
+% \luatypoSetColor{12}{LTgrey}% Dernière ligne alinéa presque pleine
% \luatypoSetColor{13}{cyan} % Note de bas de page éclatée
% \luatypoSetColor{14}{red} % Mot de fin de phrase en haut de page
% \end{verbatim}
@@ -719,7 +720,7 @@
%<+scan>\ProvidesPackage{scan-page}
%<+dtx>\ProvidesFile{lua-typo.dtx}
%<*dtx|sty|scan>
- [2023-03-08 v.0.65 Daniel Flipo]
+ [2023-04-12 v.0.70 Daniel Flipo]
%</dtx|sty|scan>
%<*sty>
% \fi
@@ -731,18 +732,13 @@
% mechanism to provide easier backward compatibility.
% Rollback version~0.40 is provided for users who would have
% a LaTeX kernel older than 2021/06/01.
+% Rollback version~0.65 is provided for users who would have
+% a LaTeX kernel older than 2022/06/01.
%
% \begin{macrocode}
-\ifdefined\DeclareRelease
- \DeclareRelease{v0.4}{2021-01-01}{lua-typo-2021-04-18.sty}
- \DeclareCurrentRelease{}{2023-03-08}
-\else
- \PackageWarning{lua-typo}{Your LaTeX kernel is too old to provide
- access\MessageBreak to former versions of the lua-typo package.%
- \MessageBreak Anyway, lua-typo requires a LaTeX kernel dated%
- \MessageBreak 2020-01-01 or newer; reported}
-\fi
-\NeedsTeXFormat{LaTeX2e}[2021/06/01]
+\DeclareRelease{v0.4}{2021-01-01}{lua-typo-2021-04-18.sty}
+\DeclareRelease{v0.65}{2023-03-08}{lua-typo-2023-03-08.sty}
+\DeclareCurrentRelease{}{2023-04-12}
% \end{macrocode}
%
% This package only runs with LuaLaTeX and requires packages
@@ -751,8 +747,7 @@
%
% \begin{macrocode}
\ifdefined\directlua
- \RequirePackage{luatexbase,luacode,luacolor}
- \RequirePackage{kvoptions,atveryend}
+ \RequirePackage{luatexbase,luacode,luacolor,atveryend}
\else
\PackageError{This package is meant for LuaTeX only! Aborting}
{No more information available, sorry!}
@@ -784,46 +779,44 @@ luatypo = { }
\end{luacode}
% \end{macrocode}
%
-% Set up \pkg{kvoptions} initializations.
-%
-% \begin{macrocode}
-\SetupKeyvalOptions{
- family=luatypo,
- prefix=LT@,
-}
-\DeclareBoolOption[false]{ShowOptions}
-\DeclareBoolOption[false]{None}
-\DeclareBoolOption[false]{All}
-\DeclareBoolOption[false]{BackParindent}
-\DeclareBoolOption[false]{ShortLines}
-\DeclareBoolOption[false]{ShortPages}
-\DeclareBoolOption[false]{OverfullLines}
-\DeclareBoolOption[false]{UnderfullLines}
-\DeclareBoolOption[false]{Widows}
-\DeclareBoolOption[false]{Orphans}
-\DeclareBoolOption[false]{EOPHyphens}
-\DeclareBoolOption[false]{RepeatedHyphens}
-\DeclareBoolOption[false]{ParLastHyphen}
-\DeclareBoolOption[false]{EOLShortWords}
-\DeclareBoolOption[false]{FirstWordMatch}
-\DeclareBoolOption[false]{LastWordMatch}
-\DeclareBoolOption[false]{FootnoteSplit}
-\DeclareBoolOption[false]{ShortFinalWord}
-% \end{macrocode}
+% Set up \pkg{ltkeys} initializations.
% Option \opt{All} resets all booleans relative to specific
% typographic checks to \opt{true}.
-% \begin{macrocode}
-\AddToKeyvalOption{luatypo}{All}{%
- \LT@ShortLinestrue \LT@ShortPagestrue
- \LT@OverfullLinestrue \LT@UnderfullLinestrue
- \LT@Widowstrue \LT@Orphanstrue
- \LT@EOPHyphenstrue \LT@RepeatedHyphenstrue
- \LT@ParLastHyphentrue \LT@EOLShortWordstrue
- \LT@FirstWordMatchtrue \LT@LastWordMatchtrue
- \LT@BackParindenttrue \LT@FootnoteSplittrue
- \LT@ShortFinalWordtrue
-}
-\ProcessKeyvalOptions{luatypo}
+%
+% \changes{v0.70}{2023/04/08}{Package options no longer require
+% `kvoptions’, they rely on LaTeX `ltkeys’ package.}
+%
+% \begin{macrocode}
+\DeclareKeys[luatypo]
+ {
+ ShowOptions.if = LT@ShowOptions ,
+ None.if = LT@None ,
+ BackParindent.if = LT@BackParindent ,
+ ShortLines.if = LT@ShortLines ,
+ ShortPages.if = LT@ShortPages ,
+ OverfullLines.if = LT@OverfullLines ,
+ UnderfullLines.if = LT@UnderfullLines ,
+ Widows.if = LT@Widows ,
+ Orphans.if = LT@Orphans ,
+ EOPHyphens.if = LT@EOPHyphens ,
+ RepeatedHyphens.if = LT@RepeatedHyphens ,
+ ParLastHyphen.if = LT@ParLastHyphen ,
+ EOLShortWords.if = LT@EOLShortWords ,
+ FirstWordMatch.if = LT@FirstWordMatch ,
+ LastWordMatch.if = LT@LastWordMatch ,
+ FootnoteSplit.if = LT@FootnoteSplit ,
+ ShortFinalWord.if = LT@ShortFinalWord ,
+ All.if = LT@All ,
+ All.code = \LT@ShortLinestrue \LT@ShortPagestrue
+ \LT@OverfullLinestrue \LT@UnderfullLinestrue
+ \LT@Widowstrue \LT@Orphanstrue
+ \LT@EOPHyphenstrue \LT@RepeatedHyphenstrue
+ \LT@ParLastHyphentrue \LT@EOLShortWordstrue
+ \LT@FirstWordMatchtrue \LT@LastWordMatchtrue
+ \LT@BackParindenttrue \LT@FootnoteSplittrue
+ \LT@ShortFinalWordtrue
+ }
+\ProcessKeyOptions[luatypo]
% \end{macrocode}
%
% Forward these options to the |luatypo| global table.
@@ -941,6 +934,7 @@ luatypo = { }
\MessageBreak
ShowOptions [false]\MessageBreak
None [false]\MessageBreak
+ All [false]\MessageBreak
BackParindent [false]\MessageBreak
ShortLines [false]\MessageBreak
ShortPages [false]\MessageBreak
@@ -974,6 +968,10 @@ luatypo = { }
luatypo.Stretch = tex.count.luatypoStretchMax
luatypo.MinFull = tex.count.luatypoMinFull
luatypo.MinPart = tex.count.luatypoMinPart
+% \end{macrocode}
+% Ensure |MinFull|$\leq$|MinPart|.
+% \begin{macrocode}
+ luatypo.MinFull = math.min(luatypo.MinPart,luatypo.MinFull)
luatypo.MinLen = tex.count.luatypoMinLen
luatypo.LLminWD = tex.dimen.luatypoLLminWD
luatypo.BackPI = tex.dimen.luatypoBackPI
@@ -1169,10 +1167,11 @@ local traverse_id = node.traverse_id
local has_field = node.has_field
local uses_font = node.uses_font
local is_glyph = node.is_glyph
+local utf8_len = utf8.len
% \end{macrocode}
% Local definitions from the `unicode.utf8’ library: replacements are
-% needed for functions |string.gsub()|, |string.find()| and
-% |string.reverse()| which are meant for one-byte characters only.
+% needed for functions |string.gsub()|, |string.sub()|, |string.find()|
+% and |string.reverse()| which are meant for one-byte characters only.
%
% \changes{v0.65}{2023/03/02}{Three new functions for utf-8 strings’
% manipulations.}
@@ -1192,7 +1191,7 @@ local utf8_gsub = unicode.utf8.gsub
% end to beginning) [same as |string.reverse| but for utf-8 strings].
% \begin{macrocode}
local utf8_reverse = function (s)
- if utf8.len(s) > 1 then
+ if utf8_len(s) > 1 then
local so = ""
for p, c in utf8.codes(s) do
so = utf8.char(c) .. so
@@ -1202,6 +1201,16 @@ local utf8_reverse = function (s)
return s
end
% \end{macrocode}
+% |utf8_sub| returns the substring of s that starts at i and
+% continues until j (j-i-1 utf8 chars.). \emph{Warning: it requires
+% $i\ge1$ and $j\ge i$}.
+% \begin{macrocode}
+local utf8_sub = function (s,i,j)
+ i=utf8.offset(s,i)
+ j=utf8.offset(s,j+1)-1
+ return string.sub(s,i,j)
+end
+% \end{macrocode}
%
%\changes{v0.32}{2021/03/14}{Better protection against unexpected
% nil nodes.}
@@ -1316,13 +1325,15 @@ end
% and ligatures, dicretionnaries other than ligatures, kerns
% (letterspacing) should be discarded.
% For each word to be compared we build a ``signature’’ made of
-% glyphs and split ligatures.
+% glyphs, split ligatures and underscores (representing glues).
%
% \changes{v0.65}{2023/03/02}{All ligatures are now split using the
% node’s `components’ field rather than a table.}
%
-% The first function adds a node to a signature of type string.
-% It returns the augmented string and its length.
+% The first function adds a (non-nil) node to a signature of type
+% string, nil nodes are ignored.
+% It returns the augmented string and its length
+% (underscores are omitted in the length computation).
% The last argument is a boolean needed when building a signature
% backwards (see |check_line_last_word|).
% \begin{macrocode}
@@ -1331,12 +1342,12 @@ local signature = function (node, string, swap)
local str = string
if n and n.id == GLYPH then
local b = n.char
- if b and not char_to_discard[b] then
% \end{macrocode}
% Punctuation has to be discarded; other glyphs may be ligatures,
% then they have a |components| field which holds the list of glyphs
% which compose the ligature.
% \begin{macrocode}
+ if b and not char_to_discard[b] then
if n.components then
local c = ""
for nn in traverse_id(GLYPH, n.components) do
@@ -1384,14 +1395,14 @@ local signature = function (node, string, swap)
else
str = str .. c1 .. c2
end
+ elseif n and n.id == GLUE then
+ str = str .. "_"
end
% \end{macrocode}
% The returned length is the number of \emph{letters}.
% \begin{macrocode}
- local len = utf8.len(str)
- if utf8_find(str, "_") then
- len = len - 1
- end
+ local s = utf8_gsub(str, "_", "")
+ local len = utf8_len(s)
return len, str
end
% \end{macrocode}
@@ -1414,17 +1425,22 @@ end
% \changes{v0.61}{2023/02/06}{`check\_line\_last\_word’ returns a flag
% to set pageflag.}
%
+% \changes{v0.70}{2023/04/08}{`check\_line\_first\_word’ and
+% `check\_line\_last\_word’: length of matches corrected.}
+%
% \begin{macrocode}
local check_line_last_word = function (old, node, line, colno, flag)
local COLOR = luatypo.colortbl[11]
local match = false
local new = ""
local maxlen = 0
+ local MinFull = luatypo.MinFull
+ local MinPart = luatypo.MinPart
if node then
local swap = true
local box, go
% \end{macrocode}
-% Step back to the last glyph or discretionary.
+% Step back to the last glyph or discretionary or hbox.
% \begin{macrocode}
local lastn = node
while lastn and lastn.id ~= GLYPH and lastn.id ~= DISC and
@@ -1432,39 +1448,44 @@ local check_line_last_word = function (old, node, line, colno, flag)
lastn = lastn.prev
end
% \end{macrocode}
-% A signature is built from the last two words on the current line.
+% A signature is built from the last two (or more) words
+% on the current line.
% \begin{macrocode}
local n = lastn
- if n and n.id == HLIST then
- box = n
- prev = n.prev
- lastn = slide(n.head)
- n = lastn
- end
- while n and n.id ~= GLUE do
- maxlen, new = signature (n, new, swap)
- n = n.prev
- end
- if n and n.id == GLUE then
- new = new .. "_"
- go = true
- elseif box and not n then
- local p = box.prev
- if p.id == GLUE then
- new = new .. "_"
- n = p
- else
- n = box
- end
- go = true
- end
- if go then
- repeat
- n = n.prev
- maxlen, new = signature (n, new, swap)
- until not n or n.id == GLUE
+ local words = 0
+ while n and (words <= 2 or maxlen < MinPart) do
+% \end{macrocode}
+% Go down inside boxes, read their content from end to beginning,
+% then step out.
+% \begin{macrocode}
+ if n and n.id == HLIST then
+ box = n
+ local first = n.head
+ local lastn = slide(first)
+ n = lastn
+ while n do
+ maxlen, new = signature (n, new, swap)
+ n = n.prev
+ end
+ n = box.prev
+ local w = utf8_gsub(new, "_", "")
+ words = words + utf8_len(new) - utf8_len(w) + 1
+ else
+ repeat
+ maxlen, new = signature (n, new, swap)
+ n = n.prev
+ until not n or n.id == GLUE or n.id == HLIST
+ if n and n.id == GLUE then
+ maxlen, new = signature (n, new, swap)
+ words = words + 1
+ n = n.prev
+ end
+ end
end
new = utf8_reverse(new)
+ new = utf8_gsub(new, "_+$", "") -- $
+ new = utf8_gsub(new, "^_+", "")
+ maxlen = math.min(utf8_len(old), utf8_len(new))
%<dbg> texio.write_nl("EOLsigold=" .. old)
%<dbg> texio.write(" EOLsig=" .. new)
% \end{macrocode}
@@ -1472,82 +1493,95 @@ local check_line_last_word = function (old, node, line, colno, flag)
% the last word’s signature, but doesn’t compare it with the
% previous line’s.
% \begin{macrocode}
- if flag then
- local MinFull = luatypo.MinFull
- local MinPart = luatypo.MinPart
- MinFull = math.min(MinPart,MinFull)
- local k = MinPart
- local dlo = utf8_reverse(old)
- local wen = utf8_reverse(new)
- local oldlast = utf8_gsub (old, ".*_", "_")
- local newlast = utf8_gsub (new, ".*_", "_")
- local i
- if utf8_find(newlast, "_") then
- i = utf8.len(newlast)
- end
- if i and i > maxlen - MinPart + 1 then
- k = MinPart + 1
- end
+ if flag and old ~= "" then
+% \end{macrocode}
+% |oldlast| and |newlast| hold the last (full) words to be compared
+% later:
+% \begin{macrocode}
+ local oldlast = utf8_gsub (old, ".*_", "")
+ local newlast = utf8_gsub (new, ".*_", "")
+% \end{macrocode}
+% Let’s look for a partial match: build |oldsub| and |newsub|,
+% reading (backwards) the last |MinPart| \emph{non-space} characters
+% of both lines.
+% \begin{macrocode}
local oldsub = ""
local newsub = ""
+ local dlo = utf8_reverse(old)
+ local wen = utf8_reverse(new)
for p, c in utf8.codes(dlo) do
- if utf8.len(oldsub) < k then
+ local s = utf8_gsub(oldsub, "_", "")
+ if utf8_len(s) < MinPart then
oldsub = utf8.char(c) .. oldsub
end
end
for p, c in utf8.codes(wen) do
- if utf8.len(newsub) < k then
+ local s = utf8_gsub(newsub, "_", "")
+ if utf8_len(s) < MinPart then
newsub = utf8.char(c) .. newsub
end
end
- local l = utf8.len(new)
- if oldsub == newsub and l >= k then
+ if oldsub == newsub then
%<dbg> texio.write_nl("EOLnewsub=" .. newsub)
match = true
- elseif oldlast == newlast and utf8.len(newlast) > MinFull then
+ end
+ if oldlast == newlast and utf8_len(newlast) >= MinFull then
%<dbg> texio.write_nl("EOLnewlast=" .. newlast)
+ if utf8_len(newlast) > MinPart or not match then
+ oldsub = oldlast
+ newsub = newlast
+ end
match = true
- oldsub = oldlast
- newsub = newlast
- k = utf8.len(newlast)
end
if match then
% \end{macrocode}
-% Minimal partial match; any more glyphs matching?
+% Minimal full or partial match |newsub| of length |k|;
+% any more glyphs matching?
% \begin{macrocode}
- local osub = oldsub
- local nsub = newsub
- while osub == nsub and k <= maxlen do
- k = k +1
- osub = string.sub(old,-k)
- nsub = string.sub(new,-k)
+ local k = utf8_len(newsub)
+ local osub = utf8_reverse(oldsub)
+ local nsub = utf8_reverse(newsub)
+ while osub == nsub and k < maxlen do
+ k = k + 1
+ osub = utf8_sub(dlo,1,k)
+ nsub = utf8_sub(wen,1,k)
if osub == nsub then
- newsub = nsub
+ newsub = utf8_reverse(nsub)
end
end
- newsub = utf8_gsub(newsub, "^_", "")
+ newsub = utf8_gsub(newsub, "^_+", "")
%<dbg> texio.write_nl("EOLfullmatch=" .. newsub)
local msg = "E.O.L. MATCH=" .. newsub
log_flaw(msg, line, colno, footnote)
% \end{macrocode}
% Lest’s colour the matching string.
% \begin{macrocode}
+ local ns = utf8_gsub(newsub, "_", "")
+ k = utf8_len(ns)
oldsub = utf8_reverse(newsub)
local newsub = ""
local n = lastn
- repeat
- if n and n.id ~= GLUE then
+ local l = 0
+ local lo = 0
+ local li = 0
+ while n and newsub ~= oldsub and l < k do
+ if n and n.id == HLIST then
+ local first = n.head
+ for nn in traverse_id(GLYPH, first) do
+ color_node(nn, COLOR)
+ local c = nn.char
+ if not char_to_discard[c] then l = l + 1 end
+ end
+%<dbg> texio.write_nl("l (box)=" .. l)
+ elseif n then
color_node(n, COLOR)
- l, newsub = signature(n, newsub, swap)
- elseif n and n.id == GLUE then
- newsub = newsub .. "_"
- elseif not n and box then
- n = box
- else
- break
+ li, newsub = signature(n, newsub, swap)
+ l = l + li - lo
+ lo = li
+%<dbg> texio.write_nl("l=" .. l)
end
n = n.prev
- until newsub == oldsub or l >= k
+ end
end
end
end
@@ -1568,41 +1602,42 @@ local check_line_first_word = function (old, node, line, colno, flag)
local swap = false
local new = ""
local maxlen = 0
+ local MinFull = luatypo.MinFull
+ local MinPart = luatypo.MinPart
local n = node
local box, go
while n and n.id ~= GLYPH and n.id ~= DISC and
(n.id ~= HLIST or n.subtype == INDENT) do
n = n.next
end
- local start = n
- if n and n.id == HLIST then
- box = n
- start = n.head
- n = n.head
- end
- while n and n.id ~= GLUE do
- maxlen, new = signature (n, new, swap)
- n = n.next
- end
- if n and n.id == GLUE then
- new = new .. "_"
- go = true
- elseif box and not n then
- local bn = box.next
- if bn.id == GLUE then
- new = new .. "_"
- n = bn
- else
- n = box
- end
- go = true
- end
- if go then
- repeat
- n = n.next
- maxlen, new = signature (n, new, swap)
- until not n or n.id == GLUE
+ start = n
+ local words = 0
+ while n and (words <= 2 or maxlen < MinPart) do
+ if n and n.id == HLIST then
+ box = n
+ n = n.head
+ while n do
+ maxlen, new = signature (n, new, swap)
+ n = n.next
+ end
+ n = box.next
+ local w = utf8_gsub(new, "_", "")
+ words = words + utf8_len(new) - utf8_len(w) + 1
+ else
+ repeat
+ maxlen, new = signature (n, new, swap)
+ n = n.next
+ until not n or n.id == GLUE or n.id == HLIST
+ if n and n.id == GLUE then
+ maxlen, new = signature (n, new, swap)
+ words = words + 1
+ n = n.next
+ end
+ end
end
+ new = utf8_gsub(new, "_+$", "") -- $
+ new = utf8_gsub(new, "^_+", "")
+ maxlen = math.min(utf8_len(old), utf8_len(new))
%<dbg> texio.write_nl("BOLsigold=" .. old)
%<dbg> texio.write(" BOLsig=" .. new)
% \end{macrocode}
@@ -1610,77 +1645,82 @@ local check_line_first_word = function (old, node, line, colno, flag)
% the first word’s signature, but doesn’t compare it with the
% previous line’s.
% \begin{macrocode}
- if flag then
- local MinFull = luatypo.MinFull
- local MinPart = luatypo.MinPart
- MinFull = math.min(MinPart,MinFull)
- local k = MinPart
- local oldfirst = utf8_gsub (old, "_.*", "_")
- local newfirst = utf8_gsub (new, "_.*", "_")
- local i
- if utf8_find(newfirst, "_") then
- i = utf8.len(newfirst)
- end
- if i and i <= MinPart then
- k = MinPart + 1
- end
+ if flag and old ~= "" then
+ local oldfirst = utf8_gsub (old, "_.*", "")
+ local newfirst = utf8_gsub (new, "_.*", "")
local oldsub = ""
local newsub = ""
for p, c in utf8.codes(old) do
- if utf8.len(oldsub) < k then oldsub = oldsub .. utf8.char(c) end
+ local s = utf8_gsub(oldsub, "_", "")
+ if utf8_len(s) < MinPart then
+ oldsub = oldsub .. utf8.char(c)
+ end
end
for p, c in utf8.codes(new) do
- if utf8.len(newsub) < k then newsub = newsub .. utf8.char(c) end
+ local s = utf8_gsub(newsub, "_", "")
+ if utf8_len(s) < MinPart then
+ newsub = newsub .. utf8.char(c)
+ end
end
- local l = utf8.len(newsub)
- if oldsub == newsub and l >= k then
+ if oldsub == newsub then
%<dbg> texio.write_nl("BOLnewsub=" .. newsub)
match = true
- elseif oldfirst == newfirst and utf8.len(newfirst) > MinFull then
+ end
+ if oldfirst == newfirst and utf8_len(newfirst) >= MinFull then
%<dbg> texio.write_nl("BOLnewfirst=" .. newfirst)
+ if utf8_len(newfirst) > MinPart or not match then
+ oldsub = oldfirst
+ newsub = newfirst
+ end
match = true
- oldsub = oldfirst
- newsub = newfirst
- k = utf8.len(newfirst)
end
if match then
% \end{macrocode}
-% Minimal partial match; any more glyphs matching?
+% Minimal full or partial match |newsub| of length |k|;
+% any more glyphs matching?
% \begin{macrocode}
+ local k = utf8_len(newsub)
local osub = oldsub
local nsub = newsub
- while osub == nsub and k <= maxlen do
+ while osub == nsub and k < maxlen do
k = k + 1
- osub = string.sub(old,1,k)
- nsub = string.sub(new,1,k)
+ osub = utf8_sub(old,1,k)
+ nsub = utf8_sub(new,1,k)
if osub == nsub then
newsub = nsub
end
end
- newsub = utf8_gsub(newsub, "_$", "") --$
+ newsub = utf8_gsub(newsub, "_+$", "") --$
%<dbg> texio.write_nl("BOLfullmatch=" .. newsub)
local msg = "B.O.L. MATCH=" .. newsub
log_flaw(msg, line, colno, footnote)
% \end{macrocode}
% Lest’s colour the matching string.
% \begin{macrocode}
+ local ns = utf8_gsub(newsub, "_", "")
+ k = utf8_len(ns)
oldsub = newsub
local newsub = ""
- local k = utf8.len(oldsub)
local n = start
- repeat
- if n and n.id ~= GLUE then
+ local l = 0
+ local lo = 0
+ local li = 0
+ while n and newsub ~= oldsub and l < k do
+ if n and n.id == HLIST then
+ local nn = n.head
+ for nnn in traverse(nn) do
+ color_node(nnn, COLOR)
+ local c = nn.char
+ if not char_to_discard[c] then l = l + 1 end
+ end
+ elseif n then
color_node(n, COLOR)
- l, newsub = signature(n, newsub, swap)
- elseif n and n.id == GLUE then
- newsub = newsub .. "_"
- elseif not n and box then
- n = box
- else
- break
+ li, newsub = signature(n, newsub, swap)
+ l = l + li - lo
+ lo = li
end
n = n.next
- until newsub == oldsub or l >= k
+ end
end
end
return new, match
@@ -1689,9 +1729,10 @@ end
%
% \changes{v0.65}{2023/03/02}{New `check\_page\_first\_word’ function.}
%
+% \enlargethispage*{\baselineskip}
% The next function checks the first word on a new page: if
-% it ends a sentence and is short (up to |luatypoMinLen| characters),
-% the function returns |true| and colors the offending word.
+% it ends a sentence and is short (up to |\luatypoMinLen| characters),
+% the function returns |true| and colours the offending word.
% Otherwise it just retrurs |false|.
% The function requires two arguments: the line’s first node and
% a column number (possibly |nil|).
@@ -1702,7 +1743,7 @@ local check_page_first_word = function (node, colno)
local match = false
local swap = false
local new = ""
- local maxlen = luatypo.MinLen
+ local minlen = luatypo.MinLen
local len = 0
local n = node
local pn
@@ -1718,7 +1759,7 @@ local check_page_first_word = function (node, colno)
repeat
len, new = signature (n, new, swap)
n = n.next
- until len > maxlen or (n and n.id == GLYPH and eow_char[n.char]) or
+ until len > minlen or (n and n.id == GLYPH and eow_char[n.char]) or
(n and n.id == GLUE) or
(n and n.id == KERN and n.subtype == 1)
% \end{macrocode}
@@ -1729,7 +1770,7 @@ local check_page_first_word = function (node, colno)
pn = n
n = n.next
end
- if len <= maxlen and n and n.id == GLYPH and eow_char[n.char] then
+ if len <= minlen and n and n.id == GLYPH and eow_char[n.char] then
match =true
if pn and (pn.id == GLUE or pn.id == KERN) then
new = new .. " "
@@ -1900,6 +1941,33 @@ end
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{check-EOP}
+% This function looks ahead of |node| in search of a page end
+% or a footnote rule and returns the flags |page_bottom| and
+% |body_bottom| [used in text and display math lines].
+% \begin{macrocode}
+local check_EOP = function (node)
+ local n = node
+ local page_bot = false
+ local body_bot = false
+ while n and (n.id == GLUE or n.id == PENALTY or
+ n.id == WHATSIT ) do
+ n = n.next
+ end
+ if not n then
+ page_bot = true
+ body_bot = true
+ elseif footnoterule_ahead(n) then
+ body_bot = true
+%<dbg> texio.write_nl("=> FOOTNOTE RULE ahead")
+%<dbg> texio.write_nl("check_vtop: last line before footnotes")
+%<dbg> texio.write_nl(" ")
+ end
+ return page_bot, body_bot
+end
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{get-pagebody}
% The next function scans the \node{vlist}s on the current
% page in search of the page body.
@@ -1970,7 +2038,8 @@ end
% if a two columns box starts.}
%
% \begin{macrocode}
-check_vtop = function (head, colno, vpos)
+check_vtop = function (top, colno, vpos)
+ local head = top.list
local PAGEmin = luatypo.PAGEmin
local HYPHmax = luatypo.HYPHmax
local LLminWD = luatypo.LLminWD
@@ -2045,20 +2114,7 @@ check_vtop = function (head, colno, vpos)
% This has to be known early in order to set the flags |orphanflag|
% and |ftnsplit|.
% \begin{macrocode}
- local n = nextnode
- while n and (n.id == GLUE or n.id == PENALTY or
- n.id == WHATSIT ) do
- n = n.next
- end
- if not n then
- page_bottom = true
- body_bottom = true
- elseif footnoterule_ahead(n) then
- body_bottom = true
-%<dbg> texio.write_nl("=> FOOTNOTE RULE ahead")
-%<dbg> texio.write_nl("check_vtop: last line before footnotes")
-%<dbg> texio.write_nl(" ")
- end
+ page_bottom, body_bottom = check_EOP (nextnode)
% \end{macrocode}
% Is the current line overfull or underfull?
% \changes{v0.50}{2021/05/13}{Detection of overfull boxes fixed: the
@@ -2224,7 +2280,7 @@ check_vtop = function (head, colno, vpos)
% (except lists)?
% \begin{macrocode}
if FirstWordMatch then
- local flag = not ListItem
+ local flag = not ListItem and (line > 1)
firstwd, flag =
check_line_first_word(firstwd, first, line, colno, flag)
if flag then
@@ -2236,11 +2292,12 @@ check_vtop = function (head, colno, vpos)
% \begin{macrocode}
if LastWordMatch then
local flag = true
- if PFskip > BackPI then
+ if PFskip > BackPI or line == 1 then
flag = false
end
+ local pnp = pn.prev
lastwd, flag =
- check_line_last_word(lastwd, pn, line, colno, flag)
+ check_line_last_word(lastwd, pnp, line, colno, flag)
if flag then
pageflag = true
end
@@ -2293,7 +2350,7 @@ check_vtop = function (head, colno, vpos)
if LastWordMatch then
local flag = true
lastwd, flag =
- check_line_last_word(lastwd, ln, line, colno, flag)
+ check_line_last_word(lastwd, pn, line, colno, flag)
if flag then
pageflag = true
end
@@ -2412,6 +2469,11 @@ check_vtop = function (head, colno, vpos)
line = pageline
end
% \end{macrocode}
+% Is this line the last one on the page or before footnotes?
+% (information needed to set the |pageshort| flag).
+% \begin{macrocode}
+ page_bottom, body_bottom = check_EOP (nextnode)
+% \end{macrocode}
% Let’s check for an ``Overfull box’’. For a displayed equation
% it is straightforward. A set of aligned equations all have the
% same (maximal) width; in order to avoid highlighting the whole
@@ -2451,15 +2513,17 @@ check_vtop = function (head, colno, vpos)
end
end
elseif head and head.id == RULE and head.subtype == 0 then
+ vpos = vpos + head.height + head.depth
% \end{macrocode}
-% This is a \node{rule}, possibly a footnote rule.
+% This is a \node{rule}, possibly a footnote rule. It has most likely
+% been detected on the previous line (then |body_bottom=true|) but
+% might have no text before (footnote-only page!).
% \begin{macrocode}
- vpos = vpos + head.height + head.depth
- if body_bottom then
+ local prev = head.prev
+ if body_bottom or footnoterule_ahead (prev) then
% \end{macrocode}
-% If a |\footnoterule| has been detected on the previous run,
-% set the |footnote| flag and reset some counters and flags
-% for the coming footnote lines.
+% If it is, set the |footnote| flag and reset some counters
+% and flags for the coming footnote lines.
% \begin{macrocode}
%<dbg> texio.write_nl("check_vtop: footnotes start")
%<dbg> texio.write_nl(" ")
@@ -2489,10 +2553,9 @@ check_vtop = function (head, colno, vpos)
%<dbg> texio.write(" textheight=" .. tht_pt)
%<dbg> end
%<dbg> texio.write_nl(" ")
- if pageline > 1 and pageline < PAGEmin and ShortPages then
+ if pageline > 1 and pageline < PAGEmin
+ and vpos < vpos_min and ShortPages then
pageshort = true
- end
- if pageshort and vpos < vpos_min then
pageflag = true
local msg = "SHORT PAGE: only " .. pageline .. " lines"
log_flaw(msg, line, colno, footnote)
@@ -2509,7 +2572,7 @@ check_vtop = function (head, colno, vpos)
% \end{macrocode}
% Increment |vpos| on other vertical glues.
% \begin{macrocode}
- vpos = vpos + effective_glue(head,body)
+ vpos = vpos + effective_glue(head,top)
elseif head.id == KERN and head.subtype == 1 then
% \end{macrocode}
% This is a vertical kern, let’s update |vpos|.
@@ -2614,7 +2677,7 @@ luatypo.check_page = function (head)
%<dbg> texio.write("-" .. top.subtype)
%<dbg> texio.write(" wd=" .. boxwd .. " ht=" .. boxht)
%<dbg> texio.write_nl(" ")
- local next = check_vtop(first,colno,vpos)
+ local next = check_vtop(top,colno,vpos)
if next then
top = next
elseif top then
@@ -2630,9 +2693,8 @@ luatypo.check_page = function (head)
%<dbg> texio.write_nl("**MULTICOL type1:")
%<dbg> texio.write_nl(" ")
colno = 0
- for n in traverse_id(VLIST, first) do
+ for col in traverse_id(VLIST, first) do
colno = colno + 1
- col = n.list
%<dbg> texio.write_nl("Start of col." .. colno)
%<dbg> texio.write_nl(" ")
check_vtop(col,colno,vpos)
@@ -2658,9 +2720,8 @@ luatypo.check_page = function (head)
colno = 0
for n in traverse_id(HLIST, first) do
colno = colno + 1
- local nn = n.list
- if nn and nn.list then
- col = nn.list
+ local col = n.list
+ if col and col.list then
%<dbg> texio.write_nl("Start of col." .. colno)
%<dbg> texio.write_nl(" ")
check_vtop(col,colno,vpos)
@@ -2739,7 +2800,7 @@ return luatypo.check_page
\luatypoStretchMax=200\relax
\luatypoHyphMax=2\relax
\luatypoPageMin=5\relax
- \luatypoMinFull=4\relax
+ \luatypoMinFull=3\relax
\luatypoMinPART=4\relax
\luatypoMinLen=4\relax
}%
diff --git a/systems/texlive/tlnet/tlpkg/installer/ctan-mirrors.pl b/systems/texlive/tlnet/tlpkg/installer/ctan-mirrors.pl
index 0605333c4d..aaf2e6d906 100644
--- a/systems/texlive/tlnet/tlpkg/installer/ctan-mirrors.pl
+++ b/systems/texlive/tlnet/tlpkg/installer/ctan-mirrors.pl
@@ -1,5 +1,8 @@
$mirrors = {
'Africa' => {
+ 'Morocco' => {
+ 'https://mirror.marwan.ma/ctan/' => 1,
+ },
'South Africa' => {
'http://ftp.sun.ac.za/ftp/CTAN/' => 1,
'https://mirror.ufs.ac.za/ctan/' => 1,
@@ -147,6 +150,7 @@ $mirrors = {
'https://ctan.altspu.ru/' => 1,
'https://mirror.macomnet.net/pub/CTAN/' => 1,
'https://mirror.truenetwork.ru/CTAN/' => 1,
+ 'https://mirrors.mi-ras.ru/CTAN/' => 1,
},
'Slovenia' => {
'https://ctan.ijs.si/tex-archive/' => 1,
@@ -161,6 +165,7 @@ $mirrors = {
'https://ftpmirror1.infania.net/mirror/CTAN/' => 1,
},
'Switzerland' => {
+ 'https://mirror.foobar.to/CTAN/' => 1,
'https://mirror.init7.net/ctan/' => 1,
'https://mirror.metanet.ch/tex-archive/' => 1,
},
diff --git a/systems/texlive/tlnet/tlpkg/texlive.tlpdb b/systems/texlive/tlnet/tlpkg/texlive.tlpdb
index bdb87a8997..558e59a0c6 100644
--- a/systems/texlive/tlnet/tlpkg/texlive.tlpdb
+++ b/systems/texlive/tlnet/tlpkg/texlive.tlpdb
@@ -26,7 +26,7 @@ depend container_split_src_files/1
depend frozen/0
depend minrelease/2016
depend release/2023
-depend revision/66835
+depend revision/66840
name 00texlive.image
category TLCore
@@ -4726,7 +4726,7 @@ depend setting_available_architectures:aarch64-linux amd64-freebsd amd64-netbsd
name 00texlive.installer
category TLCore
-revision 66830
+revision 66837
shortdesc TeX Live standalone installer package
longdesc This package defines the files to go into the installer
longdesc archives (install-tl-unx.tar.gz, install-tl.zip) built by the
@@ -59227,7 +59227,7 @@ catalogue-version 1.6.1
name citation-style-language
category Package
-revision 66749
+revision 66838
shortdesc Bibliography formatting with Citation Style Language
longdesc The Citation Style Language (CSL) is an XML-based language that
longdesc defines the formats of citations and bibliography. There are
@@ -59249,10 +59249,10 @@ depend lualibs
depend luatex
depend luaxml
depend url
-containersize 2799724
-containerchecksum b3945b7a2ee37ddff95eec93ecf95e339ffaaace844064b8f788e64f3fc5e19518101ddaaa719a69039e933e6a57fee3a7ba82b8c84ac9c800fbd88507580c76
-doccontainersize 248144
-doccontainerchecksum de0613b4fed834bbb210d121fb1f610b7e9a1c97fd102c8f5e52f1216d2b9294aeb16432fa9256d0ece2c9654572d3a2b7556944914c77d85ea13522d9b5541c
+containersize 2806936
+containerchecksum 77afc111bb6509899f3e4d320b1944b60e54e39358583d793b79bb17afaff34e9ca76515f3d7b79f48f811651edcb4ead774fbc20c6bbad0cd7092ea16c3045c
+doccontainersize 248300
+doccontainerchecksum af28fe09cfb4ea7e80f2100b3bcb64299e1aaac0f0c8db6fd740d503238dd0813519c4009a534444eafa6a0cbce1ebd696ba8283cd2a9ec9d3180c4cc4664c7f
docfiles size=71
texmf-dist/doc/latex/citation-style-language/CHANGELOG.md
texmf-dist/doc/latex/citation-style-language/DEPENDS.txt
@@ -59261,7 +59261,7 @@ docfiles size=71
texmf-dist/doc/latex/citation-style-language/citation-style-language-doc.tex
texmf-dist/doc/man/man1/citeproc-lua.1
texmf-dist/doc/man/man1/citeproc-lua.man1.pdf
-runfiles size=4145
+runfiles size=4162
texmf-dist/scripts/citation-style-language/citeproc-bibtex-data.lua
texmf-dist/scripts/citation-style-language/citeproc-bibtex-parser.lua
texmf-dist/scripts/citation-style-language/citeproc-bibtex2csl.lua
@@ -59294,6 +59294,11 @@ runfiles size=4145
texmf-dist/scripts/citation-style-language/citeproc-unicode.lua
texmf-dist/scripts/citation-style-language/citeproc-util.lua
texmf-dist/scripts/citation-style-language/citeproc.lua
+ texmf-dist/tex/latex/citation-style-language/citation-style-language-bib.sty
+ texmf-dist/tex/latex/citation-style-language/citation-style-language-cite.sty
+ texmf-dist/tex/latex/citation-style-language/citation-style-language-compatible.sty
+ texmf-dist/tex/latex/citation-style-language/citation-style-language-data.sty
+ texmf-dist/tex/latex/citation-style-language/citation-style-language-init.sty
texmf-dist/tex/latex/citation-style-language/citation-style-language.sty
texmf-dist/tex/latex/citation-style-language/styles/american-chemical-society.csl
texmf-dist/tex/latex/citation-style-language/styles/american-medical-association.csl
@@ -59368,7 +59373,7 @@ catalogue-contact-repository https://github.com/zepinglee/citeproc-lua
catalogue-ctan /biblio/citation-style-language
catalogue-license mit cc-by-sa-3
catalogue-topics biblio use-lua
-catalogue-version 0.4.0
+catalogue-version 0.4.1
name citation-style-language.aarch64-linux
category Package
@@ -171588,7 +171593,7 @@ catalogue-version 0.1
name lastpage
category Package
-revision 66461
+revision 66839
shortdesc Reference last page for Page N of M type footers
relocated 1
longdesc Reference the number of pages in your LaTeX document through
@@ -171597,16 +171602,16 @@ longdesc \pageref{LastPage} to give a reference to the last page of a
longdesc document. It is particularly useful in the page footer that
longdesc says: Page N of M.
containersize 3980
-containerchecksum 05dd2ff6bd9b203950c68f373dc908c8be572ce9a86342e420d5195914834b065a98723dcfc5c3191497502f7eab01c228b0899f7d4d391f04d39e9354df09d3
-doccontainersize 555364
-doccontainerchecksum 3ab2b7b8c80450e60abbc5608f06d6bd482387d7c78ad1dc3fc0b0a7be6ab6de23ae4ced788a7d91fe5de2d97efc1addf216267de2c4fe323525567b82761034
+containerchecksum 4416b9e9b7a15856f2232e9f64d4643e90b83c5f6dbccee3a50b1afea9e7e56aff589d6debcc203c94a03fd18e5af2eb8759dfe47a08f84bf18502d88b650944
+doccontainersize 555388
+doccontainerchecksum 233bd750e64aa22059f7e91d7db4d4da6f7d17123a21030b05b670942b831e845f49306b5689fac61918b38c92e30b98fb839d517d01e0c5a049456bed255170
docfiles size=144
RELOC/doc/latex/lastpage/README details="Readme"
RELOC/doc/latex/lastpage/lastpage-example.pdf details="Package examples"
RELOC/doc/latex/lastpage/lastpage-example.tex
RELOC/doc/latex/lastpage/lastpage.pdf details="Package documentation"
-srccontainersize 20892
-srccontainerchecksum a3eeac9547bf740c19b8ab7691e0a0d92a3cf173473e2e33248a87275f3a1c7a48f378996a0f2306b061e4ef529a6be8b4f14a4feb69341537b91e63afd8a79a
+srccontainersize 20980
+srccontainerchecksum 1c21b8fa2b51c2841933f5dcb9d65ff05f915bb12d85bf0007f3bd1874dbc1c85fe245d67d34f54fafc2ab9e6e46c3f39fb10c296ca7b68067233ab5428f7cd7
srcfiles size=27
RELOC/source/latex/lastpage/lastpage.drv
RELOC/source/latex/lastpage/lastpage.dtx
@@ -171621,7 +171626,7 @@ catalogue-also totpages
catalogue-ctan /macros/latex/contrib/lastpage
catalogue-license lppl1.3c
catalogue-topics label-ref
-catalogue-version 2.0a
+catalogue-version 2.0b
name latex
category Package
@@ -283230,7 +283235,7 @@ catalogue-version 1.36
name siunitx
category Package
-revision 66761
+revision 66840
shortdesc A comprehensive (SI) units package
relocated 1
longdesc Typesetting values with units requires care to ensure that the
@@ -283255,17 +283260,17 @@ longdesc The package relies on LaTeX 3 support from the l3kernel and
longdesc l3packages bundles.
depend l3kernel
depend l3packages
-containersize 66180
-containerchecksum aaded1fccb8703c0b05561a7c76194b37852ad7ae90bf582a0284514a7af579864a748365084ace80123fb952bfe02ab2cf47751ff84c80933ff745f33c19dae
-doccontainersize 1268776
-doccontainerchecksum d5978edf99346c8fb51a6825d39061064044bc4bcd26e6f3689e83d57cdf77e672f496e76adb658628919ae84aa49d0d66c2fdfc6fb70f2c56c6bd9c3065f1b1
+containersize 66152
+containerchecksum 15c49d43768bb8b00e904a2914f1b7ed838ebe0b910436a44f4e9bec41e754b3a44a111063e9103ded7dc171ccebb42c34b244a02056c5c10bd042911b117fca
+doccontainersize 1269264
+doccontainerchecksum 76de156b181db7dbf41d868570bea5e3bcf6bc6865f36bbdd9b303e9aa670cef843ed47a215b8fa0da31032a72342f844110943670e004a315fa031fdd4b5d38
docfiles size=345
RELOC/doc/latex/siunitx/CHANGELOG.md
RELOC/doc/latex/siunitx/README.md details="Readme"
RELOC/doc/latex/siunitx/siunitx-code.pdf details="Code documentation"
RELOC/doc/latex/siunitx/siunitx.pdf details="User manual"
-srccontainersize 118132
-srccontainerchecksum e7068687ab67e410c600eac46672661991bd8c22882d6d1fea199f78d12d03141d02083e9a9ea06d1a40d8436b38cc376fcd9b9a8f683208ae379ec97fd93205
+srccontainersize 118136
+srccontainerchecksum 6a4030fa7138851bdc8e650577210b07e64b4cec2554e68457c0201a12df1b5f2d8162e903188917e9673bbb836f7ef5df5fdac52cd4b8b3cb01391eb294842f
srcfiles size=183
RELOC/source/latex/siunitx/siunitx-abbreviation.dtx
RELOC/source/latex/siunitx/siunitx-angle.dtx
@@ -283297,7 +283302,7 @@ catalogue-contact-repository https://github.com/josephwright/siunitx
catalogue-ctan /macros/latex/contrib/siunitx
catalogue-license lppl1.3c
catalogue-topics units scientific-docs expl3
-catalogue-version 3.2.4
+catalogue-version 3.2.5
name skak
category Package
@@ -311609,7 +311614,7 @@ docfiles size=376
name texlive-scripts
category TLCore
-revision 66830
+revision 66837
shortdesc TeX Live infrastructure programs
longdesc Includes install-tl, tl-portable, rungs, etc.; not needed for
longdesc tlmgr to run but still ours. Not included in tlcritical.
@@ -311617,10 +311622,10 @@ depend texlive-scripts.ARCH
depend texlive.infra
execute addMap mathpple.map
postaction shortcut type=menu name="TeX Live command-line" cmd=TEXDIR/tlpkg/installer/tl-cmd.bat
-containersize 114032
-containerchecksum 0195ff6e25d7a5d6981c5bfee41935773153ba781e3a6c8b9575385f34e5b4b1991ace24064c39267fa16aa03271e0132ca95f40474bccc7c6b18cc388a1666e
-doccontainersize 423760
-doccontainerchecksum 4a5c5c54083cb46d2f53ec9e60a086e2b2e6d840d01433cafc3f7722c270c65b3893d8dba5018c76c2df98d1dd9c16d5b36100bca82e3f909219d5c3dd052410
+containersize 114060
+containerchecksum 4ce26187bfd0b92d573a4da917db21e13eb57b96a0057bc06ef4a1477fe2b004414c003876f2222a5094960f566e18ebafe7db5100256b71ce843c3fcac27ffe
+doccontainersize 423776
+doccontainerchecksum e55b3d9ff696b239460b8970f174300030ef1ed1ca391e6176c2f176ad82446325d9627ce6afd6d892c8395f1630521a104856debdba9e9cad35723267453057
docfiles size=538
doc.html
texmf-dist/doc/man/man1/fmtutil-sys.1
diff --git a/systems/texlive/tlnet/tlpkg/texlive.tlpdb.md5 b/systems/texlive/tlnet/tlpkg/texlive.tlpdb.md5
index 1ae27208e8..5880bca770 100644
--- a/systems/texlive/tlnet/tlpkg/texlive.tlpdb.md5
+++ b/systems/texlive/tlnet/tlpkg/texlive.tlpdb.md5
@@ -1 +1 @@
-12427bfb52062ccf967015243553f3fa texlive.tlpdb
+27ec0b731d984200bd86acfb466c63dd texlive.tlpdb
diff --git a/systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512 b/systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512
index c683633df9..3c63563dba 100644
--- a/systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512
+++ b/systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512
@@ -1 +1 @@
-2ced44677ef62b1bc24259221ebba4714b588e14722b7ab64561e0dfda09a54b9c166463fed57aea43f6b9622b30cc90eddd0340790ce8b038e70140b917593e texlive.tlpdb
+c2d7c3f11671a982d8dee5a676786efdcb53f2078c81507442315501fa9047c1f772fe18268349139ec9a7eae0e96d5a6d873fe9bcb65b8e1456ff0cf6752503 texlive.tlpdb
diff --git a/systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512.asc b/systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512.asc
index 09e090d316..2416bd1775 100644
--- a/systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512.asc
+++ b/systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512.asc
@@ -1,10 +1,10 @@
-----BEGIN PGP SIGNATURE-----
-iQEcBAEBCgAGBQJkN0RwAAoJEEzhh34ZQ4xw9bgH/16dawAsViJHDava8jl3/jsE
-ZPgdNa83uWTluzSbcJhn7OZa5v6ggZWUR0JeKqhpDf/v9LqDWGtJFhHQMoFa3HQh
-6wMNBzp+jbnlPgVRsscDc+8N8JOVeFOHYKRkRJGh6bWHiLUzUdyV9mxblD1oPZIL
-WBv6LLa2bjrdroIcvbl8x2WrfD9tLm66qQbtD3gloDF8jeDzdj++VyyG7HwqNisi
-j04hm7OVINd0WpXGLvTOxUZl4+kWsV2KdEmmgzeIS2FFAhYSngnrjXeZhxmxV127
-U903mJC6+QOfyl0LAxWRI/EiUJ/8D8jWX3od+pImBckevSaIUD2wJvroYG49skI=
-=jQw/
+iQEcBAEBCgAGBQJkOJW3AAoJEEzhh34ZQ4xw0nQH/0j8gU9hEUtl1aTMu0usg8Me
+RzpALOwR2zqi2mtcByVjkVoZ1QLZteAEsguB7b3pQkJd8TXxD9ULKzFj84t+7su8
+qXGZKlNpF6zjZURbmhCBWXNJtDkj0cdYu7cKhBCfLBBRejLWQEAapry1vS9Uze7T
+77IXelM0zlTF16c2/buLvSyg9ccwYdtwvai8flrRCHBmbH/YuXgPZxTdrESj8G+C
+nZpVyVCXXVZAdjBGntJNt148xlGxK2RU1xOUDLMRD1bfvngNKoJEgiTdvaiVFYkt
+vgbIY1GEETRMxJdvkyy/dB99NBFxP7DXFSusPC8HmcSnWJT0nvrNKnhi/DbrgGI=
+=LVOG
-----END PGP SIGNATURE-----
diff --git a/systems/texlive/tlnet/tlpkg/texlive.tlpdb.xz b/systems/texlive/tlnet/tlpkg/texlive.tlpdb.xz
index 34d63e0252..3c88a2fa4d 100644
--- a/systems/texlive/tlnet/tlpkg/texlive.tlpdb.xz
+++ b/systems/texlive/tlnet/tlpkg/texlive.tlpdb.xz
Binary files differ
diff --git a/timestamp b/timestamp
index 885dac51da..fc1b443234 100644
--- a/timestamp
+++ b/timestamp
@@ -2,4 +2,4 @@
# The source CTAN of this site's material:
dante.ctan.org
# The year-month-day-hour-minute of this site's material:
-2023-04-13-02-02
+2023-04-14-02-02