2

I want to hide the number of every chapter in my thesis when I use command \chapter. But the thing is when I put * such that \chapter*, the subsection will be start from 0.1. So, I want to hide the number at front of word chapter but still the number at section below start with 1.1 and so on. here my latex command;

\documentclass[12pt]{thesis}
\usepackage{amssymb,amsmath,latexsym}
\usepackage[top=2cm, bottom=2.5cm, footskip=1.2cm, left=4cm, right=2.2cm]{geometry} 
\usepackage{setspace}
\usepackage{fancyhdr} 
\pagestyle{fancyplain} 
\fancyhf{}
\cfoot{\thepage}%set page numbering at bottom
\renewcommand{\headrulewidth}{0pt} 



\begin{document}

\chapter{chapter 1}

I want hide the number at front of word chapter but still the number at section below start with 1

\section{bab 1}

blah 

\chapter{ chapter 2}

\section{sub chapter 2}

\end{document}

here the output:

my output

  • Just to be sure, you don't want to write \chapter{CHAPTER 1} in your real rocument, right? – Johannes_B Dec 18 '16 at 7:33
  • Where can e find thesis.cls? I have a lot of experience with various thesis.cls and Thesis.cls, none of which was a good one. – Johannes_B Dec 18 '16 at 7:34
  • Does the class load pacage titlesec? If not, load it by yourself and use titleformat in your preamble. A similar question was asked yesterday, but in german. – Johannes_B Dec 18 '16 at 7:35
  • Before i forget it, welcome to TeX.SX :-) – Johannes_B Dec 18 '16 at 7:35
2

My suggestion would be to make \chapter be like \chapter* with the addition of some counter and ToC updating. To do this, add

\let\oldchapter\chapter% Store \chapter in \oldchapter
\renewcommand{\chapter}[1]{% Update \chapter
  \cleardoublepage
  \refstepcounter{chapter}% Step chapter counter
  \oldchapter*{#1}% Regular \chapter*
  \chaptermark{#1}% Set chapter mark (typically for header)
  \addcontentsline{toc}{chapter}{#1}% Add chapter to ToC
}

to your preamble.

|improve this answer|||||
  • Would it be worth to update the headers as well? – Johannes_B Dec 18 '16 at 9:09
  • @Johannes_B: Of course! – Werner Dec 18 '16 at 16:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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