0

MWE:

\documentclass[11pt,oneside]{book} % [text size]{document type}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{fancyhdr, blindtext} %for testing
\usepackage{minitoc} % Get chapter level TOC
\renewcommand{\mtctitle}{TABLE OF CONTENTS}
\dominitoc
\setcounter{parttocdepth}{4} % set minitoc sublevel
\setcounter{secnumdepth}{4} % to get X.X.X.X
\mtcsetrules{*}{off}

\begin{document}

\chapter{SAMPLE CHAPTER }\label{ch5}

\minitoc{\protect\thispagestyle{fancy}}

\section{My Section 1}
\subsection{My Section  1 Subsection 1}
\subsection{My Section  1 Subsection 2}
\subsection{My Section  1 Subsection 3}
\subsubsection{My Section  1 Subsection 3  Subsubsection 1}
\section{My Section 2}
\subsection{My Section  2 Subsection 1}
\subsection{My Section  2 Subsection 2}
\subsection{My Section  2 Subsection 3}
\subsubsection{My Section  2 Subsection 3  Subsubsection 1}

\end{document}

This produces:

enter image description here

So how do I get "Chapter 1 SAMPLE CHAPTER" on the same line and centered? I also need to center the Table of Contents and adjust the vertical spacing. Thanks, Matt

0

I didn't fully solve this. But I was able to get the Chapter Number and Chapter Title on the same line. Here's a MWE for it:

\documentclass[11pt,oneside]{book} % [text size]{document type}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{fancyhdr, blindtext} %for testing
\usepackage{minitoc} % Get chapter level TOC
\usepackage{titlesec}
\renewcommand{\mtctitle}{TABLE OF CONTENTS}
\dominitoc
\setcounter{parttocdepth}{4} % set minitoc sublevel
\setcounter{secnumdepth}{4} % to get X.X.X.X
\mtcsetrules{*}{off}
\titleformat{\chapter} {\large\bfseries}{CHAPTER \thechapter}{0em}{---}
\titleformat{\section} {\normalfont\bfseries}{\thesection}{0em}{---}
\titleformat{\subsection} {\normalfont\bfseries}{\thesubsection}{0em}{---}
\titleformat{\subsubsection}{\normalfont\normalsize\bfseries}{\thesubsubsection}{0em}{---}
\begin{document}

\chapter{SAMPLE CHAPTER }\label{ch5}

\minitoc{\protect\thispagestyle{fancy}}

\newpage
\section{My Section 1}
\subsection{My Section  1 Subsection 1}
\subsection{My Section  1 Subsection 2}
\subsection{My Section  1 Subsection 3}
\subsubsection{My Section  1 Subsection 3  Subsubsection 1}
\section{My Section 2}
\subsection{My Section  2 Subsection 1}
\subsection{My Section  2 Subsection 2}
\subsection{My Section  2 Subsection 3}
\subsubsection{My Section  2 Subsection 3  Subsubsection 1}
\newpage


\chapter{Next CHAPTER }\label{ch6}

\minitoc{\protect\thispagestyle{fancy}}

\section{New Section 1}
\subsection{New Section  1 Subsection 1}
\subsection{New Section  1 Subsection 2}
\subsection{New Section  1 Subsection 3}
\subsubsection{New Section  1 Subsection 3  Subsubsection 1}
\section{New Section 2}
\subsection{New Section  2 Subsection 1}
\subsection{New Section  2 Subsection 2}
\subsection{New Section  2 Subsection 3}
\subsubsection{New Section  2 Subsection 3  Subsubsection 1}


\end{document}

And that gets this done: enter image description here

| improve this answer | |

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.