Skip to content
Snippets Groups Projects

Minted 2023 update

Open Bernardo Borges requested to merge minted-2023-update into master

Update Minted Configuration for TeX Live 2023+ Compatibility

The Alethe document handles code highlighting via the minted package, with a custom lexer for "smt-lib", defined in highlight.py. Due to the update of the package, the new minted (version 3.0.0 and later) no longer supports overriding \MintedPygmentize for custom lexers.

Instead, we now reference our custom lexer directly using ./highlight.py:SMTLibLexer in the minted environment definitions. A conditional mechanism in the LaTeX preamble detects whether the legacy \MintedPygmentize command is defined. If it is, the document falls back to the older configuration (for TeX Live 2022 or earlier). This ensures that users on both old and new TeX distributions can compile the document without modifications.

The changes include guidance on setting up a .latexminted_config file with the correct SHA256 hash for highlight.py. This is required by minted 3.0.0+ to securely load custom lexers.

The GitLab CI config was also updated, what needed to copy the .latexminted_config into the global configuration (e.g., $HOME/.latexminted_config) to ensure the custom lexer is registered during the build.


Thank you for reviewing these changes. Your feedback and any suggestions for further improvements are welcome.

Merge request reports

Pipeline #54185 passed

Pipeline passed for 4152b442 on minted-2023-update

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading