# How to have bold font in mdframed environment?

I did not find bold word in the manual. My tex is:

\documentclass{article}
\usepackage[framemethod=tikz]{mdframed}
\newtheorem{question}{Question}
\mdfdefinestyle{que}{
linecolor=cyan,
backgroundcolor=cyan!20,
}
\surroundwithmdframed[style=que]{question}
\begin{document}
\begin{question}
Lorem. % No bolding needed here so save space here, but need to fix the above
\end{question}
\end{document}

How can you have bold font in mdframed environment?

-
So you want Lorem to be bold? –  Werner Feb 23 '14 at 19:25
If you want the whole environment body bold adding the option font=\bfseries to the style definition should do –  clemens Feb 23 '14 at 19:27
@cgnieder: Sounds like the answer. –  Peter Grill Feb 23 '14 at 19:28
And perhaps you want to take a look at the \newmdtheoremenv command as described in Section 8 of the »mdframed« manual. –  Thorsten Donig Feb 23 '14 at 19:38
So you searched for "bold" in the manual, which returned no hits, and you instantly gave up? That's not reasonable... –  Jubobs Feb 23 '14 at 21:56

If I understand your question correctly, you want to have a kind of title for your questions and that title should be bold-faced, In this case, you can define a new theorem style and use the note field (the optional argument) to get the desired result:

\documentclass{article}
\usepackage{amsthm}
\usepackage[framemethod=tikz]{mdframed}

\newtheoremstyle{mystyle}
{\topsep}%
{\topsep}%
{\itshape}%
{}%
{\bfseries}%
{.}%
{.5em}%
{\thmname{#1}~\thmnumber{#2}\thmnote{. \bfseries#3}}%
\theoremstyle{mystyle}
\newtheorem{question}{Question}
\mdfdefinestyle{que}{
linecolor=cyan,
backgroundcolor=cyan!20,
}
\surroundwithmdframed[style=que]{question}
\begin{document}
\begin{question}[Lorem]
Text
\end{question}
\begin{question}
Text
\end{question}
\end{document}

If, on the other side you want all the contents bold-faced, you have two options:

1. If you are not using amsthm, simply add font=\bfseries to the mdframed specifications:

\documentclass{article}
\usepackage[framemethod=tikz]{mdframed}

\newtheorem{question}{Question}
\mdfdefinestyle{que}{
linecolor=cyan,
font=\bfseries,
backgroundcolor=cyan!20,
}
\surroundwithmdframed[style=que]{question}
\begin{document}
\begin{question}
Text
\end{question}
\end{document}

2. If you are using amsthm, you'll need to add the specification to the theorem style:

\documentclass{article}
\usepackage{amsthm}
\usepackage[framemethod=tikz]{mdframed}

\newtheoremstyle{mystyle}
{\topsep}%
{\topsep}%
{\bfseries\itshape}%
{}%
{\bfseries}%
{.}%
{.5em}%
{}%
\theoremstyle{mystyle}
\newtheorem{question}{Question}
\mdfdefinestyle{que}{
linecolor=cyan,
backgroundcolor=cyan!20,
}
\surroundwithmdframed[style=que]{question}
\begin{document}
\begin{question}
Text
\end{question}
\end{document}

Notice that italics plus bold-face might not be the best choice.

-
Very thorough answer again - thank you! –  Masi Feb 23 '14 at 22:56