我用它classicthesis.sty
来写我的硕士论文。在这种风格中,tocloft
是使用 包设置的subfig
,但现在已弃用,所以我改用 包subcaption
,问题是它们不兼容,classicthesis.sty
有很多选项subfig
。
我需要一些帮助来解决兼容性问题。目录没有被编译,参考书目或文档中的图表也没有被编译。我在 Ubuntu 中使用 Kile,刚刚开始学习 Latex。
以下是我的一些代码:
\documentclass{scrreprt}
% \input{classicthesis-config}
% In this input I have some of the following:
\PassOptionsToPackage{eulerchapternumbers,listings,drafting,
pdfspacing,
subfig,
beramono,eulermath,parts}{classicthesis}
\usepackage{ifthen}
\newboolean{enable-backrefs}
\setboolean{enable-backrefs}{false}
\newcounter{dummy}
\PassOptionsToPackage{spanish,es-lcroman}{babel}
\usepackage{babel}
\PassOptionsToPackage{utf8}{inputenc}
\usepackage{inputenc}
\usepackage{caption}
\usepackage{subcaption}
\captionsetup{format=hang,font=small}
\usepackage{float}
%\usepackage{subfig}
\usepackage{classicthesis}
\PassOptionsToPackage{hyperfootnotes=false,pdfpagelabels}{hyperref}
\usepackage{hyperref}
\pdfcompresslevel=9
\pdfadjustspacing=1
\PassOptionsToPackage{pdftex}{graphicx}
\usepackage{graphicx}
\ifthenelse{\boolean{enable-backrefs}}%
{%
\PassOptionsToPackage{hyperpageref}{backref}
\usepackage{backref}
\renewcommand{\backreftwosep}{ and~}
\renewcommand{\backreflastsep}{, and~}
\renewcommand*{\backref}[1]{}
\renewcommand*{\backrefalt}[4]{
\ifcase #1 %
\backrefnotcitedstring%
\or%
\backrefcitedsinglestring{#2}%
\else%
\backrefcitedmultistring{#2}%
\fi}%
}{\relax}
\hypersetup{%
colorlinks=true, linktocpage=true, pdfstartpage=3, pdfstartview=FitV,%
breaklinks=true, pdfpagemode=UseNone, pageanchor=true, pdfpagemode=UseOutlines,%
plainpages=false, bookmarksnumbered, bookmarksopen=true, bookmarksopenlevel=1,%
hypertexnames=true, pdfhighlight=/O,
urlcolor=webbrown, linkcolor=RoyalBlue, citecolor=webgreen,
pdfsubject={},%
pdfkeywords={},%
pdfcreator={pdfLaTeX},%
}
\makeatletter
\@ifpackageloaded{babel}%
{%
\addto\extrasspanish{%
\renewcommand*{\figureautorefname}{Figura}%
\renewcommand*{\tableautorefname}{Cuadro}%
\renewcommand*{\chapterautorefname}{Capítulo}%
\renewcommand*{\sectionautorefname}{Sección}%
\renewcommand*{\subsectionautorefname}{Sección}%
\renewcommand*{\subsubsectionautorefname}{Sección}%
}%
\providecommand{\subfigureautorefname}{\figureautorefname}%
}{\relax}
\makeatother
\usepackage{lipsum}
\usepackage[demo]{graphicx}
\begin{document}
\frenchspacing
\raggedbottom
\selectlanguage{spanish}
\pagenumbering{roman}
\pagestyle{plain}
\pagestyle{scrheadings}
% Table of Contents
\refstepcounter{dummy}
\pdfbookmark[1]{\contentsname}{tableofcontents}
\setcounter{tocdepth}{2}
\setcounter{secnumdepth}{3}
\manualmark
\markboth{\spacedlowsmallcaps{\contentsname}} {\spacedlowsmallcaps{\contentsname}}
\tableofcontents
\automark[section]{chapter}
\renewcommand{\chaptermark}[1]{\markboth{\spacedlowsmallcaps{#1}}{\spacedlowsmallcaps{#1}}}
\renewcommand{\sectionmark}[1]{\markright{\thesection\enspace\spacedlowsmallcaps{#1}}}
% List of Figures and Tables
\clearpage
\begingroup
\let\clearpage\relax
\let\cleardoublepage\relax
\let\cleardoublepage\relax
% List of Figures
\refstepcounter{dummy}
\addcontentsline{toc}{chapter}{\listfigurename}
\pdfbookmark[1]{\listfigurename}{lof}
\listoffigures
\vspace*{8ex}
% List of Tables
\refstepcounter{dummy}
\addcontentsline{toc}{chapter}{\listtablename}
\pdfbookmark[1]{\listtablename}{lot}
\listoftables
\vspace*{8ex}
\endgroup
\pagenumbering{arabic}
\chapter{Dummy text} %
\section{Lorem}
\lipsum[1-2]
Foo bar baz (figure ~\ref{fig:ex1}).
\begin{figure}[H]
\begin{center}
\includegraphics{graphs/dataset17b.pdf}
\end{center}
\caption{Example 1.}
\label{fig:ex1}
\end{figure}
\end{document}
谢谢。
答案1
你有
\PassOptionsToPackage{eulerchapternumbers,listings,drafting,
pdfspacing,
subfig,
beramono,eulermath,parts}{classicthesis}
\usepackage{classicthesis}
首先,没有理由在这个包或其他包的序言中这样做。相反,只需说
\usepackage[eulerchapternumbers,listings,drafting,
pdfspacing,
subfig,
beramono,eulermath,parts]{classicthesis}
其次,选项subfig
是请求的选项subfig
。因此,如果您不想要subfig
,请不要告诉包加载它:
\usepackage[eulerchapternumbers,listings,drafting,
pdfspacing,
beramono,eulermath,parts]{classicthesis}