I am using the minted
package to highlight source code.
How can I set the options parameter globally for \inputminted
? I want to do this because I have a lot of php code files that I will include in my document and I do not want to lose time to specify the options each time.
I have tried to define the default values for mint with the command:
\newmint{php}{
%options
}
and after that tried:
....
\inputminted{php}{foo.php}
....
and after compile the settings that I have done with \newmint
are ignored.
Is there a way to solve this problem?
L.E: This is what i got until now:
\documentclass[a4paper,12pt,fleqn,twoside,openright]{article}
%php syntax highlight
\userpackage[chapter]{minted}
\definecolor{mintedbackground}{rgb}{0.95,0.95,0.95}
\newmint{php}{
bgcolor=mintedbackground,
fontfamily=tt,
linenos=true,
numberblanklines=true,
numbersep=12pt,
numbersep=5pt,
gobble=0,
frame=leftline,
framerule=0.4pt,
framesep=2mm,
funcnamehighlighting=true,
tabsize=4,
obeytabs=false,
mathescape=false
samepage=false, %with this setting you can force the list to appear on the same page
showspaces=false,
showtabs =false,
texcl=false,
}
\begin{document}
\inputmined{php}{foo.php}
\end{document}
% The settings for php are ignored.
L.E: I have found in the documentation of minted that i can use \newmintedfile
Finally, define a new language-specific alias for \inputminted
.
The problem is that I do not understand from the example in doc how can I define the global settings.
minimal working example
; a minimal, yet complete document showing the relevant settings and illustrating the problem.