3

I'm using tcolorbox but the first letter of the body text always disappears.

\documentclass[11pt, oneside]{article}      
\usepackage[english]{babel}         
\usepackage{tcolorbox}              
\tcbuselibrary{theorems}                
\newtcbtheorem[number within=section]{myprop}{Proposition}{colback=blue!5,colframe=blue!35!black,fonttitle=\bfseries}{th}

\begin{document}
\begin{myprop}{Proposition name}
Just some text.
\end{myprop}
\end{document}

The previous code results in: enter image description here

It's a fairly easy to just type the first letter twice (which yields the desired effect) but if there is a more legitimate solution I'm interested in hearing it.

Edit: Arun Debray is correct. The environment takes two arguments and should be written as \begin{myprop}{Proposition name}{label}. Problem solved!

  • 2
    Any environment defined by \newtcbtheorem takes two arguments: the proposition name and the proposition label. Since you didn't specify the label, the parser gobbles the first letter as the label. Try using \begin{myprop}{Prop. name}{prop_label}. – Arun Debray Sep 8 '16 at 15:29
  • @ArunDebray: Write up an answer... – Werner Sep 8 '16 at 15:40
2

Any environment defined by \newtcbtheorem takes two arguments: the proposition name and the proposition label. Since you didn't specify the label, the parser gobbles the first letter as the label. Try using \begin{myprop}{Prop. name}{prop_label}.

Source: p. 328 of the tcolorbox documentation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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