This answer might be a long stretch, but from this question and a previous question, I think I know what you are really after. If this is completely wrong, please let me know and I will delete this answer.
I assume that you want your document to look like the following:
To achieve that, you should use the report
document class, which gives you an additional level of sectioning, the \chapter
. Each chapter contains multiple sections, and each section contains subsections, subsubsections, paragraphs and so on. The basic setup for your document would be
\documentclass{report}
\begin{document}
% Frontmatter
\tableofcontents
% Main part
\chapter{Introduction}
My project is awesome! In this chapter, I am telling you why.
\chapter{Product Design}
\section{Product Perspective}
The product is supposed to be very nice and cool.
It shall satisfy all conditions and look awesome.
\end{document}
Now, to achieve the title formatting you are asking for in this question, we load the titlesec
package and configure \chapter
as shown below:
% Title formating
\usepackage{titlesec}
\titleformat{\chapter}[display]
{\normalfont\Large\bfseries} % Make title \large and bold
{\huge Chapter~\thechapter} % Write Chapter X in \huge font
{20pt} % 20pt distance between Chapter X and title
{}
[\vspace{1ex}\titlerule] % Add a line below chapter title
If you print the document two-sided, and want all chapters to start on the right side of a double-page, then you can simply change replace \documentclass{report}
by the following line, and you don't need to call \cleardoublepage
before each chapter. This also makes the margins symmetrical.
\documentclass[twoside, openright]{report}
Then, in the previous question you also had an abstract and acknowledgements, which have roman page numbering.
By default, LaTeX doesn't put unnumbered chapters like "Abstract" in the Table of Contents, so we have to do that manually.
This is done as follows:
% Frontmatter
\pagenumbering{roman} % Frontmatter with roman page numbering
\chapter*{Abstract}
\addcontentsline{toc}{chapter}{Abstract} % Add unnumbered chapter to table of contents
This is the short version of my work.
\chapter*{Acknowledgement}
\addcontentsline{toc}{chapter}{Acknowledgement} % Add unnumbered chapter to table of contents
I would like to thank everybody who helped me.
of course, you then have to switch back to arabic page numbers before the first chapter. The entire code with the parts discussed above is shown below.
\documentclass{report}
% Title formating
\usepackage{titlesec}
\titleformat{\chapter}[display]
{\normalfont\Large\bfseries} % Make title \large and bold
{\huge Chapter~\thechapter} % Write Chapter X in \huge font
{20pt} % 20pt distance between Chapter X and title
{}
[\vspace{1ex}\titlerule] % Add a line below chapter title
\begin{document}
% Frontmatter
\pagenumbering{roman} % Frontmatter with roman page numbering
\chapter*{Abstract}
\addcontentsline{toc}{chapter}{Abstract} % Add unnumbered chapter to table of contents
This is the short version of my work.
\chapter*{Acknowledgement}
\addcontentsline{toc}{chapter}{Acknowledgement} % Add unnumbered chapter to table of contents
I would like to thank everybody who helped me.
\tableofcontents
% Main part
\cleardoublepage
\pagenumbering{arabic} % Main part with arabic page numbering
\chapter{Introduction}
My project is awesome! In this chapter, I am telling you why.
\chapter{Product Design}
\section{Product Perspective}
The product is supposed to be very nice and cool.
It shall satisfy all conditions and look awesome.
\end{document}
I hope this is really how you want your document to look. If not - or if you have any other questions on what I showed you here, please write a comment.
Finally, there is a separate site, which is only for questions on TeX, LaTeX and friends, and questions on LaTeX should be posted there.
\setcounter{subsection}{3}
with\setcounter{section}{3}
– Olaf Dietsche\setcounter{subsection}{1}
. If this doesn't help, try asking or search on tex.se – Olaf Dietsche