2

I change code to tcbset for tcbposter from topic: style box with line

But this converted code is fail: "TeX capacity exceeded, sorry [input stack size=5000]

\documentclass[a4paper,8pt]{article}
\usepackage[left=1.0cm,right=0.3cm,top=0.5cm,bottom=0.5cm]{geometry}
\usepackage[most]{tcolorbox}
\usepackage{pgf,tikz}

  \tcbset{
  mystylebox/.style 2 args={%
    enhanced,
    top=0mm,left=2pt,right=2pt,
    enlarge top by=\baselineskip/2+1mm,
    enlarge top at break by=0mm,pad at break=2mm,
    fontupper=\normalsize,
        %title={#1},
    overlay unbroken and first={%
        \draw[fill=yellow]
        ([xshift=16pt,yshift=12pt]frame.north west) -| ++ (2,-2) 
        -- ++ (-1,0.3) -- ++ (-1,-0.3) -- cycle;
        \node[anchor=north west,text width=2cm-4pt,align=center] at ([xshift=6pt,yshift=12pt]frame.north west)
          {#2};
        },
breakable,arc=4mm,
colframe=blue!80!red,colback=white,
width=\textwidth, 
before upper ={\parshape 5
1.2cm \dimexpr \hsize-1.2cm\relax
1.2cm \dimexpr \hsize-1.2cm\relax
1.2cm \dimexpr \hsize-1.2cm\relax
1.2cm \dimexpr \hsize-1.2cm\relax
0pt \hsize}
        title={#1},
    }
}

\begin{document}
\begin{tcbposter}[poster = {columns=4, rows=7, width=0.5\textwidth, height=0.5\textheight,spacing=0.1mm}]

\posterbox[width=4.0cm,height=4.0cm,mystylebox={colframe=blue}{NAME}]{column=1, row=5, rowspan=0.7}{some text some text some text some text some text some text some text some text
some text some text some text some text some text some text some text some text
some text some text some text some text some text}
\end{tcbposter}
\end{document}

enter image description here

Please help

Thanks

3
  • The \node command is not wrong here, but you are mixing many different things and it is not clear what you want to achieve. The way you set up things, before upper gets ignored.
    – user194703
    Aug 31 '19 at 15:53
  • @schroediner's cat. Thanks. You 're right. can you change your code in this case - for tcbset. Thanks
    – latexforti
    Aug 31 '19 at 17:48
  • And in posterbox
    – latexforti
    Aug 31 '19 at 17:50
1

Your syntax for \node was not correct:

\documentclass[a4paper,8pt]{article}
\usepackage[left=1.0cm,right=0.3cm,top=0.5cm,bottom=0.5cm]{geometry}
\usepackage[most]{tcolorbox}
\usepackage{pgf,tikz}

\tcbset{
  mystylebox/.style 2 args={%
    enhanced,
    top=0mm,left=2pt,right=2pt,
    enlarge top by=\baselineskip/2+1mm,
    enlarge top at break by=0mm,pad at break=2mm,
    fontupper=\normalsize,
        title={#1},
    overlay unbroken and first={%
        \draw[fill=yellow]
        ([xshift=6pt,yshift=12pt]frame.north west) -| ++ (1,-2) 
        -- ++ (-0.5,0.3) -- ++ (-0.5,-0.3) -- cycle;
        \node[anchor=north west,text width=1cm-4pt,align=center] at ([xshift=6pt,yshift=12pt]frame.north west)
          {#2};
        }
    }
}

\begin{document}
\begin{tcbposter}[poster = {columns=4, rows=7, width=0.5\textwidth, 
height=0.5\textheight,spacing=0.1mm}]       
    \posterbox[width=4.0cm,height=4.0cm,mystylebox={colframe=blue}{NAME}]{column=1, row=5, 
    rowspan=0.7}{xxx yyy}
\end{tcbposter}
\end{document}

enter image description here

1
  • thanks. can you please edit to create same box in my attached image? Thank
    – latexforti
    Aug 31 '19 at 7:50

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.