Skip to content

Conversation

@alexkeizer
Copy link
Contributor

@alexkeizer alexkeizer commented Jun 23, 2025

This incorporates the setup notes regarding minted 3's configuration file into the Makefile, so that no more manual setup steps are required.

In particular:

  • We add a Makefile recipe for the .latexminted_config file in the current directory, and
  • We check for the existence of ~/.latexminted_config and raise an error if it doesn't
    • The error points to a new script which can be used to auto-generate this config, too, but I didn't want to pollute the home-dir without explicit prompting from the user
    • Note that we only check for the existence of the global config file; we don't check whether the necessary "enable_cwd_config" option is actually set when the file is already present. The latter could be doable using jq, but I didn't want to assume that is installed.
  • Finally, we tweak the CI to run the Makefile to generate the .latexminted_config file at least (CI does not seem to be using the Makefile to generate the pdfs, which is why this wasn't happening automatically yet, but I have no desire to touch that right now).
    • Note that we removed the latexminted_config file from the repository, and added it to .gitignore, since it ought to be automatically generated anyway.

@alexkeizer
Copy link
Contributor Author

Hmm, CI currently fails with the following error:

 ./paper.tex:703: Package minted Error: 
 => ./paper:594: Custom lexer "MLIRLexer.py" is not enabled in ".latexminted_co
nfig"; check that SHA-256 hash is present and updated.

I wonder, does CI use the Makefile from the PR branch, or from somewhere else? The generation of the relevant config file seems to work perfectly, locally

@alexkeizer alexkeizer requested a review from bollu June 23, 2025 14:09
Copy link
Contributor

@bollu bollu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conceptually LGTM, but please make sure the script is clean as per shellcheck.

@alexkeizer
Copy link
Contributor Author

CI is now happy, with some tweaks:

Finally, we tweak the CI to run the Makefile to generate the .latexminted_config file at least (CI does not seem to be using the Makefile to generate the pdfs, which is why this wasn't happening automatically yet, but I have no desire to touch that right now).

  • Note that we removed the latexminted_config file from the repository, and added it to .gitignore, since it ought to be automatically generated anyway.

@alexkeizer alexkeizer merged commit 00a88a1 into main Jun 23, 2025
6 checks passed
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