# [Bug 1574052] Re: titlesec does not render section numbers

You can also add the following after \usepackage{titlesec} to only apply
the patch when you're on the specific version of titlesec (which is what
I did on a shared project). Remove the \makeatletter and \makeatother
and change \usepackage to \RequirePackage when you're adding it to your
classfile right after \RequirePackage{titlesec}.

\@ifpackagelater{titlesec}{2016/03/21}{%
% Package titlesec is on version 2.10.2 or higher, nothing to do %
}{%
% Check if package titlesec is on version 2.10.1 %
\@ifpackagelater{titlesec}{2016/03/15}{%
% Package titlesec on version 2.10.1, patch accordingly %
\usepackage{etoolbox}%
\makeatletter

\patchcmd{\ttlh@hang}{\parindent\z@}{\parindent\z@\leavevmode}{}{}%
\patchcmd{\ttlh@hang}{\noindent}{}{}{}%
\makeatother
}{%
% Package titlsecon is on version 2.10.0 or lower, nothing to
do %
}%
}

--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

Title:
titlesec does not render section numbers