1

This question already has an answer here:

I am extremely new to latex and I have to submit a project report in my college. The college has provided us with a template which we have to use for generating the report. It contains too many packages and other things which I am not familiar with. As I a extremely short on time, I need some help to fix the subsection numbering issue.

The packages included are:

\documentclass[oneside,a4paper,12pt]{book}
%\usepackage{showframe}
%\hoffset = 8.9436619718309859154929577464789pt
%\voffset = 13.028169014084507042253521126761pt
\usepackage{fancyhdr}

\fancypagestyle{plain}{%
  \fancyhf{}
  \fancyfoot[CE]{Pune Institute of Computer Technology, Department of Computer Engineering 2016-17}
  \fancyfoot[RE]{\thepage}
}
\pagestyle{fancy}
\fancyhead{}
\renewcommand{\headrulewidth}{0pt}
\footskip = 0.625in
\cfoot{}
\rfoot{}

\usepackage[]{hyperref}
\usepackage{tikz}
\usetikzlibrary{arrows,shapes,snakes,automata,backgrounds,petri}
\usepackage{titlesec}
\usepackage{tabularx}

\usepackage[nottoc,notlot,notlof,numbib]{tocbibind}
\usepackage[titletoc]{appendix}
\usepackage{titletoc}
\renewcommand{\appendixname}{Annexure}
\renewcommand{\bibname}{References}

\setcounter{secnumdepth}{5}

\usepackage{float}
\usepackage{subcaption}
\usepackage{multirow}

\usepackage[ruled,vlined]{algorithm2e}

\begin{document}
....

after some pages of acknowledgments and abstract, this comes

\tableofcontents
\listoffigures 
\listoftables

\mainmatter

\titleformat{\chapter}[display]
{\fontsize{16}{15}\filcenter}
{\vspace*{\fill}
 \bfseries\LARGE\MakeUppercase{\chaptertitlename}~\thechapter}
{1pc}
{\bfseries\LARGE\MakeUppercase}
[\thispagestyle{empty}\vspace*{\fill}\newpage]

....

Then comes first chapter

\setlength{\parindent}{11mm}
\chapter{Synopsis}
\section{Project Title}
 blah blah blah...
\section{ Project Option }
blah blah blah...

The PDF output that I see is (I use TexStudio in ubuntu 16.04) The subsection numbering is not displayed

The numbering is correctly displayed in the table of contents but it is not displayed in the chapters. I have uploaded all the info I felt that will be necessary to understand the problem. If you want anymore info, please feel free to ask for it. Thank you.

marked as duplicate by Johannes_B, egreg numbering Apr 11 '17 at 5:18

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 6
    Combining your posted code into a single document and compiling that gives section numbers, so the problem is to do with something you have not posted. As a new user, I would strongly recommend that you start with a standard document and add settings as needed. Using other people's preambles is usually substantially more work. – Andrew Swann Apr 6 '17 at 7:00
  • 1
    Which titlesec version do you use? Maybe you have the same issue as tex.stackexchange.com/q/299969/43317 – esdd Apr 6 '17 at 8:12
  • @AndrewSwann Though it does not work in my texstudio, it works in online Latex editors like sharelatex – Pranjal Apr 10 '17 at 18:49
  • @esdd Yes, the problem was with tilesec version. I didn't notice its version. But now I have updated it (as given in the answer below). – Pranjal Apr 10 '17 at 18:50
  • Out of curiosity, why are you chaning the \hoffset with precision on an atom? – Johannes_B Apr 11 '17 at 5:15
3

As pointed out by 'esdd' in the comment section of the question, the issue was with titlesec package version. Though I haven't noticed the earlier version number, I have updated it to the latest. As I use Ubuntu I did

sudo wget http://mirrors.ctan.org/macros/latex/contrib/titlesec/titlesec.sty -O /usr/share/texlive/texmf-dist/tex/latex/titlesec/titlesec.sty
  • @ChristianHupfer Sorry. Edited – Pranjal Apr 11 '17 at 4:18

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