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.

This works:

\documentclass{article}

\usepackage{tcolorbox}
\tcbuselibrary{theorems}
\tcbuselibrary{skins}
\newtcbtheorem[number within=section]{coloredtheorem}{Theorem}{colback=red!15{th}

\begin{document}

\begin{coloredtheorem}{Pigs}{pig}
Pigs are pink.
\end{coloredtheorem}

\end{document}

But I want sharp corners. When I change defining line to

\newtcbtheorem[number within=section]{coloredtheorem}{Theorem}{colback=red!15, sharp corners}{th}

I get

Package pgfkeys Error: I do not know the key '/tcb/sharp corners' . . .

Is this a bug in packaging system? I am using Fedora Linux version 20, TeXLive installed from rpm-packages and system is updated with yum.

share|improve this question
1  
I'm quite sure that your version is too old. The log-file contains the version information and it should be version 3.12 (2014/07/29) as Harish Kumar wrote in his answer. –  Thomas F. Sturm Aug 18 at 8:50
    
@thomas-f-sturm, you are right. There is 2013/12/17 version 2.60 at my TeXLive. –  Jori Mäntysalo Aug 18 at 10:46

1 Answer 1

up vote 7 down vote accepted

You are missing the closing brace in colback=red!15{th} after 15. For me sharp corners works though. I am using version 3.12 (2014/07/29).

As an alternative you can add arc=0pt,outer arc=0pt as the options to tcolorbox to make sharp corners.

\documentclass{article}

\usepackage{tcolorbox}
\tcbuselibrary{theorems}
\tcbuselibrary{skins}
\newtcbtheorem[number within=section]{coloredtheorem}{Theorem}{colback=red!15,arc=0pt,outer arc=0pt}{th}

\begin{document}

\begin{coloredtheorem}{Pigs}{pig}
Pigs are pink.
\end{coloredtheorem}

\end{document}

enter image description here

share|improve this answer
    
Thanks, that was fast! FYI, I have sent link to this page to creator of tcolorbox package. –  Jori Mäntysalo Aug 18 at 8:18
    
@JoriMäntysalo You are welcome. :-) –  Harish Kumar Aug 18 at 8:19

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.