TransWikia.com

Placing a List of Schemes in the Table of Contents

TeX - LaTeX Asked on December 6, 2020

I am using the chemmacros package — specifically its scheme module — to generate a List of Schemes. (Note: the chemmacros package has been recently updated so that it is compatible with the book class.)

I am also using the tocloft package to change the number widths of the List of Figures and List of Tables.

In the following MWE, why does the List of Schemes appear as a subentry of List of Tables in the Table of Contents? How can I get the List of Schemes to appear as a separate entry in the Table of Contents?

documentclass[oneside,11pt]{book}

usepackage[semibold,tt=false]{libertine}
usepackage{libertinust1math}
usepackage[font={sf,small},labelsep=quad,labelfont=sc]{caption}
usepackage[subrefformat=parens]{subcaption}
usepackage[
  expansion = false ,
  tracking = smallcaps ,
  letterspace = 40 ,
]{microtype}
usepackage{booktabs}
usepackage{acro}
acsetup{
  barriers/use, barriers/reset,
  use-id-as-short,
}
usepackage[capitalize]{cleveref}
usepackage{chemformula}
setchemformula{charge-hshift=.5pt}
usepackage{chemmacros}
usechemmodule{scheme}
usepackage{graphicx}
usepackage[titles]{tocloft}
setlength{cftfignumwidth}{2.9em}
setlength{cfttabnumwidth}{2.9em}

begin{document}

tableofcontents

addcontentsline{toc}{chapter}{listfigurename}
listoffigures

addcontentsline{toc}{chapter}{listtablename}
listoftables

addcontentsline{toc}{scheme}{listschemename}
listofschemes

chapter{First chapter}
Refer to cref{fig:firstfig} using cleveref package.
Refer to cref{tbl:firsttbl}.
Refer to scheme, cref{scm:firstscheme}.
% Example figure
begin{figure}[!h]
  centering
  includegraphics[width=0.02textwidth]{example-image}
  caption{Caption of figure in first chapter.}label{fig:firstfig}
end{figure}

% Example table 
begin{table}[!h]
  centering
  begin{tabular}{ll}
    toprule
    A & B
    bottomrule
  end{tabular}
  caption{Caption of table in first chapter.}label{tbl:firsttbl}
end{table}

begin{scheme}[!h]
  centering
  includegraphics[width=0.02textwidth]{example-image-a}
  caption{Caption of first scheme.}label{scm:firstscheme}
end{scheme}

end{document}

mwe

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP