# Decorate a centred title with pgfornament

Would you kindly give me a help to decorate a title with pgfornment package.

I have the following code

 \newcounter{exo}[subsection]
\newenvironment{exo}[1][]
{\edef\@exer{#1}%
{\Large $\mathscr{E}\mathbf{xercice}$ \shadowbox{\theexo }}%

• Welcome to tex.sx. There are some things here, like \@exer that require code that isn't shown. Please enlarge this to a small compilable example that potential helpers can copy and paste to experiment with. – barbara beeton Dec 25 '20 at 15:01