This question is closely related to several other questions here, but I believe it hasn't been asked (or answered) exactly like this.
Is it possible to change the font size in verbatim
and Verbatim
using a scale parameter?
For example, I know I can do
\setmonofont[Scale=0.8]{Menlo}
to globally change \texttt
. And from answers I've seen here I know I can change the font size in verbatim
using
\makeatletter
\patchcmd{\@verbatim}
{\verbatim@font}
{\verbatim@font\small}
{}{}
\makeatother
or adjust Verbatim
using
\begin{Verbatim}[fontsize=\small]
But suppose I don't want to specify \small
, but instead use a scale factor like 0.8. Can this be done? Is there also a way modify it for all Verbatim
blocks as well?
I am using LuaLaTeX.