4

In my master thesis the specification of the University should be as following:

Chapter (font size= 16 and font type= Times New Roman)

Section (font size= 14 and font type= Times New Roman)

Subsection (font size= 12 and font type= Times New Roman)

but at the chapter should look like in the pictureenter image description here :

I used this command `

\newcommand{\mychapter}[2]{ \chapterfont{\fontsize{16}{15}} \setcounter{chapter}{#1} \setcounter{section}{0} \chapter*{#2} \addcontentsline{toc}{chapter}{#2}

}

` But The font size didn't change for nether the chapters, sections or subsection can you help me please?

  • what is your documentclass{}? we need a MWE of your document – touhami Mar 22 '15 at 22:18
  • this is my \documentclass[a4paper,12pt]{report} – mayss Mar 22 '15 at 22:22
4

try this code

\documentclass{report}
\usepackage{titlesec}

\newcommand{\chapfnt}{\fontsize{16}{19}}
\newcommand{\secfnt}{\fontsize{14}{17}}
\newcommand{\ssecfnt}{\fontsize{12}{14}}

\titleformat{\chapter}[display]
{\normalfont\chapfnt\bfseries}{\chaptertitlename\ \thechapter}{20pt}{\chapfnt}

\titleformat{\section}
{\normalfont\secfnt\bfseries}{\thesection}{1em}{}

\titleformat{\subsection}
{\normalfont\ssecfnt\bfseries}{\thesubsection}{1em}{}

\titlespacing*{\chapter} {0pt}{50pt}{40pt}
\titlespacing*{\section} {0pt}{3.5ex plus 1ex minus .2ex}{2.3ex plus .2ex}
\titlespacing*{\subsection} {0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}

\begin{document}
\chapter{Introduction}
\section{Test}
\subsection{More}

\end{document}

you can also do it without titlesec like this

\documentclass{report}

\newcommand{\chapfnt}{\fontsize{16}{19}}
\newcommand{\secfnt}{\fontsize{14}{17}}
\newcommand{\ssecfnt}{\fontsize{12}{14}}

\makeatletter
\def\@makechapterhead#1{%
  \vspace*{50\p@}%
  {\parindent \z@ \raggedright \normalfont
    \ifnum \c@secnumdepth >\m@ne
        \chapfnt\bfseries \@chapapp\space \thechapter
        \par\nobreak
        \vskip 20\p@
    \fi
    \interlinepenalty\@M
    \chapfnt \bfseries #1\par\nobreak
    \vskip 40\p@
  }}
\renewcommand\section{\@startsection {section}{1}{\z@}%
                                   {-3.5ex \@plus -1ex \@minus -.2ex}%
                                   {2.3ex \@plus.2ex}%
                                   {\normalfont\secfnt\bfseries}}
\renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
                                     {-3.25ex\@plus -1ex \@minus -.2ex}%
                                     {1.5ex \@plus .2ex}%
                                     {\normalfont\ssecfnt\bfseries}}
\makeatother

\begin{document}

\chapter{Introduction}
\section{Test}
\subsection{More}
test 
\end{document}
  • @mayss i edit my answer to add another way – touhami Mar 22 '15 at 22:45
  • OK, but the first code worked with me so thank you for your help – mayss Mar 22 '15 at 22:45
  • @mayss i did not answer the question of (font type= Times New Roman) so the question is do you need times font just for titles or for the whole document? – touhami Mar 23 '15 at 7:43
  • font type= Times New Roman is for the whole thesis so I added the "\usepackage{times}" – mayss Mar 23 '15 at 23:00
  • It better to replace \usepackage{times} by \usepackage{mathptmx} \usepackage[scaled=.9]{helvet}\usepackage{courier} – touhami Mar 24 '15 at 0:29

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.