I would like to have a top and a side border around my section heading like this


I'm using titlesec \titleformat to define my sections.

So far I've been able to add a top rule by putting a \titlerule in the font definition but the side border is difficult. I suspect I should use some kind of more graphical package to set my borders but I don't know how to incorporate these into a \titleformat.

\titleformat{\subsubsection} % Customize the \subsection{} section title
\sffamily\footnotesize\bfseries\color{cyan}} % Title font customizations
{\thesubsubsection} % Subsection number
{12pt} % Whitespace between the number and title
{\footnotesize} % Title font size
\titlespacing*{\subsubsection}{0mm}{3mm}{0mm} % Left, top and bottom spacing around the title

Relating to my comment, maybe this as a starting point:



 \tikz[overlay]{ \draw [cyan,line width=.2ex] (-1.5ex,-1.5ex) -- (-1.5ex,3ex) -- (\textwidth,3ex); }%



\subsubsection{Another Subsubsection}



This yields:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.