titlesec does not render section numbers

Bug #1574052 reported by Shen Yichen on 2016-04-23
This bug affects 17 people
Affects Status Importance Assigned to Milestone
texlive-extra (Ubuntu)
Nominated for Xenial by Connor Imes

Bug Description

The titlesec package does not work properly after distribution upgrade to 16.04LTS.

Steps to reproduce:
1) Create a tex document and include titlesec
2) Create some sections headers via \section{Some section}
3) Run pdflatex/lualatex/xelatex

What should happen
The section should be created with the corresponding number: 1 Some Section

What happens
Only the text is present: Some Section

If the section header format is changed via \titleformat, the entire formatting disappears from the final pdf.

Might be related to https://groups.google.com/forum/#!topic/comp.text.tex/MBd3-o2Dzx8

Ubuntu Version: 16.04 LTS
texlive-latex-extra Version: 2015.20160320-1

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in texlive-extra (Ubuntu):
status: New → Confirmed
Revision history for this message
Davide Alberelli (dadexix86) wrote :

This is really annoying.

Anyobody knows how to correct this problem (it is corrected in the new TexLive version), as a workround while we wait for the developers?

Revision history for this message
Shen Yichen (2007-yichen) wrote :

One workaround that worked for me was to manually download the titlesec package from CTAN: https://www.ctan.org/pkg/titlesec?lang=en.

Then, either change the \usepackage to point to where you placed the new titlesec.sty, or just unpack the entire package right next to the tex file. It should overwrite the default system titlesec package.

Revision history for this message
Davide Alberelli (dadexix86) wrote :

What worked for me, is to unpack it directly in the system directory, since I use it in many different places.

Revision history for this message
Frédéric Grosshans (fgrosshans) wrote :

Another work-around is given on tex.sx at http://tex.stackexchange.com/a/300259/1913 (cu’n{pasted below)

You can cure the bug by adding



after \usepackage{titlesec}.

Revision history for this message
Frédéric Grosshans (fgrosshans) wrote :

The issue affects titlesec version 2.10.1 but was corrected in version 2.10.2 (released 2016/03/21)

Revision history for this message
Connor Imes (ckimes) wrote :

Yakkety has a newer version so presumably it is fixed there - can anybody confirm?
Still outstanding in Xenial though.

Changed in texlive-extra (Ubuntu):
importance: Undecided → Low
status: Confirmed → Triaged
Revision history for this message
Harris Anggara (harrisanggara) wrote :

i'm using ubuntu 16.04 with ppa:lyx-devel/release
they still provide titlesec 2.10.1, and yes this bug affects me too.

installing tittlesec 2.10.2 on /usr/share/texlive/texmf-dist/tex/latex/ fix the problem.

Revision history for this message
claus (claus2) wrote :


I'm also affected. As I work on a collaborative document where I cannot just change the basic document to make workarounds this bug is really a show stopper for me.
Could a maintainer please
 * change importance to medium or more?
 * give some information on why the newer version of titlesec cannot be packaged? I read "The issue has been solved with titlesec version 2.10.2 (released 2016/03/21)" at http://tex.stackexchange.com/questions/299969/titlesec-loss-of-section-numbering-with-the-new-update-2016-03-15?
Thanks for your help!

Revision history for this message
Connor Imes (ckimes) wrote :

Nominated for Xenial since this is presumably fixed in Yakkety. I understand your frustration, claus. I also would very much like this fixed in Xenial, but I still believe (to my own dismay) that the Low importance is appropriate per the triage guidelines - see https://wiki.ubuntu.com/Bugs/Importance.

To get this fixed in Xenial, somebody needs to go through the process for a SRU - https://wiki.ubuntu.com/StableReleaseUpdates

Revision history for this message
Niels van Adrichem (nvanadrichem) wrote :

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}.

 % Package titlesec is on version 2.10.2 or higher, nothing to do %
 % Check if package titlesec is on version 2.10.1 %
  % Package titlesec on version 2.10.1, patch accordingly %
  % Package titlsecon is on version 2.10.0 or lower, nothing to do %

Revision history for this message
Michael Shulman (shulman) wrote :

Niels, thanks for that conditional patch code! But don't you need the \makeatletter *before* the \@ifpackagelater?

Revision history for this message
Niels van Adrichem (nvanadrichem) wrote :

Hi Michael, that is perfectly possible, I have actually adopted it in a class-file, so I have not tested it with the \makeatletter and \makeatother commands myself. I tried to (apparently incorrectly) adapt the code to the use-case of Frédéric. Please try for yourself what works, thank you for your observation.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers