-
Notifications
You must be signed in to change notification settings - Fork 127
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
Feature request: allow to specify options to pass to pygmentize #49
Comments
There isn't a documented way to do this (yet), but you can use the internal macros to add a new option. If your filter takes an argument, something like this in your preamble, after loading \makeatletter
\minted@define@opt{kwrename}{-F kwrenamefilter}{#1}
\makeatother If your filter is just an on/off boolean, then something like this should work. \makeatletter
\minted@define@switch{kwrename}{-F kwrenamefilter}
\makeatother |
I tried with this latex file (compiled with \documentclass[11pt]{article}
\usepackage{minted}
\usemintedstyle{emacs}
\makeatletter
\minted@define@switch{kwrename}{-F kwrenamefilter}
\makeatother
\begin{document}
This is a test of the filter.
\begin{minted}[kwrename]{coq}
Lemma foo : forall x, x -> x.
\end{minted}
\end{document} I'm using the minted from texlive 2013. Is is recent enough? |
If you want to test, the filter is here: https://github.com/brabalan/kwrenamefilter The output should be like this: "Lemma foo : ∀ x, x → x." |
Well, this turned out to be quite tricky. What I suggested would have worked in most cases, but it failed in this case because the substitution you were doing involved Unicode. You will need the latest version of \usepackage{newunicodechar}
\newunicodechar{∀}{$\forall$}
\usepackage{minted}
\usemintedstyle{emacs}
\setminted{encoding=utf8}
\makeatletter
\minted@define@switch{kwrename}{-F kwrenamefilter}
\makeatother By the way, \usepackage[T1]{fontenc}
\usepackage[utf8x]{inputenc}
\usepackage{minted}
\usemintedstyle{emacs}
\setminted{encoding=utf8}
\makeatletter
\minted@define@switch{kwrename}{-F kwrenamefilter}
\makeatother |
Thank you, this worked great. |
I wrote a filter for pygments that I would like to use for some minted listing. I have not found a way to tell minted to call pygmentize with a
-F kwrenamefilter
option (it's the name of my filter).The text was updated successfully, but these errors were encountered: