\subsubsection 未出现在文档中

\subsubsection 未出现在文档中

我的小节标题没有出现在我的 TEX 文档的 PDF 呈现中。

请帮忙。谢谢

\usepackage{setspace}
\doublespacing

\usepackage{titlesec}
\titlespacing{\section}{24pt}{\parskip}{-\parskip}
\titlespacing{\subsection}{24pt}{\parskip}{-\parskip}
\titlespacing{\subsubsection}{24pt}{\parskip}{-\parskip}

\usepackage{fancyhdr}

\author{John Brown}
\affiliation{Brown University}

\title{TITLE HERE}
\shorttitle{SHORTTITLE HERE}


\begin{document}

\maketitle
\pagebreak

\section{Introduction}

\section{Research Data}
\subsection{Behavioural Evidence}
A 2013 study by Albouy et al. analysed the behaviour of amusics compared to controls.
\subsection{Electrophisiological Evidence}
According to Peretz et al. amusics don't show N2 and P3.
\subsection{Neuroimaging Data}
\subsubsection*{Voxel-based morphometry (VBM) Data}
Using VBM, cortical thickness of both control subjects and amusics was measured. 

\bibliography{References.bib}
\end{document}

答案1

titlesec包与大多数非标准文档类不兼容;特别是与不兼容apa6。您可以通过重新定义类中定义的分段单元来实现所需的格式更改。

\section以下是、\subsection\subsubsection的原始定义apa6.cls

\renewcommand{\section}{\@startsection {section}{1}{\z@}%
    {\b@level@one@skip}{\e@level@one@skip}%
    {\centering\normalfont\normalsize\bfseries}}

\renewcommand{\subsection}{\@startsection{subsection}{2}{\z@}%
    {\b@level@two@skip}{\e@level@two@skip}%
    {\normalfont\normalsize\bfseries}}

\renewcommand{\subsubsection}{\@startsection{subsubsection}{3}{\parindent}%
    {0\baselineskip \@plus 0.2ex \@minus 0.2ex}%
    {-1em}%
    {\normalfont\normalsize\bfseries\addperi}}

titlesec命令的第二、第三和第四个参数\titlespacing分别对应于 的第五、第六和第七个参数\@startsection,因此您可以在那里进行修改,如下例所示,使用您在示例代码中使用的值。我还重新定义了,\addperi因此除了添加句点外,还添加了空格(因为您使用的值会使文本紧跟在标题之后):

\documentclass{apa6}
\usepackage{fancyhdr}
\usepackage{setspace}
\doublespacing

\makeatletter
\renewcommand*{\addperi}[1]{#1.~}

\renewcommand{\section}{\@startsection {section}{1}{24pt}%
    {\parskip}{-\parskip}%
    {\centering\normalfont\normalsize\bfseries\addperi}}

\renewcommand{\subsection}{\@startsection{subsection}{2}{24pt}%
    {\parskip}{-\parskip}%
    {\normalfont\normalsize\bfseries\addperi}}

\renewcommand{\subsubsection}{\@startsection{subsubsection}{3}{24pt}%
    {\parskip}%
    {-\parskip}%
    {\normalfont\normalsize\bfseries\addperi}}
\makeatother

\author{John Brown}
\affiliation{Brown University}

\title{TITLE HERE}
\shorttitle{SHORTTITLE HERE}


\begin{document}

\section{A test section}
Test text
\subsection{A test subsection}
Test text
\subsubsection{A test subsubsection}
Test text

\end{document}

在此处输入图片描述

相关内容