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.
https://bugs.launchpad.net/bugs/1574052

Title:
  titlesec does not render section numbers

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/texlive-extra/+bug/1574052/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to