# titlesec seems not to work (numbering)

I want to write a document of the book class. I removed the word "Chapter" from every chapter title. To add a roman chapter number I used titlesec. But since I installed a new Linux distro (Mint 17.3 -> Mint 18.3) it seems to not work anymore. I use TeXStudio with the standard configuration (compiler: pdflatex).

In the minimal working example you can see that the chapter numbering still works for the header and the ToC, but not for the chapter title itself.

\documentclass[11pt,a4paper]{book}

\usepackage                             {dsfont}
\usepackage                             {emptypage}
\usepackage                             {fancyhdr}
\usepackage                             {geometry}
\usepackage[latin1]                     {inputenc}
\usepackage                             {lipsum}
\usepackage                             {lmodern}
\usepackage                             {subfig}
\usepackage                             {titlesec}
\usepackage[nottoc,chapter,numbib]      {tocbibind}
\usepackage[subfigure]                  {tocloft}
\usepackage                             {ucs}

% % % Title configuration % % %

\renewcommand{\thechapter}{\Roman{chapter}}
\setcounter{secnumdepth}{1}
\titleformat{\chapter}[hang]
{\Huge\bfseries}{\thechapter.\ }{0pt}{}
\titleformat{\section}[hang]
{\Large\bfseries}{\thesection\ }{0pt}{}
\titlespacing*{\chapter}{0pt}{-15pt}{10pt}
\titlespacing*{\section}{0pt}{10pt}{5pt}

% % % more changes % % %

\parindent0pt
\geometry{top=20mm, outer=10mm, inner=20mm, bottom=20mm}

% % % Header % % %

\fancypagestyle{plain}{
\fancyhf{}
}
\pagestyle{plain}
\renewcommand{\chaptermark}[1]{ \markboth{\thechapter.\ #1}{} }

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

%Contents
\setcounter{tocdepth}{1}
\setlength{\cftchapnumwidth}{3em}
\setlength{\cftsecnumwidth}{3em}
\tableofcontents
\newpage

\chapter{Chapter name}
\section{Section name}
\lipsum[1-40]
\end{document}

• Welcome! Try replacing \newpage with \mainmatter. – cfr Mar 9 '18 at 0:28
• No problem here. Chapter title is I. Chapter name. – Sigur Mar 9 '18 at 0:28
• if your document is in latin1 don't load ucs package (actually in general I'd avoid using ucs and just using the standard [utf8] option to inputenc even if your documemt is utf-8 encoded) but specifying latin1 then loading ucs looks wrong – David Carlisle Mar 9 '18 at 0:39
• OK so for you it looks correct? Then it is probably a compiler issue. But how do I solve it? – Moritz Mar 9 '18 at 9:37

It seems like this is a well known bug. Solutions can be found here:

sudo add-apt-repository ppa:jonathonf/texlive-2017