I can see it in my lyx editor there is number in my section enter image description here

but when I render the pdf there is no number in my section enter image description here

anyone can help me? I think there is a problem with my preamble but I don't know which one because when I delete all my preamble the number is shown

It's seems the problem is with \usepackage{titlesec} what make me confuse is

it only happen in my computer,

when I try to render the same file in my friend's computer the number is shown

my latex preamble

%% \renewcommand{\chapter}[1]{\chapter[#1]{\centering #1}}
\renewcommand{\contentsname}{Table of Contents}
\renewcommand{\chaptermark}[1]{\markboth{Chapter  \thechapter.\ #1}{}}
\renewcommand{\sectionmark}[1]{\markright{\thesection.\ #1}{}}


\fancypagestyle{plain}{ %
\fancyhf{} % remove everything
\renewcommand{\headrulewidth}{0pt} % remove lines as well
  • 5
    I think the problem is related with this one, tex.stackexchange.com/questions/299969/…. – buncis Sep 29 '16 at 9:46
  • If that is the case, you don't load titlesec package, unless you need to modify you sections. Which is your document class? Did you try to change it? – Yorgos Sep 29 '16 at 9:50
  • @Yorgos my class is book standard class? is that wrong? – buncis Sep 29 '16 at 9:55
  • no i don't think so... but try article or koma-script book to see if there is a difference – Yorgos Sep 29 '16 at 10:08
  • 2
    You may have the version of titlesec with that bug (which explains why it works at your friends computer). Try updating the package -- see tex.stackexchange.com/questions/55437/… for instructions on updating. – Torbjørn T. Sep 29 '16 at 11:20

this is a bug from the titlesec/tex-live itself


this is happen because I upgrade my ubuntu distributions to 16.04,

upgrading lyx using the stable ppa doesn't fix it https://launchpad.net/~lyx-devel/+archive/ubuntu/release

one of the workaround is adding this in preamble



another workaround is upgrade your whole texlive version to 2016 version, default ubuntu repository only have 2015 version, so you need to add this PPA https://launchpad.net/~jonathonf/+archive/ubuntu/texlive-2016

or do manual install https://www.tug.org/texlive/quickinstall.html

| improve this answer | |
  • 1
    The LyX version has nothing whatsoever to do with this bug, it is titlesec that is the problem. – Torbjørn T. Sep 29 '16 at 11:31

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