如何将章节的字体大小更改为 14pt?

如何将章节的字体大小更改为 14pt?

默认情况下,章节的字体大小为 25pt。我想将其更改为 14pt。

这是我运行的生成 pdf 的代码。我已下载此格式。这不是我的格式,所以我有点困惑如何将字体大小更改为 14pt。

在此处输入图片描述

\documentclass[12pt,a4paper]{report}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage[pdftex]{graphicx} %for embedding images
\usepackage{url} %for proper url entries
\usepackage[top=1in,bottom=1in,left=1.3in,right=.60in,a4paper]{geometry}
\renewcommand{\baselinestretch}{1.5}
\usepackage[nottoc]{tocbibind}
\usepackage{sectsty}
\usepackage[T1]{fontenc}

\usepackage{etoolbox}
\makeatletter
%\patchcmd{\@makechapterhead}{50\p@}{-20pt}{}{}
%\patchcmd{\@makeschapterhead}{50\p@}{-20pt}{}{}

\patchcmd{\@makechapterhead}{50\p@}{-22pt}{}{}
\patchcmd{\@makeschapterhead}{50\p@}{-22pt}{}{}
\makeatother
\usepackage[bookmarks, colorlinks=false, pdfborder={0 0 0}, pdftitle={<pdf title here>}, pdfauthor={<author's name here>}, pdfsubject={<subject here>}, pdfkeywords={<keywords here>}]{hyperref} %for creating links in the pdf version and other additional pdf attributes, no effect on the printed document
%\usepackage[final]{pdfpages} %for embedding another pdf, remove if not required

\begin{document}
\renewcommand\bibname{REFERENCES} %Renames "Bibliography" to "References" on ref 
%\newcommand{\chaptersize}{\fontsize{14}\selectfont}
\chapterfont{\centering}
%include other pages
\input{./title.tex}
\input{./certificate.tex}
\input{./Declaration.tex}
\input{./Acknow.tex}

\pagenumbering{roman} %numbering before main content starts


\tableofcontents
\pagebreak
\input{./abstract.tex}
\listoffigures
\listoftables
\include{Abbreviations}

\newpage
\pagenumbering{arabic} %reset numbering to normal for the main content
\input{./Introduction.tex} %objective changed to problem definition
\input{./Literaturesurvey.tex}%literature survey included in this
\input{./SystemDevelopment.tex}
\input{./PerformanceAnalysis.tex}
\input{./Conclusion.tex}
\input{./Ref.tex}
\end{document}

答案1

sectsty

\documentclass[12pt]{report}
\usepackage{sectsty}
\chapterfont{\large\bfseries}
\begin{document}
\chapter{This is a chapter}
\end{document}

答案2

您可以重新定义\@makechapterhead,用 替换和\Huge。根据第 125 页的表格\huge\largeLaTeX 入门指南,这将产生一个 14 点的章节标题。

\documentclass[12pt]{report}

\makeatletter
\def\@makechapterhead#1{%
  \vspace*{50\p@}% 
  {\parindent \z@ \raggedright \normalfont
    \ifnum \c@secnumdepth >\m@ne
        \large\bfseries \@chapapp\space \thechapter\par\nobreak 
        \vskip 20\p@
    \fi
    \interlinepenalty\@M
    \large \bfseries #1\par\nobreak 
    \vskip 40\p@ 
  }}
\makeatother

\begin{document}
\chapter{This is a chapter}
\end{document}

相关内容