I'm using minted package for code listing, however I don't like some of the colors too much. Is it possible to configure these colors? For example, When I display the colors to view XML color, the keyword appear green which I don't want. Can somebody explain of this is possible?
I'm including the package and including the XML code:
\usepackage{minted}
\inputminted{xml}{codeListings/test.xml.tex}
Best Answer
Let me try to show your a way at LaTeX level.
First of all we must analyze the way pygmentize highlight the code and how do we get highlighted code in LaTeX.
If you have something like the following code:
Now the contents of the environment is written to the file
\jobname.pyg
. Now pygmentize get its chance. After running it you will have a file named\jobname.out.pyg
with the following contents:Now we see that every highlight at LaTeX-Level is done by the command
\PY
which has two mandatory arguments. The first one is the style and the second the highlighted string.Now we need the definition of
\PY
and friends:pygmentize also change special characters to commands to prevent any conflicts:
Related to the commands above and the character definition the highlighting is done by:
If you want to change something it must be done between
\makeatletter
andmakeatother
and inside\AtBeginDocument
:Here my test file: