2

Does anyone know how to create these?

enter image description here

enter image description here

I think they made it by using tcolorbox but I can't find a way to generate them.

  • 4
    check out page 132 of the manual for something close to the first one – Mark May 8 '15 at 4:59
  • Sorry, which manual? Oh, tcolorbox one? – Alejandro May 8 '15 at 5:01
  • 3
    I admit I should have been explicit, but come on. You had a guess, at least check if it's right! And yes, tcolorbox. – Mark May 8 '15 at 5:07
4

One possibility:

enter image description here

The code:

\documentclass{article}
\usepackage[many]{tcolorbox}
\usepackage{lipsum}

\definecolor{bidentitlebg}{RGB}{158,59,255}

\newtcolorbox{ridentidad}[1][]{
  enhanced,
  frame code={
    \fill[draw=white,top color=white,bottom color=red!60]
      ([xshift=-20pt]title.north west) --
      (title.south west) --
      (title.south east) --
      ([xshift=20pt]title.north east) -- cycle;
    \draw[red,line width=0.4mm,rounded corners]
      (frame.north west) --
      (frame.south west) --
      ([xshift=-20pt]title.north west) --
      (title.south west) --
      (title.south east) --
      ([xshift=20pt]title.north east) --
      (frame.south east) --
      (frame.north east);
  },
  coltitle=red!70!black,
  colback=white,
  attach boxed title to bottom center,
  boxed title style={empty},
  fonttitle=\bfseries\sffamily,
  title=\strut Identidades,
  #1,
}

\newtcolorbox{bidentidad}[1][]{
  enhanced,
  skin=enhancedlast jigsaw,
  attach boxed title to top left={xshift=-4mm,yshift=-0.5mm},
  fonttitle=\bfseries\sffamily,
  colbacktitle=blue!45,
  colframe=red!50!black,
  interior style={
    top color=blue!10,
    bottom color=red!10
  },
  boxed title style={
    empty,
    arc=0pt,
    outer arc=0pt,
    boxrule=0pt
  },
  underlay boxed title={
    \fill[blue!45!white] 
      (title.north west) -- 
      (title.north east) -- 
      +(\tcboxedtitleheight-1mm,-\tcboxedtitleheight+1mm) -- 
      ([xshift=4mm,yshift=0.5mm]frame.north east) -- 
      +(0mm,-1mm) -- 
      (title.south west) -- cycle;
    \fill[blue!45!white!50!black] 
      ([yshift=-0.5mm]frame.north west) -- 
      +(-0.4,0) -- 
      +(0,-0.3) -- cycle;
    \fill[blue!45!white!50!black] 
      ([yshift=-0.5mm]frame.north east) -- 
      +(0,-0.3) -- 
      +(0.4,0) -- cycle; 
  },
  title={Identidades},
  #1
}

\begin{document}

\begin{ridentidad}
\lipsum[4]
\end{ridentidad}

\begin{bidentidad}
\lipsum[4]
\end{bidentidad}

\end{document}

The code for the second one was taken directly from page 133 of the tcolorbox manual.

  • @Gonzalo How can we have the first one such that the bottom title box is also at the top (symmetrical), thus we have two titles. – blackened Nov 16 '17 at 12:12

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.