Arsclassica 和烦人的警告

Arsclassica 和烦人的警告

arsclassica使用包时我总是收到烦人的警告。

这是一个 MWE:

\documentclass{scrreprt} % KOMA class
\usepackage{arsclassica} % improve classicthesis
\usepackage[english]{babel}
\usepackage{lipsum}

\title{My title}
\author{Myself}

\begin{document}
\maketitle
\chapter{Introduction}
\lipsum
\end{document}

以及我收到的以下警告:

warning: [scrreprt] Usage of package `titlesec' together with a KOMA-Script class is not recommended. I'd suggest to use the package only if you really need it, because it breaks several KOMA-Script features, i.e., option `headings' and the extended optional argument of the section commands . Nevertheless, using requested package `titlesec'
warning: [hyperref] Option `hyperfootnotes' has already been used, setting the option has no effect
warning: [hyperref] Option `pdfpagelabels' has already been used, setting the option has no effect

有人知道如何解决这个烦恼吗?经过几次尝试,看起来是软件包arsclassica本身产生了警告。

答案1

koma-script 类的作者决定对titlesec与它们一起使用发出警告。

但是,您不必使用scrreprt,也可以使用book。您需要自己设置页面几何形状,但当scrreprt涉及到时,这已经是事实。

\documentclass{book}

\usepackage{arsclassica} % improve classicthesis
\usepackage[
  includehead,includefoot,
  textwidth=336pt,
  textheight=675pt,
]{geometry}

\usepackage[english]{babel}
\usepackage{lipsum}

\title{My title}
\author{Myself}

\begin{document}

\maketitle
\chapter{Introduction}
\lipsum
\end{document}

还会有另一个警告:

Package classicthesis Warning: Using package "footmisc" with option "flushmargin"
for footnote setup (not 100\% the same as with KOMA).

并且 的警告hyperref仍将存在。你几乎无能为力:当arsclassica出现问题时\hypersetup,选项hyperfootnotespdfpagelabels已经设置,并且无法重复。

对于footmisc警告,您可以加载scrextend(感谢 Johannes_B 的建议);另外两个警告可以被静音。

\documentclass{book}

\usepackage{silence}
\WarningFilter{hyperref}{Option `hyperfootnotes'}
\WarningFilter{hyperref}{Option `pdfpagelabels'}

\usepackage{scrextend}
\usepackage{arsclassica} % improve classicthesis
\usepackage[
  includehead,includefoot,
  textwidth=336pt,
  textheight=675pt,
]{geometry}

\usepackage[english]{babel}
\usepackage{lipsum}

\title{My title}
\author{Myself}

\begin{document}

\maketitle
\chapter{Introduction}
\lipsum
\end{document}

如果您想使用scrreprt,则不需要scrextend,您可以添加以下过滤器:

\WarningFilter{scrreprt}{Usage of package `titlesec'}

相关内容