I'm trying to read through the Beamer manual, but I don't even really know what I'm looking for, so please help.
How do I change globally (but even if it is a per-frame, it will be still good) size of the verbatim blocks?
I'm trying to read through the Beamer manual, but I don't even really know what I'm looking for, so please help.
How do I change globally (but even if it is a per-frame, it will be still good) size of the verbatim blocks?
Add the following to the preamble of your script:
\makeatletter
\def\verbatim{\tiny\@verbatim \frenchspacing\@vobeyspaces \@xverbatim}
\makeatother
This should globally change any verbatim environment in your document. Just change
\tiny
to whatever font size you are looking for.
The best strategy for this is to load the fancyvrb package; with
\usepackage{fancyvrb}
\fvset{fontsize=\footnotesize}
\RecustomVerbatimEnvironment{verbatim}{Verbatim}{}
your verbatim environments will all be printed using \footnotesize. If you want to override the setting for a particular environment, you can say
\begin{verbatim}[fontsize=\huge]
(well, maybe not \huge, that's only to give the idea); or issue
\fvset{fontsize=\normalsize}
inside a frame for the setting to hold only in that frame.
Of course you know that frames containing verbatim material should be announced by \begin{frame}[fragile].
org-mode of Emacs. It was by chance that it was possible to solve it through using some LaTeX code directly, but my original intention / expectation was that it would be possible to solve it by the means of org-mode (eg. through properties). Also, as a side effect of moving this question you made it impossible for the authors of other answers to reply to the comment, if there will be any.
– wvxvw
Sep 15 '13 at 19:10
org-mode? What has org-mode to do with the typesetting of LaTeX material?
– egreg
Sep 15 '13 at 19:18
org-mode has settings to export to TeX, and then to export TeX to PDF. Beamer manual was a poor choice of words, I was referring to http://orgmode.org/worg/exporters/beamer/ox-beamer.html (Worg manual) on Beamer export.
– wvxvw
Sep 15 '13 at 19:21
org-mode, but I simply don't know it's there? It may as well just do the same what has been suggested here.
– wvxvw
Sep 15 '13 at 19:34
Alternatively you could try to use the 'verbatim' package. I do this with:
\usepackage{verbatim}
\makeatletter
\def\verbatim@font{\scriptsize\ttfamily}
\makeatother
which changes the size of all verbatims to scriptsize.
\verb commands. Loading verbatim is not necessary, as \verbatim@font is a feature of the LaTeX kernel.
– egreg
Sep 15 '13 at 15:12
:BEAMER_envargs: [size=small]property to the particular frame (it contained only verbatim block). Wouldn't there be any way to define this on a per-frame level? – wvxvw Sep 14 '13 at 18:56\newcommand\totiny{\tiny\selectfont}. You can then add the\totinycommand to any frame that you are creating. A frame in which the\totinycommand is used will have tiny font. A frame in which the command is not used will use the default settings. – Sep 14 '13 at 19:23