Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?!

share|improve this question
    
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
1  
@LudovicC.: you might consider to turn your comment into an answer. –  Claudio Fiandrino Aug 21 '13 at 9:35
add comment

2 Answers

up vote 3 down vote accepted

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... )

share|improve this answer
add comment

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}}
\def\thmbox@head#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%
     \advance\dimen0-\thmbox@hskip%
     \advance\dimen0-\thmbox@thickness%
     \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%
    \advance\thmbox@dim-\thmbox@leftmargin%
    \advance\thmbox@dim-\thmbox@rightmargin%
    \advance\thmbox@dim2\thmbox@hskip%
    \advance\thmbox@dim2\thmbox@thickness%
  \fi\fi%
  \noindent%
  {\dimen0=\thmbox@leftmargin%
   \advance\dimen0-\thmbox@hskip%
   \advance\dimen0-\thmbox@thickness%
   \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:

Output

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.