I am trying to design a custom section. My desire section will be something like this :
But I am unable to get the exact result. This is what I was trying :
Horizontal rule will be joined at the bottom of the section number box. Section number box width will be 60pt and it is fixed. Could you please help to getting my desire result. You can also do it from scratch if you have any easier and standard solution.
My code snippet :
\renewcommand*\thesection{\arabic{section}}
\usepackage[explicit]{titlesec}
\definecolor{myBlue}{HTML}{0088FF}
\titleformat{\section}[block]{\Large\bfseries\sffamily}%
{}%
{0pt}%
{%
\begin{minipage}[c]{60pt}{%
\colorbox{myBlue}{%
\parbox[b][15pt][t]{60pt}{% height, width
\vfill%
\fontfamily{phv}\selectfont\centering\color{white}{\thesection}
\vfill%
}}}%
\end{minipage}%
\hspace{15pt}%
\begin{minipage}[t]{\dimexpr\textwidth-75pt}
\vspace*{-10pt}%
\color{myBlue}{\Large #1}
\end{minipage}\\%
\color{myBlue}{\rule{\textwidth}{1.2pt}}
%
}
\titlespacing*{\section}{0pt}{3mm}{-5mm}
Best Answer
I will let you figure out the colour/sizing part of the problem but a simpler solution would be this one :