Skip to content

✨ Align @string values according to BibtexFormat.value_column#558

Merged
MiWeiss merged 7 commits into
mainfrom
string-value-alignment
Jun 12, 2026
Merged

✨ Align @string values according to BibtexFormat.value_column#558
MiWeiss merged 7 commits into
mainfrom
string-value-alignment

Conversation

@MiWeiss

@MiWeiss MiWeiss commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

The value_column docstring has claimed since the original writer draft (#356) that String blocks are aligned, but _treat_string never applied any alignment. This implements it, with the semantics decided explicitly:

  • Integer column: string values use the same padding rule as entry fields, measured after the @string{ prefix — entry and string values thus each align among themselves (not at the same absolute column, since the prefixes differ).
  • "auto": the longest key now considers both entry field keys and string keys, so a single consistent column is used. Note this can shift entry alignment in libraries with long string keys.

Default (value_column = 0) output is unchanged.

Stacked on #555 (uses the _val_indent_string rename) — merge #555 first; this PR's diff will then shrink to the writer/test changes only.

Follow-up to the discussion on #555 / #542.

🤖 Generated with Claude Code

@MiWeiss

MiWeiss commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator Author

reviewed

@MiWeiss MiWeiss merged commit ca6b9bf into main Jun 12, 2026
31 checks passed
@MiWeiss MiWeiss deleted the string-value-alignment branch June 12, 2026 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant