In PSTricks, the following code:
\documentclass{article}
\usepackage[usenames]{pstcol}
\usepackage{pst-plot}
\usepackage{pst-grad}
\begin{document}
\noindent
\psshadowbox[linecolor=Green,framearc=0.5,linewidth=0.3pt,fillstyle=gradient,
gradbegin=ForestGreen, gradend=GreenYellow,framesep=5pt,
shadowcolor=SpringGreen,
gradmidpoint=1]%{$\mathcal{P}_{113}$}\\[2.9cm]
{\huge{\textbf{P 113}}}\\
\psshadowbox[linecolor=Green,framearc=0.5,linewidth=0.3pt,fillstyle=gradient,
gradbegin=ForestGreen, gradend=GreenYellow,framesep=5pt,
shadowcolor=SpringGreen,
gradmidpoint=1]%{$\mathcal{P}_{113}$}\\[2.9cm]
{\Large{\textbf{P 113}}}\\
\end{document}
generates the following figure (300% zoom):
Is there any way to make the same figure with TikZ? I found a template with which I could do something similar, but with fixed width:
\documentclass[svgnames]{article}
\usepackage{tikz}
\usepackage{array}
\usetikzlibrary{shadows}
\newcommand{\pbox}[4]{%
\begin{tikzpicture}
\node[#3] {\begin{minipage}[t][#2][t]{#1}%
#4
\end{minipage}};
\end{tikzpicture}}
\begin{document}
\pbox{0.21 \textwidth}{}{rectangle,drop shadow, fill=Red,rounded corners=5pt,inner sep=6pt,
shade,top color=ForestGreen, bottom color=GreenYellow, draw=Green}
{\centering{\Huge{\textbf{P 113}}}}
\pbox{0.13 \textwidth}{}{rectangle,drop shadow, fill=Red,rounded corners=5pt,inner sep=6pt,
shade,top color=ForestGreen, bottom color=GreenYellow, draw=Green}
{\centering{\Large{\textbf{P 113}}}}
\end{document}
What I want is that the width of the box to automatically adapt the text (as with \psshadowbox
) without having to vary the fraction \textwidth
individually. On the other hand, I would change the color of the shadow made with TikZ to be the most similar to done with PSTricks block.