texlive[75995] Master/texmf-dist: citation-style-language (6aug25)
commits+karl at tug.org
commits+karl at tug.org
Wed Aug 6 21:42:02 CEST 2025
Revision: 75995
https://tug.org/svn/texlive?view=revision&revision=75995
Author: karl
Date: 2025-08-06 21:42:02 +0200 (Wed, 06 Aug 2025)
Log Message:
-----------
citation-style-language (6aug25)
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-node-citation.lua
trunk/Master/texmf-dist/scripts/citation-style-language/citeproc-node-group.lua
trunk/Master/texmf-dist/scripts/citation-style-language/citeproc-node-text.lua
trunk/Master/texmf-dist/scripts/citation-style-language/citeproc-output.lua
trunk/Master/texmf-dist/scripts/citation-style-language/citeproc.lua
trunk/Master/texmf-dist/tex/latex/citation-style-language/citation-style-language-bib.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 2025-08-06 19:41:37 UTC (rev 75994)
+++ trunk/Master/texmf-dist/doc/latex/citation-style-language/CHANGELOG.md 2025-08-06 19:42:02 UTC (rev 75995)
@@ -7,6 +7,23 @@
## [Unreleased]
+## [0.8.1] - 2025-08-06
+
+### Added
+
+- Add support for grouping bibliography by authors ([#94](https://github.com/zepinglee/citeproc-lua/issues/94)).
+- Add `bib-name-sep` and `bib-after-name-sep` options to control the vertical space of author groups ([#94](https://github.com/zepinglee/citeproc-lua/issues/94)).
+
+### Changed
+
+- Suppress \newrefsection in bib heading ([#93](https://github.com/zepinglee/citeproc-lua/issues/93)).
+
+### Fixed
+
+- Fix missing `keyword` field when converted from BibTeX ([#97](https://github.com/zepinglee/citeproc-lua/issues/97)).
+- Fix capitalization of the first term in an in-text citation ([#98](https://github.com/zepinglee/citeproc-lua/issues/98)).
+- Fix missing BibTeX string definitions in standard styles.
+
## [0.8.0] - 2025-04-29
### Added
@@ -300,7 +317,8 @@
- Initial CTAN release.
-[Unreleased]: https://github.com/zepinglee/citeproc-lua/compare/v0.8.0...HEAD
+[Unreleased]: https://github.com/zepinglee/citeproc-lua/compare/v0.8.1...HEAD
+[0.8.1]: https://github.com/zepinglee/citeproc-lua/compare/v0.8.0...v0.8.1
[0.8.0]: https://github.com/zepinglee/citeproc-lua/compare/v0.7.0...v0.8.0
[0.7.0]: https://github.com/zepinglee/citeproc-lua/compare/v0.6.8...v0.7.0
[0.6.8]: https://github.com/zepinglee/citeproc-lua/compare/v0.6.7...v0.6.8
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 2025-08-06 19:41:37 UTC (rev 75994)
+++ trunk/Master/texmf-dist/doc/latex/citation-style-language/citation-style-language-doc.tex 2025-08-06 19:42:02 UTC (rev 75995)
@@ -51,7 +51,7 @@
}%
}
-\date{2025-04-29 v0.8.0}
+\date{2025-08-06 v0.8.1}
\maketitle
@@ -251,6 +251,20 @@
\cslsetup{bib-item-sep = 8 pt plus 4 pt minus 2 pt}
\end{LaTeXdemo}
+\DescribeOption{bib-name-sep}
+Vertical space to be inserted between two name groups in a per-author reference
+list.
+The default value is zero.
+Note that this option only takes effect when its value is larger than
+\opt{bib-item-sep} because it's used with \cs{addvspace}.
+
+\DescribeOption{bib-after-name-sep}
+Vertical space to be inserted between the author block and the following
+entries in a per-author reference list.
+The default value is zero.
+Note that this option only takes effect when its value is larger than
+\opt{bib-item-sep} because it's used with \cs{addvspace}.
+
\DescribeOption{bib-hang}
The \opt{bib-hang} option sets the hanging indentation length which is
usually used for author-date style references.
Modified: trunk/Master/texmf-dist/doc/man/man1/citeproc-lua.1
===================================================================
--- trunk/Master/texmf-dist/doc/man/man1/citeproc-lua.1 2025-08-06 19:41:37 UTC (rev 75994)
+++ trunk/Master/texmf-dist/doc/man/man1/citeproc-lua.1 2025-08-06 19:42:02 UTC (rev 75995)
@@ -1,4 +1,4 @@
-.TH citeproc-lua 1 "0.8.0"
+.TH citeproc-lua 1 "0.8.1"
.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 2025-08-06 19:41:37 UTC (rev 75994)
+++ trunk/Master/texmf-dist/scripts/citation-style-language/citeproc-bibtex-data.lua 2025-08-06 19:42:02 UTC (rev 75995)
@@ -815,6 +815,10 @@
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",
},
+ underreview = {
+ csl = nil,
+ source = "ACM-Reference-Format.bst",
+ },
},
fields = {
abstract = {
@@ -2334,9 +2338,9 @@
source = "csl",
},
keywords = {
- csl = nil,
+ csl = "keyword",
source = "biblatex",
- type = "keyword",
+ type = "literal",
},
label = {
csl = nil,
@@ -4523,5 +4527,6 @@
version = "version",
["volume-title"] = "volume-title",
volumes = "number-of-volumes",
+ keywords = "keyword",
},
}
Modified: trunk/Master/texmf-dist/scripts/citation-style-language/citeproc-engine.lua
===================================================================
--- trunk/Master/texmf-dist/scripts/citation-style-language/citeproc-engine.lua 2025-08-06 19:41:37 UTC (rev 75994)
+++ trunk/Master/texmf-dist/scripts/citation-style-language/citeproc-engine.lua 2025-08-06 19:42:02 UTC (rev 75995)
@@ -111,6 +111,7 @@
--- at field requires_sorting boolean
--- at field widest_label string
--- at field maxoffset integer
+--- at field second_field_align string | boolean
local Registry = {}
@@ -182,6 +183,7 @@
requires_sorting = false,
widest_label = "",
maxoffset = 0,
+ second_field_align = false,
},
cite_first_note_numbers = {},
@@ -486,7 +488,7 @@
local params = {
hangingindent = self.style.bibliography.hanging_indent,
- ["second-field-align"] = self.style.bibliography.second_field_align or false,
+ ["second-field-align"] = self.style.bibliography.second_field_align or self.registry.second_field_align or false,
linespacing = self.style.bibliography.line_spacing,
entryspacing = self.style.bibliography.entry_spacing,
maxoffset = self.registry.maxoffset,
Modified: trunk/Master/texmf-dist/scripts/citation-style-language/citeproc-manager.lua
===================================================================
--- trunk/Master/texmf-dist/scripts/citation-style-language/citeproc-manager.lua 2025-08-06 19:41:37 UTC (rev 75994)
+++ trunk/Master/texmf-dist/scripts/citation-style-language/citeproc-manager.lua 2025-08-06 19:42:02 UTC (rev 75995)
@@ -21,6 +21,7 @@
local util = citeproc.util
local unicode = require("citeproc-unicode")
local bibtex2csl = require("citeproc-bibtex2csl")
+local bibtex_data = require("citeproc-bibtex-data")
local yaml = require("citeproc-yaml")
@@ -177,6 +178,9 @@
}
setmetatable(ref_section, self)
self.__index = self
+ for name, macro in pairs(bibtex_data.macros) do
+ ref_section.bibtex_strings[name] = macro.value
+ end
return ref_section
end
@@ -818,6 +822,10 @@
value = "{" .. table.concat(value, ", ") .. "}"
else
value = tostring(value)
+ if string.match(value, ",") or string.match(value, "^%s")
+ or string.match(value, "%s$") then
+ value = "{" .. value .. "}"
+ end
end
if value ~= "" then
table.insert(bib_option_list, string.format("%s = %s", option, value))
Modified: trunk/Master/texmf-dist/scripts/citation-style-language/citeproc-node-citation.lua
===================================================================
--- trunk/Master/texmf-dist/scripts/citation-style-language/citeproc-node-citation.lua 2025-08-06 19:41:37 UTC (rev 75994)
+++ trunk/Master/texmf-dist/scripts/citation-style-language/citeproc-node-citation.lua 2025-08-06 19:42:02 UTC (rev 75995)
@@ -208,29 +208,34 @@
self:collapse_cites(irs, engine)
end
- -- Capitalize first
- for i, ir in ipairs(irs) do
- -- local layout_prefix
- -- local layout_affixes = self.layout.affixes
- -- if layout_affixes then
- -- layout_prefix = layout_affixes.prefix
- -- end
- local prefix_inlines = ir.cite_prefix
- if prefix_inlines then
- -- Prefix is inlines
- local prefix_str = output.SortStringFormat:new():output(prefix_inlines, context)
- if (string.match(prefix_str, "[.!?]%s*$")
- -- position_IbidWithPrefixFullStop.txt
- -- `Book A. He said “Please work.” Ibid.`
- or string.match(prefix_str, "[.!?]”%s*$")
- ) and InlineElement.has_space(prefix_inlines) then
- ir:capitalize_first_term()
+ -- Capitalizing the first term does not happen in the citation of in-text style.
+ -- See <https://github.com/Juris-M/citeproc-js/blob/f88a47e6d143ace8a79569388534ff8ad9205da0/src/node_text.js#L190-L199>.
+ -- TODO: in-text bibliography
+ if engine.style.class == "note" then
+ -- Capitalize first
+ for i, ir in ipairs(irs) do
+ -- local layout_prefix
+ -- local layout_affixes = self.layout.affixes
+ -- if layout_affixes then
+ -- layout_prefix = layout_affixes.prefix
+ -- end
+ local prefix_inlines = ir.cite_prefix
+ if prefix_inlines then
+ -- Prefix is inlines
+ local prefix_str = output.SortStringFormat:new():output(prefix_inlines, context)
+ if (string.match(prefix_str, "[.!?]%s*$")
+ -- position_IbidWithPrefixFullStop.txt
+ -- `Book A. He said “Please work.” Ibid.`
+ or string.match(prefix_str, "[.!?]”%s*$")
+ ) and InlineElement.has_space(prefix_inlines) then
+ ir:capitalize_first_term()
+ end
+ else
+ local delimiter = self.layout.delimiter
+ if i == 1 or not delimiter or string.match(delimiter, "[.!?]%s*$") then
+ ir:capitalize_first_term()
+ end
end
- else
- local delimiter = self.layout.delimiter
- if i == 1 or not delimiter or string.match(delimiter, "[.!?]%s*$") then
- ir:capitalize_first_term()
- end
end
end
Modified: trunk/Master/texmf-dist/scripts/citation-style-language/citeproc-node-group.lua
===================================================================
--- trunk/Master/texmf-dist/scripts/citation-style-language/citeproc-node-group.lua 2025-08-06 19:41:37 UTC (rev 75994)
+++ trunk/Master/texmf-dist/scripts/citation-style-language/citeproc-node-group.lua 2025-08-06 19:42:02 UTC (rev 75995)
@@ -21,9 +21,9 @@
util = require("citeproc.util")
end
+
local Element = element.Element
-
--- at class Group: Element
--- at field delimiter string?
--- at field prefix string?
@@ -50,6 +50,9 @@
ir.formatting = util.clone(self.formatting)
ir.affixes = util.clone(self.affixes)
ir.display = self.display
+ if self.display == "left-margin" then
+ engine.registry.second_field_align = "flush"
+ end
end
return ir
end
Modified: trunk/Master/texmf-dist/scripts/citation-style-language/citeproc-node-text.lua
===================================================================
--- trunk/Master/texmf-dist/scripts/citation-style-language/citeproc-node-text.lua 2025-08-06 19:41:37 UTC (rev 75994)
+++ trunk/Master/texmf-dist/scripts/citation-style-language/citeproc-node-text.lua 2025-08-06 19:42:02 UTC (rev 75995)
@@ -79,6 +79,11 @@
o:set_quotes_attribute(node)
o:set_strip_periods_attribute(node)
o:set_text_case_attribute(node)
+ -- `apa-annotated-bibliography.csl` uses `display="block"` for annotation.
+ -- Use display="indent" instead
+ if o.display == "block" and (o.variable == "note" or o.variable == "abstract") then
+ o.display = "indent"
+ end
return o
end
@@ -196,6 +201,9 @@
ir.group_var = group_var
ir.affixes = util.clone(self.affixes)
ir.display = self.display
+ if self.display == "left-margin" then
+ engine.registry.second_field_align = "flush"
+ end
ir.formatting = util.clone(self.formatting)
if self.quotes then
ir.quotes = context:get_localized_quotes()
Modified: trunk/Master/texmf-dist/scripts/citation-style-language/citeproc-output.lua
===================================================================
--- trunk/Master/texmf-dist/scripts/citation-style-language/citeproc-output.lua 2025-08-06 19:41:37 UTC (rev 75994)
+++ trunk/Master/texmf-dist/scripts/citation-style-language/citeproc-output.lua 2025-08-06 19:42:02 UTC (rev 75995)
@@ -1965,17 +1965,16 @@
["@vertical-align/baseline"] = false,
["@cite/entry"] = false,
["@bibliography/entry"] = function (str, context)
- if string.match(str, "\\bibitem") then
- str = str .. "\n"
- else
- str = "\\bibitem{" .. context.id .. "}\n" .. str .. "\n"
+ if not string.match(str, "\\bibitem") then
+ str = "\\bibitem{" .. context.id .. "}\n" .. str
end
+ str = str .. "\n"
return str
end,
- -- ["@display/block"] = false,
+ ["@display/block"] = "\\cslblock{%s}\n\n",
-- ["@display/left-margin"] = '\n <div class="csl-left-margin">%s</div>',
- -- ["@display/right-inline"] = '<div class="csl-right-inline">%s</div>',
- -- ["@display/indent"] = '<div class="csl-indent">%s</div>\n ',
+ ["@display/right-inline"] = "%s",
+ ["@display/indent"] = "\n\n%s",
}
local latex_escape_table = {
@@ -2038,12 +2037,19 @@
end
res = string.format("\\bibitem[%s]{%s}\n", res, context.id)
- elseif inline.div == "right-inline" then
- return res
-
- elseif inline.div == "block" then
- res = "\n\n" .. res
- return res
+ else
+ local key = string.format("@display/%s", inline.div)
+ if inline.div == "right-inline" then
+ -- Strip trailing spaces
+ -- variables_ContainerTitleShort.txt
+ res = string.gsub(res, "%s+$", "")
+ end
+ local format_str = self.markups[key]
+ if format_str then
+ res = string.format(format_str, res)
+ else
+ util.error("Unknown display type: " .. inline.div)
+ end
end
return res
end
Modified: trunk/Master/texmf-dist/scripts/citation-style-language/citeproc.lua
===================================================================
--- trunk/Master/texmf-dist/scripts/citation-style-language/citeproc.lua 2025-08-06 19:41:37 UTC (rev 75994)
+++ trunk/Master/texmf-dist/scripts/citation-style-language/citeproc.lua 2025-08-06 19:42:02 UTC (rev 75995)
@@ -17,7 +17,7 @@
util = require("citeproc.util")
end
-citeproc.__VERSION__ = "0.8.0"
+citeproc.__VERSION__ = "0.8.1"
citeproc.new = engine.CiteProc.new
citeproc.util = util
Modified: trunk/Master/texmf-dist/tex/latex/citation-style-language/citation-style-language-bib.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/citation-style-language/citation-style-language-bib.sty 2025-08-06 19:41:37 UTC (rev 75994)
+++ trunk/Master/texmf-dist/tex/latex/citation-style-language/citation-style-language-bib.sty 2025-08-06 19:42:02 UTC (rev 75995)
@@ -242,6 +242,7 @@
}
}
{ \skip_set:Nn \itemsep { \l__csl_bib_item_sep_tl } }
+ \bool_set_true:N \l_csl_bib_first_block_bool
}
@@ -283,6 +284,26 @@
\par
}
+% Used for per-author publication listing
+\bool_new:N \l_csl_bib_first_block_bool
+
+\cs_new:Npn \cslblock #1
+ {
+ \bool_if:NF \l_csl_bib_first_block_bool
+ {
+ \skip_set:NV \l_tmpa_skip { \l__csl_bib_name_sep_tl }
+ \addvspace { \l_tmpa_skip }
+ }
+ \bool_set_false:N \l_csl_bib_first_block_bool
+ \item [ ]
+ \skip_horizontal:n { - \leftmargin }
+ % \hskip - \leftmargin \relax
+ #1
+ \par
+ \skip_set:NV \l_tmpa_skip { \l__csl_bib_after_name_sep_tl }
+ \addvspace { \l_tmpa_skip }
+ }
+
\cs_new:Npn \__csl_print_back_refs:n #1
% #1: list of {<page>}{<label>}{anchor}
{
@@ -474,6 +495,7 @@
% #2: bib heading title
\cs_new:Npn \__csl_make_bib_heading:nn #1#2
{
+ \DeclareCommandCopy \newrefsection \relax
\tl_if_empty:NTF \bibsection
{
\cs_if_exist:cF { __csl_head_ #1 :n }
@@ -488,6 +510,7 @@
{ \bibsection }
\tl_if_empty:NF \l__csl_bib_head_label_tl
{ \exp_args:NV \label \l__csl_bib_head_label_tl }
+ \DeclareCommandCopy \newrefsection \refsection
}
\msg_new:nnn { citation-style-language } { undefined-bib-heading }
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 2025-08-06 19:41:37 UTC (rev 75994)
+++ trunk/Master/texmf-dist/tex/latex/citation-style-language/citation-style-language.sty 2025-08-06 19:42:02 UTC (rev 75995)
@@ -9,7 +9,7 @@
\RequirePackage{expl3}
\RequirePackage{xparse}
-\ProvidesExplPackage {citation-style-language} {2025-04-29} {0.8.0}
+\ProvidesExplPackage {citation-style-language} {2025-08-06} {0.8.1}
{Citation Style Language for LaTeX}
\RequirePackage { url }
@@ -76,6 +76,8 @@
\tl_new:N \l__csl_bib_font_tl
\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_name_sep_tl
+\tl_new:N \l__csl_bib_block_sep_tl
\tl_new:N \l__csl_bib_par_indent_tl
\tl_new:N \l__csl_bib_hang_tl
\str_new:N \l__csl_bib_ref_section_str
@@ -112,6 +114,8 @@
bib-font .tl_set:N = \l__csl_bib_font_tl ,
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-name-sep .tl_set:N = \l__csl_bib_name_sep_tl ,
+ bib-after-name-sep .tl_set:N = \l__csl_bib_after_name_sep_tl ,
bib-par-indent .tl_set:N = \l__csl_bib_par_indent_tl ,
bib-hang .tl_set:N = \l__csl_bib_hang_tl ,
% ref section
@@ -141,6 +145,8 @@
prefix-separator = { ~ } ,
suffix-separator = { , ~ } ,
bib-entry-page-break = true ,
+ bib-name-sep = { 0 pt } ,
+ bib-after-name-sep = { 0 pt } ,
bib-par-indent = { \parindent } ,
bib-hang = { 1 em } ,
ref-section = none ,
More information about the tex-live-commits
mailing list.