1

I'm using chemstyle to create a list of chemical schemes (within classicthesis), but it numbers the list differently from my lists of Figures and Tables. Is there a way to change, for example, 1.1 into Scheme 1.1 and then edit the spacing so it matches everything else?

Thanks!

\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}

Screenshot of Lists Update - This issue seems to arise in how chemstyle implements the tocloft \newlistentry command:

  \newlistentry[chapter]{scheme}{los}{0}%
  \cftsetindents{scheme}{0em}{2.3em}%
  \addtodef{\insertchapterspace}{}{%
    \addtocontents{los}{\protect\addvspace{10pt}}%
  }%

It calls the argument name as {scheme} and this creates many of the usual commands, so for example \thescheme works fine. However options that should act on this, such as \cftschemepresnum remain undefined. Is there a reason for this behaviour?

  • Sorry - I just realised this - will edit to amend. – Will Peveler May 6 '15 at 9:25
1

Whilst chemscheme does what it does well, it's not really that easy to integrate it into a complex set up like classicthesis. I'd probably simply define the scheme environment by hand at the appropriate point

\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}

Here I've copied the set up from classicthesis for tables and altered it for schemes.

  • Many thanks! That gets things working, but is there a way to call chemstyle and retain it's other functionality without chemscheme? This way I would avoid the compile error of having list of schemes defined twice? – Will Peveler May 14 '15 at 9:01
0

Based on the answer here I added the following to the code before \begin{document}:

\newlistof{listofschemes}{los}{\listschemename}
\newlistentry{scheme}{los}{0}
\renewcommand{\cftschemepresnum}{Scheme~}
\setlength\cftschemenumwidth{8em}
\setlength\cftschemeindent{0.1em}

This causes an error on compile, that scheme has been previously defined, but if ignored, the document will compile with the changes to the table of schemes. It still seems like chemscheme isn't passing all the information to tocloft, but as a quick and dirty fix, this is the best I have!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.