Oregami
Repositories/oxedyne/fe2o3

fe2o3_text/src/csl/mod.rs

9 operations, oldest first

created by r1870400018:72720, which is this file's identity for as long as the history lasts, whatever it is later renamed to

read the file · who wrote it · compare two states

An operation carries no clock of its own. Each row is therefore dated by the first mark written after it by the same replica, which is one copy of the repository, and that mark is where the command that wrote the operation ended.

+ signed and verified, ? signed by a key this forge does not carry, - unsigned

OperationAuthorWhatWhen
+r1870400018:72720replica 1870400018created fe2o3_text/src/csl/mod.rs40 days ago under "fe2o3_text csl: the CSL 1.0.2 style and locale model and its parser (FIRE-B B1) -- a new `csl` module behind feature `csl`, read through the crate's own XML reader. `Style::parse` takes an independent style into a typed tree: every rendering element (text, number, label, names with name/name-part/et-al/label/substitute, date with date-part, group, choose with all seven conditions and the three match modes), macros, citation and bibliography options (disambiguation, collapse, cite-group and year-suffix delimiters, second-field-align, hanging-indent, spacing, subsequent-author-substitute and its rule), sort keys, the style-level options, and the inheritable name options with `NameOpts::over` for the style, context and element levels. A dependent style is refused by name with its parent's id. `Locale::parse` reads a locale file or an in-style locale (terms with forms, genders, ordinal match, single and multiple; localised dates; style options). `Locales::chain` builds the lookup order hayagriva 0.10.1 uses, which Typst 0.15.1 shows: in-style requested code, in-style base language, in-style without xml:lang, then the file of the requested code, the primary dialect of its language (citationberg's table, so `de` reaches de-DE and `zh` zh-CN), then en-US; term forms fall back only once the whole chain lacks the asked form. `Locales::wanted` names the files a host must supply. tests/csl.rs parses the 65 distinct styles of the Austenite parity corpus (tests/data/csl/corpus, unmodified, sources listed; one GPL-3.0 style left out) and round-trips each style's macro count and its count of every rendering element; one corpus style is dependent and is refused as one. Four locale and dependent-style cases."
+r1870400018:72721replica 1870400018inserted 430 bytes40 days ago under "fe2o3_text csl: the CSL 1.0.2 style and locale model and its parser (FIRE-B B1) -- a new `csl` module behind feature `csl`, read through the crate's own XML reader. `Style::parse` takes an independent style into a typed tree: every rendering element (text, number, label, names with name/name-part/et-al/label/substitute, date with date-part, group, choose with all seven conditions and the three match modes), macros, citation and bibliography options (disambiguation, collapse, cite-group and year-suffix delimiters, second-field-align, hanging-indent, spacing, subsequent-author-substitute and its rule), sort keys, the style-level options, and the inheritable name options with `NameOpts::over` for the style, context and element levels. A dependent style is refused by name with its parent's id. `Locale::parse` reads a locale file or an in-style locale (terms with forms, genders, ordinal match, single and multiple; localised dates; style options). `Locales::chain` builds the lookup order hayagriva 0.10.1 uses, which Typst 0.15.1 shows: in-style requested code, in-style base language, in-style without xml:lang, then the file of the requested code, the primary dialect of its language (citationberg's table, so `de` reaches de-DE and `zh` zh-CN), then en-US; term forms fall back only once the whole chain lacks the asked form. `Locales::wanted` names the files a host must supply. tests/csl.rs parses the 65 distinct styles of the Austenite parity corpus (tests/data/csl/corpus, unmodified, sources listed; one GPL-3.0 style left out) and round-trips each style's macro count and its count of every rendering element; one corpus style is dependent and is refused as one. Four locale and dependent-style cases."
+r1870400018:73169replica 1870400018inserted 17 bytes40 days ago under "fe2o3_text csl: the built-in style and locale archive (FIRE-B B5) -- `csl::archive` indexes exactly the 80 styles and 63 locales hayagriva 0.10.1 serves (the 11 stale style CBORs and sr-RS in its crate directory are never included by its archive.rs, so they are left out; the corpus's one GPL-3.0 style stays out), as CSL XML at the revisions hayagriva archived, every one recovered at an exact `<updated>` match from the CSL styles and locales repositories (alphanumeric, which the hayagriva authors wrote, copied from the crate under MIT/Apache-2.0). The index (Typst names, CSL ids, `<updated>`, paths) is always present under `csl`: `by_name`, `by_id`, `styles`, `locale_codes`, `has_locale`, `Archived::path`, `locale_path`, `wanted_paths`, and `PACKAGE` (`@austenite/csl:0.10.1`, the virtual package a host without the archive serves the files from). Feature `csl-archive` embeds the XML (about 4.0 MB): `Archived::{xml, style}`, `locale_src`, `locale`, `locales_for` (the files `Locales::wanted` names, parsed, so `de` reaches de-DE through citationberg's primary-dialect table as Typst does) and `locales_json` (carried for hosts, not read, since Typst ignores it). data/csl/LICENSE.txt carries the CC BY-SA 3.0 and MIT/Apache notices and the crate's `include` names it; index.tsv records each file's source commit and `<updated>`; tools/csl_fetch.py (std-only, with tools/cbor.py) rebuilds the data and src/csl/archive_index.rs from the hayagriva crate and the two repositories. tests/csl_archive.rs: every name and id resolves, every style parses with its id and `<updated>` equal to the index's, every locale parses under its own code and carries index.tsv's `<updated>`, index.tsv agrees with the embedded index (80, 63), and `de` reaches the de-DE terms while `sr` falls to en-US as in Typst"
+r1870400018:73198replica 1870400018inserted 44 bytes40 days ago under "fe2o3_text csl: the rendering foundations (FIRE-B B2a, part 1) -- `csl::node` is the output tree Typst realises from hayagriva (FIX-1): `Node::{Text(s, Formatting), Elem{children, display, meta}, Math(src), Link{text, fmt, url}, Cite{idx, fmt}}`, `Meta` (names, date, text, number, label, citation number and label, name, entry link), resolved `Formatting::apply(&Fmt)`, and hayagriva's `simplify`, `plain`, `has_content`, `is_empty`, `last_text(_mut)`. `csl::case` ports hayagriva's `CaseFolder` (title, sentence, capitalize-first/all, upper, lower) at the options its CSL path uses, with `push_verbatim` so protected spans pass untouched and `prevent_trimming` for math; `case_words.rs` copies its two English word lists verbatim (ALWAYS_CAPITALIZE's one out-of-order pair is kept, since it is bisected). `csl::item` is the least the renderers read: `Chunked` text of normal, verbatim and math chunks (FIX-2), hayagriva's `Numeric` parse, `NumVal`, the CSL variable taxonomy, and trait `Item` with named hooks for B2b (`name_count`, `date_state`, `page`). tests/csl_render.rs covers case folding, numbers and the tree; tests/data/csl/expect holds the Typst 0.15.1 HTML output of ieee, apa and chicago-author-date over refs.bib, for the renderers that follow. Ported files carry hayagriva's MIT/Apache-2.0 notice."
+r1870400018:73199replica 1870400018inserted 14 bytes40 days ago under "fe2o3_text csl: the rendering foundations (FIRE-B B2a, part 1) -- `csl::node` is the output tree Typst realises from hayagriva (FIX-1): `Node::{Text(s, Formatting), Elem{children, display, meta}, Math(src), Link{text, fmt, url}, Cite{idx, fmt}}`, `Meta` (names, date, text, number, label, citation number and label, name, entry link), resolved `Formatting::apply(&Fmt)`, and hayagriva's `simplify`, `plain`, `has_content`, `is_empty`, `last_text(_mut)`. `csl::case` ports hayagriva's `CaseFolder` (title, sentence, capitalize-first/all, upper, lower) at the options its CSL path uses, with `push_verbatim` so protected spans pass untouched and `prevent_trimming` for math; `case_words.rs` copies its two English word lists verbatim (ALWAYS_CAPITALIZE's one out-of-order pair is kept, since it is bisected). `csl::item` is the least the renderers read: `Chunked` text of normal, verbatim and math chunks (FIX-2), hayagriva's `Numeric` parse, `NumVal`, the CSL variable taxonomy, and trait `Item` with named hooks for B2b (`name_count`, `date_state`, `page`). tests/csl_render.rs covers case folding, numbers and the tree; tests/data/csl/expect holds the Typst 0.15.1 HTML output of ieee, apa and chicago-author-date over refs.bib, for the renderers that follow. Ported files carry hayagriva's MIT/Apache-2.0 notice."
+r1870400018:73626replica 1870400018inserted 16 bytes40 days ago under "fe2o3_text csl: the element renderers (FIRE-B B2a, part 2) -- `csl::render` ports hayagriva 0.10.1's writing context and the text, number, label, group and choose renderers. The writer keeps stacks of formatting, case and delimiter over the case folder and a stack of element levels: `push_elem`/`commit_elem` wrap children only when display or meta is set, and `apply_prefix`/`apply_suffix` discard an empty element and skip a suffix the text already ends with. `push_str` runs hayagriva's quirks in its order: punctuation pulled into a closing quote (not past a math chunk), case reconfigured, a trailing space eaten before `.`, `,`, `]` or `)`, a letterless string not written twice in a row, and citeproc.js's strip-periods. Prefixes go inside the formatting, DOI, PMID and PMCID become links (an affix equal to the URL stem is dropped), title and sentence case apply to English only, ordinals follow citationberg's lookup (two-digit match, then gender, then the closest; long forms 1-10; legacy ordinal-01..04), a group prints only when it queried no variable or one rendered, and choose evaluates its seven conditions with suppression off. An empty `names` with a substitute renders the first that prints and suppresses its variable. `bibliography_entry` renders an entry through the bibliography layout; `Cite` carries the citation's number, label, locator and position. Hooks for B2b: `render_name_list`, `render_date`, `page_plural`/`is_numeric_page`. tests/csl_render.rs renders ieee, apa and chicago-author-date over the four refs.bib entries and all 12 equal Typst 0.15.1's HTML; the a2 fixture carries biblatex 0.12's empty verbatim chunks either side of `{$x^2$}`, the trailing one of which keeps title case's \"and\" lower case"
+r1870400018:73644replica 1870400018inserted 30 bytes40 days ago under "fe2o3_text csl: n1-n6 scored, 40 of 40 against Typst (FIRE-B B2b, part 3) -- tests/csl_render.rs's `Fx` gains people, the issued date, typed pages, volume-title and a second CSL type, and renders n1-n6 with `Cite { first: true }`: particles, a suffix (no comma, as hayagriva sets for every BibTeX name), an institution, 8 and 21 authors, a full date, a month, a range (its end date) and a circa year. n4 is paper-conference with the book title as container-title and volume-title; n5, an @misc with a URL, matches webpage and document. ieee, apa, chicago-author-date and american-medical-association each match Typst 0.15.1 on 10 of 10. One fix: `names_info` now counts a `names` with children but no `name` as empty, as hayagriva's `will_have_info` does, so AMA's `<names variable=\"editor\"><label/></names>` prints nothing (checked with Typst on the style with and without a `<name/>`)"
+r1870400018:73855replica 1870400018inserted 14 bytes40 days ago under "fe2o3_text csl: sorting, citation numbers and the bibliography driver (FIRE-B B3, part 1) -- new `csl::cite` holds the document-wide `CiteState` (each cited entry once, in first-cite order, sorted by the bibliography's keys, numbered from 1) and `render_bibliography(style, chain, lang, items, &state) -> Vec<(Option<Node>, Vec<Node>)>`, whose prefix is second-field-align's first field taken out as hayagriva's `remove_any_meta` does (the test no longer applies it by hand). Sorting ports hayagriva 0.10.1's `sort.rs`: variable keys (text, number, page, date, names by `Person::sort_cmp`), macro keys rendered by a sorting `Ctx` with the key's names-min/-use-first/-use-last over the style's options, the empty-value reversal, and `collate`, a primary-strength stand-in for ICU's root order. A sorting `Ctx` reverses every long name, strips an institution's leading article, demotes particles under sort-only, skips labels and et al., and writes dates as citeproc's `P000002020MMDD` keys. The et-al fix: a `names` element's own inheritable name options now sit between the name's and the inherited ones. tests/csl_render.rs now compares each style's whole bibliography, in order, with Typst 0.15.1's `full: true` output: ieee, apa, chicago-author-date and american-medical-association each 10 of 10 in place"
+r1870400018:73856replica 1870400018inserted 96 bytes40 days ago under "fe2o3_text csl: sorting, citation numbers and the bibliography driver (FIRE-B B3, part 1) -- new `csl::cite` holds the document-wide `CiteState` (each cited entry once, in first-cite order, sorted by the bibliography's keys, numbered from 1) and `render_bibliography(style, chain, lang, items, &state) -> Vec<(Option<Node>, Vec<Node>)>`, whose prefix is second-field-align's first field taken out as hayagriva's `remove_any_meta` does (the test no longer applies it by hand). Sorting ports hayagriva 0.10.1's `sort.rs`: variable keys (text, number, page, date, names by `Person::sort_cmp`), macro keys rendered by a sorting `Ctx` with the key's names-min/-use-first/-use-last over the style's options, the empty-value reversal, and `collate`, a primary-strength stand-in for ICU's root order. A sorting `Ctx` reverses every long name, strips an institution's leading article, demotes particles under sort-only, skips labels and et al., and writes dates as citeproc's `P000002020MMDD` keys. The et-al fix: a `names` element's own inheritable name options now sit between the name's and the inherited ones. tests/csl_render.rs now compares each style's whole bibliography, in order, with Typst 0.15.1's `full: true` output: ieee, apa, chicago-author-date and american-medical-association each 10 of 10 in place"