我用来chemstyle
创建化学方案列表(在内classicthesis
),但列表的编号与我的图表列表不同。有没有办法将 1.1 更改为方案 1.1,然后编辑间距以使其与其他所有内容匹配?
谢谢!
\documentclass[twoside,openright,titlepage,numbers=noenddot,headinclude,footinclude=true,cleardoublepage=empty,abstractoff,BCOR=5mm,paper=a4,fontsize=10pt, american,english]{scrreprt}
\usepackage[on]{auto-pst-pdf}
\usepackage{subfig}
\usepackage[textfont=it]{caption}
\captionsetup{format=hang,font=small}
\usepackage[version=3]{mhchem}
\usepackage[varioref=false]{chemstyle}
\usepackage{chemnum}
\setchemnum{format= \normalfont
\bfseries}
\usepackage[latin9]{inputenc}
\PassOptionsToPackage{T1}{fontenc}
\usepackage{fontenc}
\usepackage{babel}
\usepackage{graphicx}
\usepackage[eulerchapternumbers,listings,pdfspacing,floatperchapter,subfig,beramono,parts,dottedtoc]{classicthesis}
\newcounter{dummy} % necessary for correct hyperlinks (to index, bib, etc.)
\begin{document}
\begingroup
\let\cleardoublepage\relax %removes gaps between lists
\refstepcounter{dummy}
\pdfbookmark[1]{\listfigurename}{lof}
\listoffigures
\vspace*{8ex}
\refstepcounter{dummy}
\pdfbookmark[1]{\listtablename}{lot}
\listoftables
\vspace*{8ex}
\refstepcounter{dummy}
\pdfbookmark[1]{\listschemename}{los}
\let\origaddvspace\addvspace%extra lines to stop breaking between chapter groups
\renewcommand{\addvspace}[1]{}%extra lines to stop breaking between chapter groups
\listofschemes
\renewcommand{\addvspace}[1]{\origaddvspace{#1}}%extra lines to stop breaking between chapter groups
\vspace*{8ex}
\endgroup
\cleardoublepage
\chapter{chapter}
\begin{figure}[h]
\centering
{figure here}
\caption[figure]{Figure}
\end{figure}
\begin{table}[h]
\centering
{table here}
\caption[table]{Table}
\end{table}
\begin{scheme}[h]
\centering
{scheme here}
\caption[scheme]{Scheme}
\end{scheme}
\end{document}
更新 - 该问题似乎出现在 chemstyle 如何执行 tocloft\newlistentry
命令中:
\newlistentry[chapter]{scheme}{los}{0}%
\cftsetindents{scheme}{0em}{2.3em}%
\addtodef{\insertchapterspace}{}{%
\addtocontents{los}{\protect\addvspace{10pt}}%
}%
它将参数名称调用为{scheme}
,这会创建许多常用命令,因此例如\thescheme
可以正常工作。但是应该对此采取行动的选项(例如)\cftschemepresnum
仍未定义。这种行为有什么原因吗?
答案1
虽然chemscheme
它做得很好,但要将它集成到一个复杂的设置中并不容易classicthesis
。我可能会scheme
在适当的时间手动定义环境
\documentclass{scrreprt}
\usepackage{float}
\usepackage{tocloft}
\newlistof[chapter]{scheme}{los}{List of Schemes}
\makeatletter
\newcommand*\fps@scheme{tbp}
\newcommand*\ftype@scheme{3}
\newenvironment{scheme}{\@float{scheme}}{\end@float}
\newcommand*\schemename{Scheme}
\makeatother
\usepackage{classicthesis}
% Based on set up in classicthesis
\renewcommand{\cftschemepresnum}{\schemename~}%Tab.~}
\newlength{\schemelabelwidth}
\settowidth{\schemelabelwidth}{\cftschemepresnum~999}
\addtolength{\schemelabelwidth}{2.5em}
\cftsetindents{scheme}{0em}{\figurelabelwidth}
\begin{document}
\listoffigures
\listoftables
\listofscheme
\clearpage
\begin{figure}
\centering
figure here
\caption{Figure}
\end{figure}
\begin{table}
\centering
table here
\caption{Table}
\end{table}
\begin{scheme}
\centering
scheme here
\caption{Scheme}
\end{scheme}
\end{document}
classicthesis
在这里,我复制了表格的设置并根据方案对其进行了修改。
答案2
根据答案这里我之前在代码中添加了以下内容\begin{document}
:
\newlistof{listofschemes}{los}{\listschemename}
\newlistentry{scheme}{los}{0}
\renewcommand{\cftschemepresnum}{Scheme~}
\setlength\cftschemenumwidth{8em}
\setlength\cftschemeindent{0.1em}
这会导致编译时出现错误,该错误scheme
之前已定义,但如果忽略该错误,文档将使用对方案表的更改进行编译。它似乎仍然chemscheme
没有将所有信息传递给 tocloft,但作为一种快速而粗糙的修复,这是我能想到的最好的方法!