[Tex/LaTex] Changing font size in an example environment

examplesfontsizelinguistics

I'm new at LaTeX and I've been reading many questions-answers, but I still can't find something that works for what I need.
I'm using the covington package because I'm working with gloss. So, this is what I have:

\documentclass[a4paper, 11pt]{article}  
%more packages and things here  
\usepackage{covington}  
\begin{document}  
\section{bla bla bla}  
Text here  
\begin{example}  
\gll El hombre mira \textbf{a} esta mujer  
     The.DET man.MASC {looks at.TRANS} {} {this.DET} woman.FEM  
\glt 'The man looks at this woman'  
\glend  
\end{example}
\end{document}

What I want to do is to make the font size of the example smaller (10pt, maybe?), because I have some examples that are a bit longer and they look terrible (the lines break and I have like half of the page with only one example).
Any tip?

Best Answer

For a single example, you can use a font size changing command at the beginning of the environment, such as

\begin{example}
\small
...
\end{example}

The effect is local to that environment, so the size will be normal after \end{example}.

For a global and consistent change, you could use for example etoolbox:

\usepackage{etoolbox}
\AtBeginEnvironment{example}{\small}

If you don't want do load etoolbox, you can patch it yourself, also in your preamble:

\makeatletter
\g@addto@macro{\example}{\small}
\makeatother

And if you also would like to avoid using internal macros, which is a good thought, you could do it by

\expandafter\def\expandafter\example\expandafter{\example\small}
Related Question