Skip to content

Conversation

@douden
Copy link
Member

@douden douden commented Dec 19, 2025

This pull request introduces support for extracting figure metadata from BibTeX entries, allowing users to specify a :bib: option in figure directives. When a BibTeX key is provided, metadata such as author, date, license, and source are automatically extracted from corresponding .bib files, unless explicitly overridden. The documentation and configuration options are updated accordingly, and example usage is added to the manual.

BibTeX metadata extraction support:

  • Added logic to parse .bib files and extract metadata fields (author, title, date, license, copyright, source) using a new _parse_bib_entry function and related helpers. This enables figure directives to pull metadata from BibTeX entries when the :bib: option is used. [1] [2]
  • Updated the MetadataFigure directive to prioritize explicit metadata options, then BibTeX-extracted values, then defaults for all supported fields (author, date, license, copyright, source). [1] [2] [3] [4] [5]
  • Added a bib section to the default settings and configuration schema, with an extract_metadata option (default: true). [1] [2] [3]

Documentation and examples:

  • Expanded the manual and README to document the new :bib: option, configuration settings, and provide a worked example of BibTeX metadata extraction for figures. [1] [2] [3]

Other improvements:

  • Added a helper to resolve BibTeX output paths relative to the source directory for consistency.
  • Minor code cleanup and formatting adjustments. [1] [2] [3]

claude and others added 3 commits December 16, 2025 16:05
- Add :bib: directive option to specify/generate BibTeX keys
- Extract figure metadata (author, date, license, source) from existing bib entries
- Generate BibTeX entries from figure metadata when bib.generate is enabled
- Add new configuration options under metadata_figure_settings.bib:
  - generate: Enable automatic bib entry generation
  - output_file: Output path for generated .bib file
  - entry_type: BibTeX entry type (default: misc)
  - key_prefix: Prefix for auto-generated keys
  - extract_metadata: Enable metadata extraction from bib entries
- Update README with bib configuration and usage documentation
Eliminates support for generating BibTeX entries from figure metadata, including related configuration options and code paths. Updates the README and MANUAL to reflect that only extraction of metadata from existing BibTeX entries is supported. Cleans up unused code and clarifies documentation for BibTeX integration.
Relocated the inclusion of README.md content to follow the BibTeX example section instead of preceding it. This improves the logical flow of the manual by keeping related content together.
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.

3 participants