The result of an escapeinside in minted is typeset as-is, and not fed into the lexer. This is by design, as I understand. How can I change minted's behavior so that the result of the escapeinside is lexed together with the rest of the code?

In other words, how can I generate source code dynamically and feed it into the lexer?



generates two different lines, whereas I would like it to generate twice exactly the same line:

enter image description here

From the above code (first line), minted generates the fancyvrb line


whereas what I want is the \something command inside the \PYG call, something like


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.