% macros=mkvi

\starttext

    \starttexdefinition MyOtherHeader #where #day #month #year #title #number

        \defineoverlay[whatever][\useMPgraphic{whatever}]

        \startuseMPgraphic{whatever}

            draw OverlayBox withpen pencircle scaled .5pt dashed evenly ;

            picture p ; p := textext("\it\quad#where\space\endash\space\date[d=#day,m=#month,y=#year]\quad")
                shifted .5[ulcorner OverlayBox,urcorner OverlayBox];

            fill boundingbox p withcolor white ; draw p ;

            setbounds currentpicture to OverlayBox ;

        \stopuseMPgraphic

        \framed [
            width=\hsize,
            height=5em,
            foregroundstyle=\cap\bf,
            background=whatever,
            frame=off,
        ] {
            #title
            \space
            n\high{o}
            \space
            #number
        }

    \stoptexdefinition

    \MyOtherHeader{Seconde GTA}{11}{1}{2014}{Devoir de Math��matiques}{7}

\stoptext
