I used the solution given at https://tex.stackexchange.com/a/34292/77602. But I am not getting the titles of the sections. As it's an article with no chapters, I deleted the chapter stuff. So it's
\documentclass[]{article}
\usepackage{lipsum}
\usepackage[explicit]{titlesec}
\usepackage[table]{xcolor}
\usepackage{tikz}\usetikzlibrary{shapes.misc}
\newcommand\titlebar{%
\tikz[baseline,trim left=3em,trim right=3cm] {
\fill [cyan!25] (2.5cm,-1ex) rectangle (\textwidth+3.1cm,2.5ex);
\node [
fill=cyan!60!white,
anchor= base east,
rounded rectangle,
minimum height=3.5ex] at (3cm,0) {
\textbf{\thesection}
};
}%
}
\titleformat{\section}{\huge}{\titlebar}{0.1cm}{}
\renewcommand*{\thesection}{\Roman{section}}
\begin{document}
\section{Introduction}
\lipsum[1-2]
\end{document}
I am getting this:


\documentclassup to\end{document}) that shows the issue? – egreg May 05 '15 at 23:40explicitoption. – egreg May 06 '15 at 08:33