# Numbered Chapter

What i would like is for the chapters of my book to be numbered in the ToC (which i have already achieved) AND in text such as

1 - Introduction (notice "Chapter 1 -" is missing and instead it just says "1 - "

What is happening at the moment is that ive got

Introduction

1.1 Section
1.2 Section

New Chapter
2.1 Section
2.2 Section


1 - Introduction

1.1 Section
1.2 Section

2 - New Chapter
2.1 Section
2.2 Section


I am using the masters doctoral thesis template from latextemplates.

• Could you please make your code snippet compilable? – TeXnician Apr 15 '18 at 9:22
• I advice you not to bother with the class file at all, there is a copyright and licence you may be violating. github.com/johannesbottcher/MDT-Quick-Manual Also, why don't you just follow the Ask question button to get to the proper place to get support for that template? – Johannes_B Apr 15 '18 at 10:03
• chapterinoneline option would give you 1 Introduction, but your question requests 1 - Introduction. That would be achieved by \renewcommand{\autodot}{~-} (untested). – Johannes_B Apr 15 '18 at 10:13
• Please do not change the class file! It isn't yours. You are just allowed to use it. You can make any change you want in the document preamble, including redefining what you need. In this case however, i would suggest to use a minimal template. – Johannes_B Apr 15 '18 at 11:07
• I'm voting to close this question as off-topic because the op has solved the problem (with a \renewcommand) as noted in the comments. – barbara beeton Apr 15 '18 at 14:43

Rule of thumb: Do not change a class or package file, it makes support very complicated.

The template uses almost the default chapter formatting as the underlying book class.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Masters/Doctoral Thesis
% LaTeX Template
% Version 2.5 (27/8/17)
%
% http://www.LaTeXTemplates.com
%
% Version 2.x major modifications by:
% Vel (vel@latextemplates.com)
%
% This template is based on a template by:
% Steve Gunn (http://users.ecs.soton.ac.uk/srg/softwaretools/document/templates/)
% Sunil Patel (http://www.sunilpatel.co.uk/thesis-template/)
%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\documentclass[
english, % ngerman for German
%chapterinoneline, % Uncomment to place the chapter title next to the number on one line
]{MastersDoctoralThesis} % The class file specifying the document structure
\usepackage{blindtext}
\begin{document}
\chapter{Wombat}
\blindtext
\end{document}


Uncommenting the global option chapterinoneline already gives something very close to the desired result.

To get the dash, one can redefine the \autodot macro. There are helper macros to change the spacing as well.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Masters/Doctoral Thesis
% LaTeX Template
% Version 2.5 (27/8/17)
%
% http://www.LaTeXTemplates.com
%
% Version 2.x major modifications by:
% Vel (vel@latextemplates.com)
%
% This template is based on a template by:
% Steve Gunn (http://users.ecs.soton.ac.uk/srg/softwaretools/document/templates/)
% Sunil Patel (http://www.sunilpatel.co.uk/thesis-template/)
%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\documentclass[
english, % ngerman for German
chapterinoneline, % Uncomment to place the chapter title next to the number on one line
]{MastersDoctoralThesis} % The class file specifying the document structure
\usepackage{blindtext}
\renewcommand{\autodot}{~-}
\renewcommand{\chapterbelowskip}{\vspace{100pt}}
\renewcommand{\abovechapterskip}{}
\begin{document}
\chapter{Wombat}
\blindtext
\end{document}


The code above gives the result in the image below (no space above the chapter heading, a large space below it):

Note the inconsistent naming convention.

General advice: Do not use a template, rather start from scratch with a minimal template and only adding what you really need.