This question already has an answer here:

I would like to use the style of title given by the following code in article class. Some amendments to the code will have to be made, but I cannot seem to get it to work. I'd be grateful of some help on this, thanks.

\usepackage{amsmath,amssymb}%      pour les maths

    title=\sc Part \thesection, center title,
    attach boxed title to top center={yshift=-0.25mm-\tcboxedtitleheight/2,yshifttext=2mm-\tcboxedtitleheight/2},
    boxed title style={enhanced,boxrule=0.5mm,frame code={ \path[tcb fill frame] ([xshift=-4mm]frame.west) -- (frame.north west) -- (frame.north east) -- ([xshift=4mm]frame.east)-- (frame.south east) -- (frame.south west) -- cycle; },
    interior code={ \path[tcb fill interior] ([xshift=-2mm]interior.west)-- (interior.north west) -- (interior.north east)-- ([xshift=2mm]interior.east) -- (interior.south east) -- (interior.south west)-- cycle;}}
\section{A part}

marked as duplicate by user36296 beamer Feb 10 '17 at 12:46

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    What do you want it to do in article exactly? What have you tried? Don't use macros which are 20+ years obsolete in LaTeX, such as \sc. – cfr Feb 1 '17 at 0:42
  • 1
    Assuming this code has another author and source, please attribute it and provide a link. Not only is this possibly required, it is only common courtesy and, besides, helps people trying to help you enormously if they have queries about the original context and usage. – cfr Feb 1 '17 at 0:44
  • see for example tex.stackexchange.com/a/194601/36296 it customises a chapter heading including a tcolorbox – user36296 Feb 2 '17 at 15:57