3

i want to use beautiful box in link: Box with fancy colors

In this post, this code is definited by newtcolorbox. Can you transfer this code to posterbox, so i need to create some box: different title, different size and different position. And one box includes 3 columns.

MWE:

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

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


\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{bidentidad}
\lipsum[4]
\end{bidentidad}

\end{document}

Many Thanks

1 Answer 1

3

You have to define all newtcolorbox parameters into a tcbset style, and use this style as option in posterbox:

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

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

\tcbset{
    bidentidad/.style={
        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={#1},
    }
}

\begin{document}


\begin{tcbposter}[%
    poster={columns=3, rows=3},
    ]
    \posterbox[bidentidad=First Box]{name=A, column=1}{\lipsum[4]}
    \posterbox[bidentidad=Second Box]{name=B, column=1, column=2}{\lipsum[2]}
    \posterbox[bidentidad=Third Box]{name=C, column=1, column=3}{\lipsum[3]}
\end{tcbposter}

\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .