4

Having this code I tinkered together:


\documentclass{article}

\usepackage[most]{tcolorbox}

\usepackage{tikzrput}

\usepackage[object=vectorian]{pgfornament} 


\newtcolorbox{frameT}{enhanced, colframe=black,colback=gray!5, boxrule=2pt,arc=6pt,outer arc=60pt,frame hidden, after skip = -12pt, interior style={left color = orange, bottom color = purple}, opacityback = 0.06}
                                  

\begin{document}

\begin{frameT} % Frame not around whole picture 

\begin{center}

\begin{picture}(0,0)%
   \rput(0,0){\Huge Title}%
   \rput[t](0,-1){\pgfornament[width=7cm]{75}}
   \rput(-0.05,-4){\Large Name}%
   \rput[l](-2.6,-4){\pgfornament[width=1cm]{3}}%
   \rput[r](2.6,-4){\pgfornament[width=1cm,symmetry=v]{3}}%

\end{picture}
\end{center}

\end{frameT}

\end{document}

It gives a neat ornamental picture, however the frame of tcolorbox is not fully enclosing .

How do I achieve this?

1 Answer 1

8

By using \begin{picture}(0,0) you are basically setting the size of the picture to 0. You could either choose a suitable size for the picture (might require changing some of the coordinates...) or, as a quick hack, manually add some height with a minipage around the picture:

\documentclass{article}

\usepackage[most]{tcolorbox}

\usepackage{tikzrput}

\usepackage[object=vectorian]{pgfornament} 


\newtcolorbox{frameT}{
enhanced, colframe=black,colback=gray!5, boxrule=2pt,arc=6pt,outer arc=60pt,frame hidden, after skip = -12pt, interior style={left color = orange, bottom color = purple}, opacityback = 0.06
}
                                  

\begin{document}

\begin{frameT} % Frame not around whole picture 
\begin{minipage}[t][5cm]{\textwidth}
\centering
\vskip0.5cm
\begin{picture}(0,0)%
   \rput(0,0){\Huge Title}%
   \rput[t](0,-1){\pgfornament[width=7cm]{75}}
   \rput(-0.05,-4){\Large Name}%
   \rput[l](-2.6,-4){\pgfornament[width=1cm]{3}}%
   \rput[r](2.6,-4){\pgfornament[width=1cm,symmetry=v]{3}}%
\end{picture}
\end{minipage}
\end{frameT}

\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 .