\documentclass[12pt]{report}
\usepackage{setspace}
\usepackage{geometry}
\geometry{letterpaper, left=1.25in, right=1.0 in, top=1.0in, bottom=1.0in, includefoot}
\usepackage{amsmath, amsfonts, amssymb, amstext, amscd, amsthm, makeidx, graphicx, hyperref, url, enumerate, listings,multicol,capt-of,float, amsthm}
\usepackage{titletoc}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage{sectsty}
\usepackage[tiny]{titlesec}
\usepackage{indentfirst}
\allowdisplaybreaks
\newcommand{\doublesize}{\normalsize\fontsize{12pt}{25pt}\selectfont}
\allsectionsfont{\centering}
\chapter*{ACKNOWLEDGMENTS}
\addcontentsline{toc}{chapter}{\centering ACKNOWLEDGMENTS }
我尝试过使用\centering
和,\sectsty
但都不起作用titlesec
。请帮忙!
答案1
使用sectsty
或titlesec
来更改部分标题的布局。以下是使用 的建议sectsty
。
\documentclass[12pt]{report}
\usepackage{geometry}
\geometry{letterpaper, left=1.25in, right=1.0 in, top=1.0in, bottom=1.0in, includefoot}
\usepackage[T1]{fontenc}
\usepackage{indentfirst}
\usepackage{sectsty}
\allsectionsfont{\nohang\centering\normalsize}
\chaptertitlefont{\nohang\centering\large}
\usepackage{blindtext}% dummy text
\begin{document}
\tableofcontents
\blinddocument
\end{document}