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


to globally change \texttt. And from answers I've seen here I know I can change the font size in verbatim using


or adjust Verbatim using


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.

1 Answer 1


You can define a command for setting the font size to a fraction of the current font size.





This is normalsize with \texttt{monospaced text}
This is scaled 80%
Again normalsize
This is scaled 50%


enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.