TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have several slides in a beamer presentation where i'm presenting some programming code. However, the font ends up being too large and isn't fully featured on the slide. How can I change the font on the verbatim on a beamer slide. Furthermore, is there a way to keep it left alligned, but move it closer to the center of the slide.

> library(apsrtable)
> y = rnorm(100)
> x1 = rnorm(100)*3
> mod1 = lm(y ~ x1)

> y2 = rnorm(150)
> x1 = rnorm(150)*3
> mod2 = lm(y2 ~ x1)

> y3 = rnorm(130)
> x1 = rnorm(130)*3
> mod3 = lm(y3 ~ x1)

> apsrtable(mod1, mod2, mod3)


share|improve this question
up vote 7 down vote accepted

if you want to change it for all frames, write into the preamble:


However, package listings or fancyvrb allow more flexible verbatim modes

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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