texlive[72078] Master/texmf-dist: citation-style-language (21aug24)
commits+karl at tug.org
commits+karl at tug.org
Wed Aug 21 23:52:57 CEST 2024
Revision: 72078
https://tug.org/svn/texlive?view=revision&revision=72078
Author: karl
Date: 2024-08-21 23:52:57 +0200 (Wed, 21 Aug 2024)
Log Message:
-----------
citation-style-language (21aug24)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/citation-style-language/CHANGELOG.md
trunk/Master/texmf-dist/doc/latex/citation-style-language/citation-style-language-doc.pdf
trunk/Master/texmf-dist/doc/latex/citation-style-language/citation-style-language-doc.tex
trunk/Master/texmf-dist/doc/man/man1/citeproc-lua.1
trunk/Master/texmf-dist/doc/man/man1/citeproc-lua.man1.pdf
trunk/Master/texmf-dist/scripts/citation-style-language/citeproc-bibtex-data.lua
trunk/Master/texmf-dist/scripts/citation-style-language/citeproc-engine.lua
trunk/Master/texmf-dist/scripts/citation-style-language/citeproc-manager.lua
trunk/Master/texmf-dist/scripts/citation-style-language/citeproc.lua
trunk/Master/texmf-dist/tex/latex/citation-style-language/citation-style-language-cite.sty
trunk/Master/texmf-dist/tex/latex/citation-style-language/citation-style-language-compatible.sty
trunk/Master/texmf-dist/tex/latex/citation-style-language/citation-style-language-init.sty
trunk/Master/texmf-dist/tex/latex/citation-style-language/citation-style-language.sty
Modified: trunk/Master/texmf-dist/doc/latex/citation-style-language/CHANGELOG.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/citation-style-language/CHANGELOG.md 2024-08-21 17:32:18 UTC (rev 72077)
+++ trunk/Master/texmf-dist/doc/latex/citation-style-language/CHANGELOG.md 2024-08-21 21:52:57 UTC (rev 72078)
@@ -7,6 +7,17 @@
## [Unreleased]
+## [0.6.2] - 2024-08-21
+
+### Added
+
+- Add support for `perpage` package.
+
+### Fixed
+
+- Fix note position in multiple chapters ([#72](https://github.com/zepinglee/citeproc-lua/discussions/72)).
+- Fix incorrect locale map of UKenglish.
+
## [0.6.1] - 2024-08-15
### Fixed
@@ -220,7 +231,8 @@
- Initial CTAN release.
-[Unreleased]: https://github.com/zepinglee/citeproc-lua/compare/v0.6.1...HEAD
+[Unreleased]: https://github.com/zepinglee/citeproc-lua/compare/v0.6.2...HEAD
+[0.6.2]: https://github.com/zepinglee/citeproc-lua/compare/v0.6.1...v0.6.2
[0.6.1]: https://github.com/zepinglee/citeproc-lua/compare/v0.6.0...v0.6.1
[0.6.0]: https://github.com/zepinglee/citeproc-lua/compare/v0.5.1...v0.6.0
[0.5.1]: https://github.com/zepinglee/citeproc-lua/compare/v0.5.0...v0.5.1
Modified: trunk/Master/texmf-dist/doc/latex/citation-style-language/citation-style-language-doc.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/citation-style-language/citation-style-language-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/citation-style-language/citation-style-language-doc.tex 2024-08-21 17:32:18 UTC (rev 72077)
+++ trunk/Master/texmf-dist/doc/latex/citation-style-language/citation-style-language-doc.tex 2024-08-21 21:52:57 UTC (rev 72078)
@@ -51,7 +51,7 @@
}%
}
-\date{2024-08-15 v0.6.1}
+\date{2024-08-21 v0.6.2}
\maketitle
@@ -117,7 +117,7 @@
\begin{LaTeXdemo}
\documentclass{...}
- \usepackage[style = apa]{citation-style-language}
+ \usepackage[style=apa]{citation-style-language}
\addbibresource{bibfile.json}
\begin{document}
\cite{...}
@@ -165,7 +165,7 @@
with the \cs{cslsetup} command.
These two methods are equivalent.
\begin{LaTeXdemo}
- \usepackage[style = apa]{citation-style-langugage}
+ \usepackage[style=apa]{citation-style-langugage}
% OR
\usepackage{citation-style-langugage}
\cslsetup{style = apa}
Modified: trunk/Master/texmf-dist/doc/man/man1/citeproc-lua.1
===================================================================
--- trunk/Master/texmf-dist/doc/man/man1/citeproc-lua.1 2024-08-21 17:32:18 UTC (rev 72077)
+++ trunk/Master/texmf-dist/doc/man/man1/citeproc-lua.1 2024-08-21 21:52:57 UTC (rev 72078)
@@ -1,4 +1,4 @@
-.TH citeproc-lua 1 "0.6.1"
+.TH citeproc-lua 1 "0.6.2"
.SH NAME
citeproc-lua \- make CSL citations and bibliography for LaTeX
.SH SYNOPSIS
Modified: trunk/Master/texmf-dist/doc/man/man1/citeproc-lua.man1.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/scripts/citation-style-language/citeproc-bibtex-data.lua
===================================================================
--- trunk/Master/texmf-dist/scripts/citation-style-language/citeproc-bibtex-data.lua 2024-08-21 17:32:18 UTC (rev 72077)
+++ trunk/Master/texmf-dist/scripts/citation-style-language/citeproc-bibtex-data.lua 2024-08-21 21:52:57 UTC (rev 72078)
@@ -1,4 +1,4 @@
--- This file is generated from citeproc-bibtex-data.json by scripts/update-bibtex-data.py
+-- This file is generated from citeproc-bibtex-data.json by scripts/update_bibtex_data.py
return {
description = "BibTeX CSL mapping",
Modified: trunk/Master/texmf-dist/scripts/citation-style-language/citeproc-engine.lua
===================================================================
--- trunk/Master/texmf-dist/scripts/citation-style-language/citeproc-engine.lua 2024-08-21 17:32:18 UTC (rev 72077)
+++ trunk/Master/texmf-dist/scripts/citation-style-language/citeproc-engine.lua 2024-08-21 21:52:57 UTC (rev 72078)
@@ -49,12 +49,13 @@
local Position = util.Position
+--- at alias CitationId string
--- at alias ItemId string | number
--- at alias NoteIndex integer
---- at alias CitationId string
+--- at alias ChapterIndex number
--- at alias CitationData {citationID: CitationId, citationItems: CitationItem[], properties: CitationProperties, citation_index: integer}
---- at alias CitationProperties { noteIndex: integer, mode: string? }
+--- at alias CitationProperties { noteIndex: NoteIndex, chapterIndex: ChapterIndex, mode: string? }
--- at class NameVariable
--- at field family string?
@@ -294,14 +295,18 @@
end
+--- at alias PreCitation [CitationId, NoteIndex, ChapterIndex]
+--- at alias PostCitation [CitationId, NoteIndex, ChapterIndex]
+
--- at param citation CitationData
---- at param citationsPre (CitationId | NoteIndex)[]
---- at param citationsPost (CitationId | NoteIndex)[]
+--- at param citationsPre PreCitation[]
+--- at param citationsPost PostCitation[]
--- at return (table | (integer | string | CitationId)[])[]
function CiteProc:processCitationCluster(citation, citationsPre, citationsPost)
-- util.debug(string.format('processCitationCluster(%s)', citation.citationID))
self:check_valid_citation_element()
citation = self:normalize_citation_input(citation)
+ self:_check_input(citation, citationsPre, citationsPost)
-- Registor citation
self.registry.citations_by_id[citation.citationID] = citation
@@ -406,6 +411,9 @@
if not citation.properties.noteIndex then
citation.properties.noteIndex = 0
end
+ if not citation.properties.chapterIndex then
+ citation.properties.chapterIndex = 0
+ end
return citation
end
@@ -451,6 +459,86 @@
return cite_item
end
+--- at param citation CitationData
+--- at param citationsPre PreCitation[]
+--- at param citationsPost PostCitation[]
+function CiteProc:_check_input(citation, citationsPre, citationsPost)
+ --- at type {[CitationId]: boolean}
+ local citation_dict = {}
+ local last_note_number = 0
+ local last_chapter_number = 0
+
+ for i, pre_citation in ipairs(citationsPre) do
+ local citation_id = pre_citation[1]
+ local note_number = pre_citation[2]
+ local chapter_number = pre_citation[3]
+ if citation_dict[citation_id] then
+ error(string.format("Previously referenced citationID '%s' encountered in citationsPre", citation_id))
+ end
+ if chapter_number and chapter_number > 0 then
+ if chapter_number < last_chapter_number then
+ util.warning(string.format("Chapter index sequence is not sane at citationsPre[%d]", i))
+ end
+ if chapter_number ~= last_chapter_number then
+ last_note_number = 0
+ end
+ last_chapter_number = chapter_number
+ end
+ if note_number and note_number > 0 then
+ if note_number < last_note_number then
+ util.warning(string.format("Note index sequence is not sane at citationsPre[%d]", i))
+ end
+ last_note_number = note_number
+ end
+ citation_dict[citation_id] = true
+ end
+
+ do
+ local citation_id = citation.citationID
+ local note_number = citation.properties.noteIndex
+ local chapter_number = citation.properties.chapterIndex
+ if (citation_dict[citation_id]) then
+ error("Citation with previously referenced citationID " .. citation_id)
+ end
+ if note_number and note_number > 0 then
+ if note_number < last_note_number then
+ util.warning("Note index sequence is not sane for citation " .. citation_id)
+ end
+ last_note_number = note_number
+ end
+ if chapter_number and chapter_number > 0 then
+ if chapter_number < last_chapter_number then
+ util.warning("Chapter index sequence is not sane for citation " .. citation_id)
+ end
+ last_chapter_number = chapter_number
+ end
+ citation_dict[citation_id] = true
+ end
+
+ for i, post_citation in ipairs(citationsPost) do
+ local citation_id = post_citation[1]
+ local note_number = post_citation[2]
+ local chapter_number = post_citation[3]
+ if citation_dict[citation_id] then
+ error(string.format("Previously referenced citationID '%s' encountered in citationsPost", citation_id))
+ end
+ if note_number and note_number > 0 then
+ if note_number < last_note_number then
+ util.warning(string.format("Note index sequence is not sane at citationsPost[%d]", i))
+ end
+ last_note_number = note_number
+ end
+ if chapter_number and chapter_number > 0 then
+ if chapter_number < last_chapter_number then
+ util.warning(string.format("Chapter index sequence is not sane at citationsPost[%d]", i))
+ end
+ last_chapter_number = chapter_number
+ end
+ citation_dict[citation_id] = true
+ end
+
+end
+
-- A variant of processCitationCluster() for easy use with LaTeX.
-- It should be run after refreshing the registry (updateItems()) with all items
function CiteProc:process_citation(citation)
@@ -517,6 +605,8 @@
-- have position properties.
local in_text_citations = {}
+ local last_chapter_number = 0
+
local previous_citation
for citation_index, pair in ipairs(citation_note_pairs) do
local citation_id, note_number = table.unpack(pair)
@@ -525,6 +615,15 @@
citation.properties.noteIndex = note_number
citation.citation_index = citation_index
+ local chapter_number = citation.properties.chapterIndex
+ if chapter_number and chapter_number ~= last_chapter_number then
+ self.cite_first_note_numbers = {}
+ self.cite_last_note_numbers = {}
+ self.note_citations_map = {}
+ previous_citation = nil
+ end
+
+
local tainted = false
local prev_citation = previous_citation
@@ -559,6 +658,8 @@
previous_citation = citation
end
end
+
+ last_chapter_number = chapter_number
end
-- Update tainted citation ids because of citation-number's change
Modified: trunk/Master/texmf-dist/scripts/citation-style-language/citeproc-manager.lua
===================================================================
--- trunk/Master/texmf-dist/scripts/citation-style-language/citeproc-manager.lua 2024-08-21 17:32:18 UTC (rev 72077)
+++ trunk/Master/texmf-dist/scripts/citation-style-language/citeproc-manager.lua 2024-08-21 21:52:57 UTC (rev 72078)
@@ -573,6 +573,15 @@
util.error(string.format("Invalid note index '%s'.", note_index))
end
+ local chapter_index = citation.properties.chapterIndex
+ if not chapter_index or chapter_index == "" then
+ citation.properties.chapterIndex = nil
+ elseif type(chapter_index) == "string" and string.match(chapter_index, "^%d+$") then
+ citation.properties.chapterIndex = tonumber(chapter_index)
+ else
+ util.error(string.format("Invalid chapter index '%s'.", chapter_index))
+ end
+
-- util.debug(citation)
return citation
end
Modified: trunk/Master/texmf-dist/scripts/citation-style-language/citeproc.lua
===================================================================
--- trunk/Master/texmf-dist/scripts/citation-style-language/citeproc.lua 2024-08-21 17:32:18 UTC (rev 72077)
+++ trunk/Master/texmf-dist/scripts/citation-style-language/citeproc.lua 2024-08-21 21:52:57 UTC (rev 72078)
@@ -16,7 +16,7 @@
util = require("citeproc.util")
end
-citeproc.__VERSION__ = "0.6.1"
+citeproc.__VERSION__ = "0.6.2"
citeproc.new = engine.CiteProc.new
citeproc.util = util
Modified: trunk/Master/texmf-dist/tex/latex/citation-style-language/citation-style-language-cite.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/citation-style-language/citation-style-language-cite.sty 2024-08-21 17:32:18 UTC (rev 72077)
+++ trunk/Master/texmf-dist/tex/latex/citation-style-language/citation-style-language-cite.sty 2024-08-21 21:52:57 UTC (rev 72078)
@@ -7,13 +7,33 @@
% ## Citation commands
\DeclareDocumentCommand \cite { s o o m }
- { \__csl_cite:nnnn {#1} {#2} {#3} {#4} }
+ {
+ \IfBooleanTF {#1}
+ {
+ \bool_if:NTF \l__csl_note_bool
+ { \__csl_cite_in_text:nnnn {#2} {#3} {#4} { } }
+ { \__csl_cite_in_text:nnnn {#2} {#3} {#4} { suppress-author } }
+ }
+ {
+ \bool_if:NTF \l__csl_note_bool
+ { \__csl_cite_note:nnnn {#2} {#3} {#4} { } }
+ { \__csl_cite_in_text:nnnn {#2} {#3} {#4} { } }
+ }
+ }
\NewDocumentCommand \parencite { s o o m }
- { \__csl_cite:nnnn {#1} {#2} {#3} {#4} }
+ {
+ \IfBooleanTF {#1}
+ {
+ \bool_if:NTF \l__csl_note_bool
+ { \__csl_cite_in_text:nnnn {#2} {#3} {#4} { } }
+ { \__csl_cite_in_text:nnnn {#2} {#3} {#4} { suppress-author } }
+ }
+ { \__csl_cite_parens:nnn {#2} {#3} {#4} }
+ }
\NewDocumentCommand \citep { o o m }
- { \__csl_cite:nnnn { \BooleanFalse } {#1} {#2} {#3} }
+ { \__csl_cite_parens:nnn {#1} {#2} {#3} }
\NewDocumentCommand \textcite { o o m }
{ \__csl_text_cite:nnn {#1} {#2} {#3} }
@@ -22,7 +42,7 @@
{ \__csl_text_cite:nnn {#1} {#2} {#3} }
\NewDocumentCommand \footcite { o o m }
- { \__csl_cite:nnnn { \BooleanFalse } {#1} {#2} {#3} }
+ { \__csl_cite_note:nnnn {#1} {#2} {#3} { } }
% \cites[⟨prenote⟩][⟨postnote⟩]{⟨key⟩}...[⟨prenote⟩][⟨postnote⟩]{⟨key⟩}
@@ -30,23 +50,16 @@
{ \__csl_cites: }
\NewDocumentCommand \citeauthor { o o m }
- { \__csl_cite_author:nnn {#1} {#2} {#3} }
+ { \__csl_cite_in_text:nnnn {#1} {#2} {#3} { author-only } }
% TODO: \citeyear
-% ATM the starred form is the same as non-star form.
-\NewDocumentCommand \citeyearpar { s o o m }
- {
- \IfBooleanT {#1}
- {
- \bool_if:NTF \l__csl_note_bool
- { \msg_error:nn { citation-style-language } { starred-cite-in-note-style } }
- }
- \__csl_cite_suppress_author:nnn {#2} {#3} {#4}
- }
+% Suppresses the author (from `natbib`).
+\NewDocumentCommand \citeyearpar { o o m }
+ { \__csl_cite_in_text:nnnn {#1} {#2} {#3} { suppress-author } }
\NewDocumentCommand \fullcite { o o m }
- { \__csl_full_cite:nnn {#1} {#2} {#3} }
+ { \__csl_cite_in_text:nnnn {#1} {#2} {#3} { full-cite } }
\seq_new:N \l__csl_cite_keys_seq
@@ -54,58 +67,94 @@
\prop_new:N \l__csl_citation_properties_prop
\prop_new:N \l__csl_citation_info_prop
-% \__csl_cite:nnnn #1#2#3#
-% #1: boolean of star form
-% #2: prenote
-% #3: postnote
-% #4: cite keys
-\cs_new:Npn \__csl_cite:nnnn #1#2#3#4
+% #1: prenote
+% #2: postnote
+% #3: cite keys
+% #4: mode
+\cs_new:Npn \__csl_cite_in_text:nnnn #1#2#3#4
{
- \tl_if_blank:nTF {#4}
- { \__csl_print_undefined_citation:n {#4} }
+ \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 {#2} {#3} {#4}
+ \__csl_process_cite_input:nnn {#1} {#2} {#3}
\__csl_process_citation_info:NN \l__csl_cite_keys_seq \l__csl_citation_items_seq
- \IfBooleanT {#1}
+ \prop_put:Nnn \l__csl_citation_properties_prop { noteIndex } { 0 }
+ \tl_if_empty:nF {#4}
{
- \bool_if:NTF \l__csl_note_bool
- { \msg_warning:nn { citation-style-language } { starred-cite-in-note-style } }
+ \prop_put:Nnn \l__csl_citation_properties_prop { mode } {#4}
+ }
+ \__csl_make_citation:N \l__csl_citation_info_prop
+ }
+ }
+
+% #1: prenote
+% #2: postnote
+% #3: cite keys
+% #4: mode
+\cs_new:Npn \__csl_cite_note:nnnn #1#2#3#4
+ {
+ \bool_if:NTF \l__csl_in_note_bool
+ {
+ \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
+ \tl_if_empty:nF {#4}
{
- \prop_put:Nnn \l__csl_citation_properties_prop { noteIndex } { 0 }
- \prop_put:Nnn \l__csl_citation_properties_prop { mode } { suppress-author }
+ \prop_put:Nnn \l__csl_citation_properties_prop { mode } {#4}
}
+ \__csl_make_citation:N \l__csl_citation_info_prop
}
- \__csl_make_citation:N \l__csl_citation_info_prop
}
+ {
+ \footnote
+ {
+ \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
+ \tl_if_empty:nF {#4}
+ {
+ \prop_put:Nnn \l__csl_citation_properties_prop { mode } {#4}
+ }
+ \__csl_make_citation:N \l__csl_citation_info_prop
+ }
+ }
+ }
}
-\msg_new:nnn { citation-style-language } { starred-cite-in-note-style }
- { Starred~ variant~ of~ cite~ command~ does~ not~ work~ with~ note~ styles. }
+% #1: prenote
+% #2: postnote
+% #3: cite keys
+\cs_new:Npn \__csl_cite_parens:nnn #1#2#3
+ {
+ \bool_if:NTF \l__csl_note_bool
+ { ( \__csl_cite_in_text:nnnn {#1} {#2} {#3} { } ) }
+ { \__csl_cite_in_text:nnnn {#1} {#2} {#3} { } }
+ }
+
\cs_new:Npn \__csl_text_cite:nnn #1#2#3
{
\bool_if:NTF \l__csl_note_bool
{
% In note styles, the authors are printed in-text followed by a note.
- \bool_set_false:N \l__csl_note_bool
- \__csl_cite_author:nnn {#1} {#2} {#3}
- \bool_set_true:N \l__csl_note_bool
- \__csl_cite:nnnn { \BooleanFalse } {#1} {#2} {#3}
+ \__csl_cite_in_text:nnnn {#1} {#2} {#3} { author-only }
+ \__csl_cite_note:nnnn {#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 }
- \__csl_make_citation:N \l__csl_citation_info_prop
- }
+ { \__csl_cite_in_text:nnnn {#1} {#2} {#3} { composite } }
}
@@ -121,8 +170,18 @@
{
\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
+ \bool_if:NTF \l__csl_note_bool
+ {
+ \footnote
+ {
+ \__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_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}
@@ -131,48 +190,6 @@
}
-\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
- }
-
-
-\cs_new:Npn \__csl_cite_suppress_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 } { suppress-author }
- \bool_set_false:N \l__csl_note_bool
- \__csl_make_citation:N \l__csl_citation_info_prop
- }
-
-
-\cs_new:Npn \__csl_full_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 } { full-cite }
- \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
@@ -316,10 +333,20 @@
\__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_make_chapter_property:
\__csl_add_back_ref_info:
}
+\cs_new:Npn \__csl_make_chapter_property:
+ {
+ \int_if_exist:NT \c at chapter
+ {
+ \prop_put:Nnx \l__csl_citation_properties_prop { chapterIndex }
+ { \int_use:N \c at chapter }
+ }
+ }
+
\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
@@ -476,12 +503,8 @@
% #1: \l__csl_note_index_tl
{
\bool_if:NTF \l__csl_note_bool
+ { \tl_set:Nx #1 { \int_use:c { c@ \@mpfn } } }
{
- \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.
@@ -490,7 +513,7 @@
\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 } }
+ { \tl_set:Nn #1 { 0 } }
}
}
@@ -519,13 +542,7 @@
{
\bool_if:NT \l__csl_regression_test_bool
{ \tl_show:N #1 }
- \bool_if:NTF \l__csl_note_bool
- {
- \bool_if:NTF \l__csl_in_note_bool
- {#1}
- { \footnote {#1} }
- }
- {#1}
+ #1
}
@@ -547,9 +564,7 @@
\bool_if:NT \l__csl_regression_test_bool
{ \tl_show:N \l__csl_citation_tl }
\group_begin:
- \bool_if:NTF \l__csl_note_bool
- { \footnote { \reset at font \l__csl_citation_tl } }
- { \reset at font \l__csl_citation_tl }
+ \reset at font \l__csl_citation_tl
\group_end:
}
Modified: trunk/Master/texmf-dist/tex/latex/citation-style-language/citation-style-language-compatible.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/citation-style-language/citation-style-language-compatible.sty 2024-08-21 17:32:18 UTC (rev 72077)
+++ trunk/Master/texmf-dist/tex/latex/citation-style-language/citation-style-language-compatible.sty 2024-08-21 21:52:57 UTC (rev 72078)
@@ -162,3 +162,21 @@
\cs_gset_eq:NN \cslcite \__csl_hyperref_cite_item:nn
}
}
+
+
+% ### `perpage`
+
+\hook_gput_code:nnn { package / perpage / after } { . }
+ {
+ \hook_gput_code:nnn { begindocument } { . }
+ {
+ \cs_if_exist:cT { c at pchk@footnote }
+ {
+ \cs_set:Npn \__csl_make_chapter_property:
+ {
+ \prop_put:Nnx \l__csl_citation_properties_prop { chapterIndex }
+ { \int_use:N \c at page }
+ }
+ }
+ }
+ }
Modified: trunk/Master/texmf-dist/tex/latex/citation-style-language/citation-style-language-init.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/citation-style-language/citation-style-language-init.sty 2024-08-21 17:32:18 UTC (rev 72077)
+++ trunk/Master/texmf-dist/tex/latex/citation-style-language/citation-style-language-init.sty 2024-08-21 21:52:57 UTC (rev 72078)
@@ -248,7 +248,7 @@
turkmen = tk-TM,
ukrainian = uk-UA,
urdu = ur-IN,
- UKenglish = en-UK,
+ UKenglish = en-GB,
uppersorbian = hsb-DE,
USenglish = en-US,
usorbian = hsb-DE,
Modified: trunk/Master/texmf-dist/tex/latex/citation-style-language/citation-style-language.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/citation-style-language/citation-style-language.sty 2024-08-21 17:32:18 UTC (rev 72077)
+++ trunk/Master/texmf-dist/tex/latex/citation-style-language/citation-style-language.sty 2024-08-21 21:52:57 UTC (rev 72078)
@@ -9,7 +9,7 @@
\RequirePackage{expl3}
\RequirePackage{xparse}
-\ProvidesExplPackage {citation-style-language} {2024-08-15} {0.6.1}
+\ProvidesExplPackage {citation-style-language} {2024-08-21} {0.6.2}
{Citation Style Language for LaTeX}
\RequirePackage { l3keys2e }
More information about the tex-live-commits
mailing list.