Skip to content

Conversation

@superlopuh
Copy link
Contributor

Turns out this also works, and makes the clone and build workflow work by default again.

@superlopuh superlopuh requested review from alexkeizer and compor June 24, 2025 12:39
@superlopuh superlopuh self-assigned this Jun 24, 2025
@alexkeizer
Copy link
Contributor

alexkeizer commented Jun 24, 2025

@superlopuh

CI complains about

 ./paper.tex:703: Package minted Error: 
 => ./paper:594: Missing ".latexminted_config"; custom lexers are disabled.

Which is exactly the error we got before without the security option telling it to consider the local config file.
This is the behaviour I was originally expecting without the global config, but now I'm still confused why it was working locally.

EDIT: I've consulted the minted documentation, which says the following on the subject:

The current TEX working directory. Note that enable_cwd_config must be
set true in the .latexminted_config in the user home directory or in the
TEXMFHOME directory to enable this; .latexminted_config in the current TEX
working directory is not enabled by default for security reasons. Even when a
config file in the current TEX working directory is enabled, it cannot be used to
modify certain security-related settings.

Which confirms my original expectation that these settings must be set in one of the global config files, and that it doesn't work in the current working directory's config.

@compor
Copy link
Contributor

compor commented Jun 24, 2025

I don't think you can merge the .latexminted_config files for the enable_cwd_config setting.
That needs to appear in the "top-level" config.

Quoting from https://tug.ctan.org/macros/latex/contrib/minted/minted.pdf, section 6.1 last bullet poinτ:

The current TEX working directory. Note that enable_cwd_config must be
set true in the .latexminted_config in the user home directory or in the
TEXMFHOME directory to enable this; .latexminted_config in the current TEX
working directory is not enabled by default for security reasons. Even when a
config file in the current TEX working directory is enabled, it cannot be used to
modify certain security-related settings.

@superlopuh
Copy link
Contributor Author

Do you know why it worked locally on our machines then?

@superlopuh
Copy link
Contributor Author

I'm happy to do gross things on the CI if that's the only place where the local .latexminted_config doesn't work

@alexkeizer
Copy link
Contributor

@superlopuh should we close this, given we discovered it does not actually work?

@superlopuh
Copy link
Contributor Author

Yep

@superlopuh superlopuh closed this Jun 25, 2025
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.

4 participants