1

I am not getting the section numbers. for ex. 1.1, 1.2, 1.3.. are not getting printed in output. I want it to be displayed both in table of contents and main page. Right now it is only displayed on table of contents. not on the main page. these are the packages i used. but i am not getting the numbers of sections in the chapters.

\documentclass[a4paper,12pt]{report}
\usepackage{geometry}
 \geometry{
 a4paper,
 left=20mm,
 right=15mm,
 top=20mm,
 }
\usepackage[thinlines]{easytable}
\usepackage{nomencl}
\usepackage{amsmath}
\usepackage{titlesec}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{indentfirst}
\usepackage{changepage}

\setcounter{secnumdepth}{1}

\begin{document}

\chapter{Introductions}

this is a test document.

\section{Hello}

aivbvilbwvuii

\section{bye}

sdvger

\end{document}
RonakD
  • 11
  • 3
    Welcome to TeX.SX! Try \setcounter{secnumdepth}{1} in the preamble. 1 means sections. If subsections are meant as well, use 2, the deeper the nesting, the higher the number. At the moment, the question is unclear, since no document is provided. –  Apr 10 '16 at 11:55
  • I have added one image in my question. hope that would be helpful. – RonakD Apr 10 '16 at 12:13
  • Please don' include code as images! Use copy-and-paste to include it, so we can copy the code ourselves. – sodd Apr 10 '16 at 12:14
  • i have added the code. In the output I am getting the section names as Hello and Bye. I want them to be 1.1 Hello. 1.2 Bye. – RonakD Apr 10 '16 at 12:19
  • @RonakD -- the code you posted gives the result you ask for. there's something you're not telling ux. – barbara beeton Apr 10 '16 at 12:47
  • 4
    There was a recent bug in titlesec that might have caused this. Make sure your distribution is up to date. – Alan Munn Apr 10 '16 at 12:54
  • @AlanMunn: That's most likely the cause of the problem –  Apr 10 '16 at 14:11
  • @barbara Hello.. I was expecting the result.. but in output I am not getting section numbering.. only section name is getting printed.. as Alan said.. i will try to update my distribution.. – RonakD Apr 12 '16 at 05:02
  • @Alan I checked with the updates of my distribution.. its upto date.. but problems is still there.. – RonakD Apr 14 '16 at 05:18
  • @AlanMunn I uninstalled and installed the distribution again.. so i got the most recent version of distribution.. and problem got solved.. :) Thanks a lot buddy..!! :) – RonakD Apr 14 '16 at 05:29
  • 4
    I'm voting to close this question as off-topic because it was solved by a new version of a required package. – barbara beeton Apr 14 '16 at 12:04

0 Answers0