titlesec 部分字体大小不正确

titlesec 部分字体大小不正确

我的论文要求章节标题的字体大小与正文相同。我正在使用该titlesec软件包,并提供了以下选项:

\usepackage[rm,tiny,center,compact]{titlesec}

我还提供了标题的格式,例如

\titleformat{\chapter}{\centering\normalsize}{\thechapter.}{1em}{}
\titleformat{\section}{\normalsize\bfseries}{\thesection}{1em}{}
\titleformat{\subsection}{\normalsize\bfseries}{\thesubsection}{1em}{}
\titleformat{\subsubsection}{\normalsize\it}{\thesubsubsection}{1em}{}

所有标题(如小节标题)都工作正常,它们的字体大小与文档中的段落文本相同。但是,默认情况下,节标题较大。无论我提供什么格式规范

\titleformat{\section}{..........}{\thesection}{1em}{}

部分标题仍然很大。请告诉我我还能做些什么来解决这个问题。

根据要求,这是我正在使用的软件包的列表

\documentclass[12pt]{report}
\renewcommand{\familydefault}{\rmdefault}
\usepackage[latin9]{inputenc}
\usepackage[letterpaper]{geometry}
\geometry{verbose,tmargin=1.25in,bmargin=1.25in,lmargin=1.4in,rmargin=1.15in}
\pagestyle{plain}
\usepackage[onehalfspacing]{setspace}
\usepackage{tocloft}
\usepackage[rm,tiny,center,compact]{titlesec}
\usepackage{indentfirst}
\usepackage{epstopdf}
\usepackage{graphicx,float,wrapfig}
\usepackage{etoolbox}
\usepackage{tocvsec2}
\usepackage[titletoc]{appendix}
\usepackage{tamuconfig}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{placeins}
\usepackage{graphics}
\usepackage{epsfig}
\usepackage{graphicx}
\usepackage{subfig}
\usepackage{mycommands1}
\usepackage{algorithm}
\usepackage{algpseudocode}
\usepackage[hidelinks]{hyperref}
\usepackage{booktabs}
\usepackage{multirow}
\allowdisplaybreaks[2]
\newcommand{\ra}[1]{\renewcommand{\arraystretch}{#1}}

\begin{document}
\pagestyle{plain} % No headers, just page numbers
\pagenumbering{arabic} % Arabic numerals
\setcounter{page}{1}
\chapter{\uppercase{Chapter heading ABC }} \label{chap: introduction}
\section{Section title Abcdefgh}
\subsection{Subsection title Abcdefgh}
\subsubsection{Subsubsection title Abcdefgh}
Paragraph text size Abcdefgh. \\
Paragraph text in bold for comparison \textbf{Abcdefgh}
\end{document}

以下是tamuconfig包的详细信息,其中标题已格式化:

\ProvidesPackage{tamuconfig}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%   Titlesec Customations 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\titleformat{\chapter}{\centering\normalsize}{\thechapter.}{1em}{}
\titleformat{\section}{\normalsize\bfseries}{\thesection}{1em}{}
\titleformat{\subsection}{\normalsize\bfseries}{\thesubsection}{1em}{}
\titleformat{\subsubsection}{\normalsize\it}{\thesubsubsection}{1em}{}
\setcounter{secnumdepth}{3}
\addtocontents{toc}{\protect\renewcommand{\protect\cftchapleader}
    {\protect\cftdotfill{\cftsecdotsep}}}  % puts leader dots on chapters.

生成的 PDF 显示章节标题,如附图所示(由于我是新用户,因此无法上传)。如您所见,所有标题都正常工作,但章节标题除外,因为它太大了。请让我知道这些信息是否足够

答案1

您的示例编译成功,没有错误(除了mycommands1未知错误),并给出了正确且理想的结果。因此,最可能的原因是这个私有包包含一些重定义,\section覆盖了之前的设置,或者可能加载了更多执行此操作的包。因此,请检查其中的内容(或禁用它以进行测试)。

相关内容