1

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.

\documentclass{beamer}
\usepackage{framed}
\usepackage{colourchange}
\usepackage{amsmath}
\usepackage{amsmath,amssymb}%      pour les maths
\usepackage{enumitem}
\usepackage[most]{tcolorbox}
\usepackage{tikz}

\newcommand{\sectiontitlepage}[1]{
\selectmanualcolour{#1}
\begin{frame}
\begin{tcolorbox}[enhanced,
    title=\sc Part \thesection, center title,
    fonttitle=\bfseries,
    coltitle=black,
    colbacktitle=#1!50!white,
    colback=#1,
    colframe=#1!50!black,
    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;}}
]
   \center\LARGE\textcolor{black}{\secname}
  \end{tcolorbox}
\end{frame}
}
\begin{document}
\section{A part}
\sectiontitlepage{white}
\end{document}

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