我想将章节标题设为大写并位于页面中央。这是我的
\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}
我的朋友使用相同的命令,但她的输出不同。她的输出是大写模型...
我该怎么办?谢谢
答案1
正如 Martin H. 在其评论中所说,标题的格式可能会被班级修改。在相反的情况下 (标准标题),您可以注释掉titlesec
并使用\patchcmd
package etoolbox
with 的命令,例如:
\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