Giter VIP home page Giter VIP logo

Comments (3)

gpoore avatar gpoore commented on August 14, 2024 4

The situation with custom lexers (and just about everything else) is going to change significantly over the next 6-8 months. I've recently received a grant from the TeX User's Group to create minted v3.0. This will replace pygmentize with a new, minted-specific Python executable that is compatible with restricted shell escape (so no more -shell-escape with accompanying security vulnerabilities). This new executable will also make it possible to extend minted using Python, not just LaTeX macro programming as currently. So in the next 6-8 months, it should be possible to have a LaTeX option like extrakeywords={vec3, Atom, System}, and then this will be passed to Python through the new LaTeX-Python interface, and finally the lexer can be customized on the Python size. I'm currently working on the final releases for minted 2.x and programming the new LaTeX-Python interface. Beta versions of the new executable will probably become available around the end of the year or early in 2024. I'm hoping to get the initial minted v3.0 release into the initial TeX Live 2024 release, but we'll have to see how things go.

from minted.

muzimuzhi avatar muzimuzhi commented on August 14, 2024

My main question is: How would one go about setting environment variables in a LaTeX file such that they will be in effect before Minted executes pygmentize?

minted/source/minted.dtx

Lines 1626 to 1629 in 5c4cf60

% \item \textbf{I want to use a custom script/executable to access Pygments, rather than |pygmentize|.} Redefine |\MintedPygmentize|:
%\begin{verbatim}
%\renewcommand{\MintedPygmentize}{...}
%\end{verbatim}

But it's a misuse. And, ways to set environments variables are OS-specific.

Ah, redefining \MintedPygmentize may affect too much. minted also executes sth like \MintedPygmentize\space -S <style> -f <formatter> -P commandprefix=PYG > <output_file> to create .pygstyle files, and at this time setting env vars is useless (hope it also does no harm).

from minted.

hackerb9 avatar hackerb9 commented on August 14, 2024

The situation with custom lexers (and just about everything else) is going to change significantly over the next 6-8 months. I've recently received a grant from the TeX User's Group to create minted v3.0. This will replace pygmentize with a new, minted-specific Python executable that is compatible with restricted shell escape (so no more -shell-escape with accompanying security vulnerabilities).

Never have I been so happy to be told "No". 😁

🎉

from minted.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.