Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minted #4

Open
wants to merge 6 commits into
base: devel
Choose a base branch
from
Open

Minted #4

wants to merge 6 commits into from

Conversation

gcorral-uah
Copy link
Contributor

@gcorral-uah gcorral-uah commented Sep 26, 2022

In this pr we allow the use of minted and include a default style.
Minted is an environment to allow the inclusion of code listings using the pygments python library.
It also allows the breaking of long lines and the inclusion of utf-8 code by default.
The problem with minted is that it needs an external process, so we have to install pygments, that in windows is non-trivial
(but it's included by default in overleaf and it's in all the repos in the main linux distros, which I think it's the main user experience by now ...)

I have only tested this pr in linux, so please merge it only in devel, if I have time in the coming days, I will test it in overleaf and ask someone to test it in windows.

In this commit we include the minted package and define a default style
to use it.
We also have to use scrwfile to allow to open more than 16 files
concurrently to avoid a write error.
The macro is not defined when we include minted.
Minted requires the -shell-escape option, that is not recommended if you
don't need it because it can be a security risk, as it allows latex to
execute arbitary commands.
We need to use a new file as the listings environment is very delicate
and fails to compile if we use ifthenelse in the same file as the code.
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