包错误 classicthesis - 未知选项“floatperchapterpdfspacing”

包错误 classicthesis - 未知选项“floatperchapterpdfspacing”

我刚刚开始配置 classicthesis,只对 classicthesis-config 和论文本身做了必要的更改。在修复了 ngerman babel 的一些问题后,它现在可以正常工作,但退出时会出错。

1. ! LaTeX 错误:未知选项floatperchapterpdfspacing' for packageclassict hesis'。

关于 classicthesis.sty 的第 92 行,即:\ProcessOptions\relax。这个选项从未提供给包?这里有一段未更改的代码(除了注释掉重复的行,但这没有帮助),直到这一行:

\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{classicthesis}[2011/01/24 v2.9 Typographic Style for a classic-looking thesis]
\RequirePackage{ifthen}
    \newboolean{@tocaligned} % the left column of the toc will be aligned (no indention)
    \newboolean{@eulerchapternumbers} % use AMS Euler for chapter font (otherwise Palatino)
    \newboolean{@drafting} % print version information on pages
    \newboolean{@linedheaders} % chaper headers will have line above and beneath
    \newboolean{@listsseparated} % toggles the vertical space between lof/lot entries of different chapters
    \newboolean{@nochapters} % disable all chapter-specific commands 
    \newboolean{@beramono} % toggle nice monospaced font (w/ bold) + pre-installed 
    \newboolean{@eulermath} % use awesome Euler fonts for math
    \newboolean{@parts} % use part division for the text
    \newboolean{@minionpro} % setup for minion pro font
    \newboolean{@minionprospacing} % use minion pro's textssc for letter spacing
    \newboolean{@pdfspacing} % use pdftex for letterspacing (via microtype)
    \newboolean{@subfig} % setup for preloaded @subfig package
    \newboolean{@a5paper} % use those tiny DIN A5 pages
    \newboolean{@dottedtoc} % page numbers in ToC flushed right
    \newboolean{@listings} % load listings package (if not already) and setup LoL
    \newboolean{@manychapters} % additional space in ToC after chapter number (if two digits are needed)
    \newboolean{@floatperchapter} % additional space in ToC after chapter number (if two digits are needed)

% ********************************************************************
% Options
% ******************************************************************** 
\DeclareOption{tocaligned}{\setboolean{@tocaligned}{true}}
\DeclareOption{eulerchapternumbers}{\setboolean{@eulerchapternumbers}{true}}
\DeclareOption{drafting}{\setboolean{@drafting}{true}}
\DeclareOption{linedheaders}{\setboolean{@linedheaders}{true}}
\DeclareOption{listsseparated}{\setboolean{@listsseparated}{true}}
\DeclareOption{subfigure}{%
    \PackageWarningNoLine{classicthesis}{Package "subfigure" and option "subfigure" are deprecated, used "subfig" instead.}
    \setboolean{@subfig}{true}%
    }
\DeclareOption{subfig}{\setboolean{@subfig}{true}}
\DeclareOption{nochapters}{\setboolean{@nochapters}{true}}
\DeclareOption{beramono}{\setboolean{@beramono}{true}} 
\DeclareOption{eulermath}{\setboolean{@eulermath}{true}} 
\DeclareOption{parts}{\setboolean{@parts}{true}} 
\DeclareOption{a5paper}{\setboolean{@a5paper}{true}}
\DeclareOption{minionpro}{\setboolean{@minionpro}{true}} 
\DeclareOption{minionprospacing}{\setboolean{@minionprospacing}{true}} 
%\DeclareOption{pdfspacing}{\setboolean{@pdfspacing}{true}} 
\DeclareOption{pdfspacing}{\setboolean{@pdfspacing}{true}} 
\DeclareOption{dottedtoc}{\setboolean{@dottedtoc}{true}} 
\DeclareOption{listings}{\setboolean{@listings}{true}}
\DeclareOption{manychapters}{\setboolean{@manychapters}{true}}
\DeclareOption{floatperchapter}{\setboolean{@floatperchapter}{true}}
\ProcessOptions\relax

2. ! LaTeX 错误:xcolor 包选项冲突。涉及 classicthesis.sty 的第 172 行,即:\definecolor{halfgray}{gray}{0.55}。显然,该包之前已加载,但我在其他文档中搜索短语“xcolor”却一无所获。是否有其他包会预先加载 xcolor?\RequirePackage 代码不应该阻止这种情况吗?

\RequirePackage[dvipsnames]{xcolor} % [dvipsnames] 
\definecolor{halfgray}{gray}{0.55} % chapter numbers will be semi transparent .5 .55 .6 .0
\definecolor{webgreen}{rgb}{0,.5,0}
\definecolor{webbrown}{rgb}{.6,0,0}
\definecolor{Maroon}{cmyk}{0, 0.87, 0.68, 0.32}
\definecolor{RoyalBlue}{cmyk}{1, 0.50, 0, 0}
\definecolor{Black}{cmyk}{0, 0, 0, 0}

谢谢!=)

答案1

  1. floatperchapter、pdfspacing 是两个选项,而 latex 将它们视为一个选项的原因可能是缺少逗号。
  2. 你有一个 6 年前的 classicthesis.sty 版本;3.0 之后的所有版本都有这个

\PassOptionsToPackage{dvipsnames}{xcolor} \RequirePackage{xcolor} 这至少可以避免此类冲突(但会产生一些不可预测的结果)

检查这个分支https://bitbucket.org/amiede/classicthesis/src/e02199

相关内容