# Change line thickness in thmtools

I am using the thmbox=M option with thmtools and I would like to change the line thickness of the box. I found how to change the colour in here: thmbox color bar. Is there an easy modification of what is in that post to apply here?!

-
Using the code provided in your link in the answer, you can use the following command to change both color and thickness: \newtheorem[style=M, thickness=1pt,color=red]{theoremExa}{Example}[chapter] – Ludovic C. Aug 21 '13 at 8:54
possible duplicate of thmbox color bar – Ludovic C. Aug 21 '13 at 9:15
Thanks! I was using the thmtools and not thmbox, now I just decided to abandon thmtools and make my life simpler! – user2262793 Aug 21 '13 at 9:31
@LudovicC.: you might consider to turn your comment into an answer. – Claudio Fiandrino Aug 21 '13 at 9:35

All thmtools does is passing on the value of the thmbox key as the optional argument to thmbox' defining command, so

\declaretheorem[thmbox={style=M, thickness=10pt}]{foo}


and you're ready to go. (Apart from the fact that 10pt would be exceedingly ugly... )

-

If you just want to play with the thickness of the line, place this in your preamble:

\newtheorem[style=M, thickness=1pt]{theoremExa}{Example}[chapter]


If you also want to change the colour, you can use this piece of code provided by Marco Daniel in this answer. Here is a MWE with the red colour and 2pt thickness:

\documentclass{book}

\usepackage{thmbox}
\usepackage{xcolor}

\makeatletter
\def\thmbox@color{black}
\define@key{thmbox}{color}{\def\thmbox@color{#1}}
\par\noindent\vbox{%
\setbox\thmbox@box@=\hbox{%
\vrule width 0mm height 0mm depth \thmbox@vskip%
#1}%
\copy\thmbox@box@%
\ifthmbox@underline%
\color@begingroup\color{\thmbox@color}\hrule width \wd\thmbox@box@ height \thmbox@thickness\color@endgroup%
\fi}%
\hrule height 0mm\relax}
\def\thmbox@put#1{
\vskip\z@%
\noindent%
\hbox{%
{\dimen0=\thmbox@leftmargin%
\hskip\dimen0}%
\color@begingroup\color{\thmbox@color}\vrule width \thmbox@thickness\color@endgroup%
\hskip\thmbox@hskip%
\box#1%
\ifx\thmbox@style L%
\hskip\thmbox@hskip%
\color@begingroup\color{\thmbox@color}\vrule width \thmbox@thickness\color@endgroup%
\fi}%
\par\nobreak}
\def\thmbox@tail{%
\hrule height 0mm%
\ifx\thmbox@style M%
\thmbox@dim=1cm%
\else\ifx\thmbox@style L%
\thmbox@dim=\hsize%
\fi\fi%
\noindent%
{\dimen0=\thmbox@leftmargin%
\hskip\dimen0}%
\color@begingroup\color{\thmbox@color}\vrule width \thmbox@dim height \thmbox@thickness\color@endgroup%
\par}
\makeatother

\newtheorem[style=M, thickness=2pt, color=red]{theoremExa}{Example}[chapter]
\begin{document}
\begin{theoremExa}[Example Bla]
Here is my customised theorem.
\end{theoremExa}
\end{document}


for the following output:

-