# How to change overall font size of minted? [duplicate]

While using minted I can change font size (Change font size in minted) on each individual place using the fontsize=\footnotesize:

\begin{listing}
\inputminted[fontsize=\footnotesize]{javascript}{file.js}
\end{listing}


Can I set this once for the entire document?

## marked as duplicate by CarLaTeX, user156344, Stefan Pinnow, Raaja, Andrew SwannApr 14 at 18:50

With \setminted{fontsize=...} you can set the default font size for all your minted environments.

If you explicitly indicate a font size in a single minted environment, it overrides the default.

I think your question is a duplicate of Minted, setstretch and font size, but there the more correct answer is Himura's one.

\documentclass{article}
\usepackage{minted}
\setminted{fontsize=\footnotesize}
\begin{document}
\noindent\verb|\footnotesize| is the default font size:
\begin{minted}{objc}
if you do not specify another fontsize
your minted environment will be footnotesize
\end{minted}
\begin{minted}{objc}
all your minted evronments will be footnotesize
\end{minted}
Unless you specify another font size:
\begin{minted}[fontsize=\large]{objc}
this is large
\end{minted}
\end{document}