软件包 titlesec 警告:非标准分段命令 \section

软件包 titlesec 警告:非标准分段命令 \section

我遇到了一个包问题,但我不知道我正在使用它...这是我的 main.tex

\RequirePackage{silence}
\WarningFilter{remreset}{The remreset package} %s shut up about obsolete package
% book example for classicthesis.sty
\documentclass[
  % Replace twoside with oneside if you are printing your thesis on a single side
  % of the paper, or for viewing on screen.
  oneside,
  %twoside,
  11pt, a4paper,
  footinclude=true,
  headinclude=true,
  cleardoublepage=empty
]{scrbook}

\usepackage{lipsum}
\usepackage[linedheaders,parts,pdfspacing]{classicthesis}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{acronym}
\usepackage{listings} % ajouté pour corriger les deux erreurs de compilation
\usepackage{graphicx}
\usepackage{tabularx}
\usepackage[dvipsnames]{xcolor} 
\usepackage{pdfpages}
\usepackage{hyperref}
\usepackage{microtype}
\hypersetup{
    colorlinks=true,
    linkcolor=blue,
    filecolor=magenta,      
    urlcolor=NavyBlue,
    citecolor=NavyBlue,
}
\usepackage[english]{babel}
\usepackage[largesc]{newpxtext} 
\useosf
\linespread{1.05}
\usepackage[utf8]{inputenc}
%\usepackage{wrapfig}
\usepackage{rotating}
\usepackage{epigraph}
\tolerance=1
\emergencystretch=\maxdimen
\hyphenpenalty=10000
\hbadness=10000
\usepackage[font=small,skip=0pt]{caption}
\usepackage{listings}
\lstset{
  basicstyle=\ttfamily,
  columns=fullflexible,
  frame=single,
  breaklines=true,
  postbreak=\mbox{\textcolor{red}{$\hookrightarrow$}\space},
}
\usepackage{soul} %to allow highlighting text that requires attention
\newcommand{\hash}[1]{{\ttfamily\seqsplit{#1}}}
\begin{document}
\input{titlepage.tex}
\input{first.tex}
%\include{FrontBackMatter/abstract}
%\include{FrontBackMatter/dedication}
%\include{FrontBackMatter/acknowledgements}
%\include{FrontBackMatter/declaration}

\include{FrontBackMatter/contents}

\chapter{Introduction}
\input{chapter1.tex}

\chapter{Genome assembly}
\input{chapter2.tex}

\chapter{Mutation accumulation}
\input{chapter3.tex}

\chapter{Perspectives}
\input{chapter4.tex}
 
\chapter{Bibliography}    
\bibliographystyle{naturemag}
\bibliography{bibliography}  
\chapter{annexes - publications}
\input{annexes.tex}
\end{document}

编译返回

Package titlesec Warning: Non standard sectioning command \section detected. Using default spacing and no format.

titlesec 包是什么?我没有加载它。我只是在整个文档中使用 \section 和 \subsection。

任何想法?

非常感谢,我将不胜感激。

编辑:这是最小的例子

软件包 titlesec 警告:检测到非标准分段命令 \section。使用默认间距且无格式。

这其实是一个无害的警告吗?还是它有引发其他问题的风险?

\RequirePackage{silence}
\WarningFilter{remreset}{The remreset package} 
\documentclass[
  % Replace twoside with oneside if you are printing your thesis on a single side
  % of the paper, or for viewing on screen.
  oneside,
  %twoside,
  11pt, a4paper,
  footinclude=true,
  headinclude=true,
  cleardoublepage=empty
]{scrbook}

\usepackage{lipsum}
\usepackage[linedheaders,parts,pdfspacing]{classicthesis}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{acronym}
\usepackage{listings} 
\usepackage{graphicx}
\usepackage{tabularx}
\usepackage[dvipsnames]{xcolor} 
\usepackage{pdfpages}
\usepackage{hyperref}
\usepackage{microtype}
\hypersetup{
    colorlinks=true,
    linkcolor=blue,
    filecolor=magenta,      
    urlcolor=NavyBlue,
    citecolor=NavyBlue,
}
\usepackage[english]{babel}
\usepackage[largesc]{newpxtext} 
\useosf
\linespread{1.05}
\usepackage[utf8]{inputenc}
%\usepackage{wrapfig}
\usepackage{rotating}
\usepackage{epigraph}
\tolerance=1
\emergencystretch=\maxdimen
\hyphenpenalty=10000
\hbadness=10000
\usepackage[font=small,skip=0pt]{caption}
\usepackage{listings}
\lstset{
  basicstyle=\ttfamily,
  columns=fullflexible,
  frame=single,
  breaklines=true,
  postbreak=\mbox{\textcolor{red}{$\hookrightarrow$}\space},
}
\usepackage{soul} %to allow highlighting text that requires attention
\newcommand{\hash}[1]{{\ttfamily\seqsplit{#1}}}
\begin{document}

\chapter{Introduction}
\section{youpla boum}
blablabal 


\end{document}

答案1

classicthesis存在一些设计缺陷,尤其是使用 KOMA-Script 和titlesec,作者在包装文档中确认(他正在规划一个电子设计):

但是,代码中仍然有很多旧时代的遗留问题,这里和那里有很多肮脏的解决方法,以及其他一些我绝对不引以为豪的事情(例如我对 KOMA 和 titlesec 等的不明智组合)。

该警告只是警告,不是错误。您可以忽略它。但将来您可能会遇到其他问题。因此,如果您有选择,也许可以考虑使用其他文档类...

相关内容