The theorem text is written in italic even if I set font=\normalfont\normalsize
. Maybe related to that, Portuguese "-ção" is not properly recognized in that text.
\documentclass[a4paper,10pt]{book}
\usepackage[brazilian]{babel}
\usepackage{mdframed}
\usepackage{amsmath}
\usepackage{xcolor}
\mdfdefinestyle{definitionSty}{font=\normalfont\normalsize, backgroundcolor=blue!10, linewidth=0pt, innerleftmargin=3ex, innerrightmargin=3ex, innertopmargin=3ex, innermargin =+1cm, outermargin =+1cm}
\newcounter{definitionCounter}[chapter]
\numberwithin{definitionCounter}{chapter}
\newmdtheoremenv[style=definitionSty]{definition}[definitionCounter]{Defini\c{c}\~{a}o}
\begin{document}
\begin{definition}{Medição, grandeza e medida}
\begin{itemize}
\item medição: \textit{processo} pelo qual se mede algo
\item grandeza: \textit{propriedade} quantificada por medição
\item medida: \textit{resultado} do processo de medição
\end{itemize}
\end{definition}
\end{document}
Best Answer
The documentation on this is opaque, but includes an example use that starts
The crucial thing here is the
\theoremstyle
command, which is notmdframed
based, but refers to theamsthm
styling commands. So you need to loadamsthm
, and that has to be done before loadingmdframed
.Note that I am not quite sure how I should be interpreting your argument in the definition environment. Either print it straight as in the first version or put it in square brackets, then there is then an extra
\leavevmode
tweak needed because of theitemize
.Instead of loading
amsthm
you can loadntheorem
, either with theamsthm
option and still use\theoremstyle
, or using its own styling commands. You can also use thethmtools
interfaces to either of these packages.