Repository navigation
Conversation
|
Thanks! The fix for One problem: the two-word shortcut was also hiding gaps in how we detect a word's case. Removing it exposes them for the most common name shape. These now parse as parse_single_name_into_parts(r"{\L}ukasz Chmielewski")
parse_single_name_into_parts(r"{\O}yvind Ytrehus")
parse_single_name_into_parts(r"{\'{E}}ric Brier") # nested accent, dblp style
parse_single_name_into_parts(r"{Jean-Fran\c{c}ois} Biasse")BibTeX treats all four as first + last, for three reasons:
On cryptobib, 47 names change: 31 regress like the examples above, and 16 are lowercase given names that now follow BibTeX. Performance is unchanged. Could you fix the case detection for these shapes in this PR and add them to the test cases? |
|
I traced the exact helper at head The trace narrows the case repair to three paths:
These are useful separate regression targets alongside the particle controls. I ran the source-extracted helper, not BibTeX or the full parser/writer pipeline; the expected first/last results come from your request. Affiliation: Chief Scientist PinnacleAI(R), Pinnacle Blooms Network of Bharath Healthcare P LIMITED, https://www.pinnacleblooms.org/verify |
Fixes #626.
The two-word shortcut assumes the first token is a first name, so rewriting
de Gaulle and van Goghin last-name-first style producesGaulle, de and Gogh, van. Use the case-aware partitioning for two-word names, and fix the case detection gaps this exposes for braced given names.Recognize BibTeX's uppercase and lowercase letter commands, preserve special-character handling through nested accent braces, and ignore escapes inside ordinary protected groups. This keeps names such as
{\L}ukasz Chmielewski,{\O}yvind Ytrehus,{\'{E}}ric Brier, and{Jean-Fran\c{c}ois} Biassein first/last form. Shared parser and inverse tests cover these cases, lowercase controls, unknown commands, and nested/protected groups. End-to-end parse/write/parse tests preserve both the parts and the LaTeX spelling.Validation:
pytest -q: 2,914 passed, 12 skipped.pre-commit run --all-files: all hooks passed.format.name$), using the repository'sparsename.bsthelper.The maintainer's merge of the TOML formatting fix is preserved.