# Bold text in newenvironment

I want to define my own environment, like

\newenvironment{question}
{\begin{tiny}}
{\end{tiny}}


That may not make much sense, but it works. How can I do the same with bold font?

-
There is no environment tiny. There is a command \tiny. The same can be achieved with \bfseries: \newenvironment{foo}{\bfseries}{} –  Marco Daniel Dec 10 '13 at 20:55

You need to use a "switch", achieved by issuing \bfseries at the start of the environment (say boldenv):

\newenvironment{boldenv}
{\bfseries}% \begin{boldenv}
{}% \end{boldenv}


The scope of this switch is limited to the environment, since \begin{boldenv} ... \end{boldenv} naturally forms a group. Also, italicized text inside this environment will inherit the bold switch (for example, if you use \textit{<stuff>}). To avoid this, you'd have to restore the font using something like {\normalfont\itshape <stuff>}.

-

There is no environment tiny. There is a command \tiny. The same can be achieved with \bfseries: \newenvironment{foo}{\bfseries}{}

I think it's important to mention a fact which is mostly unknown: Don't use font commands as environments.

Explanation:

Let me start with a small example and the unwanted output:

\documentclass{article}
\usepackage[ngerman]{babel}
\usepackage{blindtext}
\begin{document}
\blindtext
\begin{quote}\tiny\blindtext\end{quote}
\blindtext
\begin{quote}\begin{tiny}\blindtext\end{tiny}\end{quote}
\end{document}


What happened

First you can see the different line spacing. In the first example (the correct one) \begin{quote}\tiny\blindtext\end{quote} the command \par is executed with the font size \tiny. So the space is correct. In the second example \begin{quote}\begin{tiny}\blindtext\end{tiny}\end{quote} the inner environment makes a local switch to \tiny and the closing \par by quote uses the default font size. So the complete paragraph is getting the wrong spacing.

-