0

I want to make my Chapter title uppercase and in the center of the page. this is mine

\documentclass[12pt,TimesNewRoman,a4paper,oneside,onecolumn]{purnamiReport}
\linespread{1.5}
\usepackage{lscape}
\usepackage[bahasa]{babel}
\usepackage{epsf,epsfig,amsmath,amsthm,amsxtra,amssymb,latexsym,graphicx,amssymb,multirow,url}
\usepackage{bm}
\usepackage{titlesec}

\newpage
\pagenumbering{arabic}
\include{Chapter1}
\include{Chapter2}
\include{Chapter3}
\include{Chapter4}
\include{Chapter5}

My friend use the same command but she has different output. Hers is in uppercase model...

What should I do? Thank you

  • The formatting of the chapters is most likely handeled in the documentclass 'purnamiReport', which I can not find online. Try to comment-out the titlesec package '% \usepackage{titlesec}' and check if your output changes. For more in-depth changes, one would need to know what hapens in the documentclass file – Martin H Sep 27 '18 at 9:14
1

As said by Martin H. in his comment, the formatting of your titles is likely modified by the class. In the opposite case (standard titles) you could comment out titlesec and use the \patchcmd command of package etoolbox with, for example:

\renewcommand{\thechapter}{\Roman{chapter}}
\makeatletter
\patchcmd{\@makechapterhead}{\raggedright}{\centering}{}{}
\patchcmd{\@makechapterhead}{\@chapapp\space}{\space}{}{}
\patchcmd{\@makechapterhead}{\thechapter}{\Huge\sffamily\bfseries\thechapter\space--\space}{}{}
\patchcmd{\@makechapterhead}{\@M \Huge \bfseries #1}{\@M\Huge\bfseries\sffamily\MakeUppercase{#1}}{}{}
 \patchcmd{\@makechapterhead}{\par\nobreak\vskip 20\p@}{}{}   
\makeatother

very close to what I currently use for my courses: enter image description here

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.