How do I define a new environment so that the text in it is all in small font, or in tiny font, say?

I have the example


in mind, which usually has fixed-width output. (Yes, I still want fixed-width output, just in small font.)

I know about the commands \small an \tiny - I just wonder where to put them.

  • 4
    Welcome to TeX.SE! See my answer here: tex.stackexchange.com/questions/417711/… -- replace \rmfamily with \small, so \newenvironment{mysage}{\small\sageblock}{\endsageblock} should work
    – user31729
    Mar 2, 2018 at 15:45
  • @ChristianHupfer Not really: at least you need \par in front of \small.
    – egreg
    Mar 2, 2018 at 18:31

1 Answer 1


Since sageblock is based on verbatim of the homonymous package, you can do




Abc def ghi
aaa bbb ccc
Abc def ghi
aaa bbb ccc
Abc def ghi


enter image description here

A naïve definition such as


would not work.

  • Thanks for calling my proposition naïve ... I was just too lazy in order to look what \sageblock does
    – user31729
    Mar 2, 2018 at 20:55
  • Why wouldn't a naive definition work? It seems to work for me. Mar 3, 2018 at 22:54
  • @HAHelfgott If you don't have a blank line before the environment, the line spacing would go awry.
    – egreg
    Mar 3, 2018 at 23:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .