Create a simple "scheme" environment and a "List of Schemes"
Here is how you can combine chemmacros
' scheme
module with subcaption
and cleveref
.
- List of Schemes:
- References to schemes and subschemes:
- Captions of schemes:
\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,
}
\newcommand{\ie}{i.e.}
\newcommand{\eg}{e.g.}
\newcommand{\cf}{cf.}
\newcommand{\avg}[1]{\overline{#1}}
\usepackage{mdframed}
\usepackage{chemformula}
\setchemformula{charge-hshift=.5pt}
\usepackage{chemmacros}
\chemsetup{modules=scheme}
\AtEndPreamble{\DeclareCaptionSubType*{scheme}}
\usepackage{graphicx}
\usepackage{enumitem}
\usepackage{calc}
\usepackage{tabto}
\usepackage[titles]{tocloft}
\setlength{\cftfignumwidth}{2.9em}
\setlength{\cfttabnumwidth}{2.9em}
\usepackage[capitalize]{cleveref}
\crefformat{subscheme}{\schemename~#2#1#3}
\begin{document}
\addcontentsline{toc}{chapter}{\listfigurename}
\listoffigures
% \phantomsection %% Remove if using hyperref
\addcontentsline{toc}{chapter}{\listtablename}
\listoftables
\addcontentsline{toc}{chapter}{\listschemename}
\listofschemes
\chapter{First chapter}
Text in the first chapter.
Refer to \cref{fig:firstfig} using cleveref package.
Refer to \cref{tbl:firsttbl}.
Refer to \cref{fig:multi}, \cref{fig:multi:a}, and \cref{fig:multi:b}.
Refer to eventual scheme, \cref{scm:eventualscheme}.
Refer to eventual multi-part scheme, \cref{scm:eventualmultischeme}, \cref{scm:eventualmultischeme:a}, and \cref{scm:eventualmultischeme:b}.
\begin{figure}[!h]
\caption{Caption of figure in first chapter.}\label{fig:firstfig}
\end{figure}
\begin{table}[!h]
\caption{Caption of table in first chapter.}\label{tbl:firsttbl}
\end{table}
\begin{figure}[!h]
\begin{subfigure}{\textwidth}
\phantomsubcaption\label{fig:multi:a}
\end{subfigure}
\begin{subfigure}{0pt}
\phantomsubcaption\label{fig:multi:b}
\end{subfigure}
\caption{Caption of figure referring to parts \subref{fig:multi:a} and \subref{fig:multi:b} with subref command.}\label{fig:multi}
\end{figure}
\begin{scheme}[!h]
\caption{Caption of scheme.}\label{scm:eventualscheme}
\end{scheme}
\begin{scheme}[!h]
\begin{subfigure}{\textwidth}
\phantomsubcaption\label{scm:eventualmultischeme:a}
\end{subfigure}
\begin{subfigure}{0pt}
\phantomsubcaption\label{scm:eventualmultischeme:b}
\end{subfigure}
\caption{Caption of scheme referring to parts \subref{fig:multi:a} and \subref{fig:multi:b} with subref command.}\label{scm:eventualmultischeme}
\end{scheme}
\chapter{Second chapter}
Text in the second chapter.
Refer to \cref{fig:secondfig}.
\begin{figure}[!h]
\caption{Caption of figure in second chapter.}\label{fig:secondfig}
\end{figure}
\begin{scheme}[!h]
\caption{Caption of scheme.}\label{scm:eventualscheme2}
\end{scheme}
\end{document}
Side note: Prior to version 5.11a (2020-11-21) chemmacros
\listofschemes
was incompatible with the book
class. (See also: corresponding bug report) If the above solution does not work for you, consider updating to version 5.11a
or newer.
To keep this answer short, I have removed the MWE that used version 5.11 and in which I showed how to overcome some formatting inconsistencies between the list of schemes and the list of figures.
Load the newfloat
package and the scheme
module for chemmacros
.
You just have to set up a subscheme
environment for subcaption
, which has to be done at begin document.
I loaded tocbibind
for adding \listoffigures
and \listoftables
to the table of contents. Your manual method is incorrect: you should at least have \cleardoublepage
before \addcontentsline
.
\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{newfloat}
\usepackage[
expansion = false ,
tracking = smallcaps ,
letterspace = 40 ,
]{microtype}
\usepackage{booktabs}
\usepackage{acro}
\usepackage{mdframed}
\usepackage{chemformula}
\usepackage{chemmacros}
\usepackage{graphicx}
\usepackage{enumitem}
\usepackage{calc}
\usepackage{tabto}
\usepackage[titles]{tocloft}
\usepackage[nottoc]{tocbibind}
\usepackage[capitalize]{cleveref} % should be last
% acro options
\acsetup{
barriers/use, barriers/reset,
use-id-as-short,
}
% chemmacros options
\usechemmodule{scheme}
% chemformula options
\setchemformula{charge-hshift=.5pt}
% tocloft options
\setlength{\cftfignumwidth}{2.9em}
\setlength{\cfttabnumwidth}{2.9em}
% caption options
\AtBeginDocument{\DeclareCaptionSubType*[alph]{scheme}}
% personal commands
\newcommand{\ie}{i.e.}
\newcommand{\eg}{e.g.}
\newcommand{\cf}{cf.}
\newcommand{\avg}[1]{\overline{#1}}
\begin{document}
\tableofcontents
\listoffigures
\listoftables
\listofschemes
\chapter{First chapter}
Text in the first chapter.
Refer to \cref{fig:firstfig} using cleveref package.
Refer to \cref{tbl:firsttbl}.
Refer to \cref{fig:multi}, \cref{fig:multi:a}, and \cref{fig:multi:b}.
Refer to eventual scheme, \cref{scm:eventualscheme}.
Refer to eventual multi-part scheme, \cref{scm:eventualmultischeme}.
% Example figure
\begin{figure}[!h]
\centering
\includegraphics[width=0.02\textwidth]{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}
% MULTIPART FIGURE
\begin{figure}[!h]
\centering
\begin{subfigure}{0.45\textwidth}
\centering
\includegraphics[width=0.02\textwidth]{example-image}
\phantomsubcaption\label{fig:multi:a}
\end{subfigure}
\begin{subfigure}{0.45\textwidth}
\includegraphics[width=0.02\textwidth]{example-image}
\phantomsubcaption\label{fig:multi:b}
\end{subfigure}
\caption{Caption of figure referring to parts \subref{fig:multi:a} and \subref{fig:multi:b} with subref command.}\label{fig:multi}
\end{figure}
\begin{scheme}[!h]
\centering
\includegraphics[width=0.02\textwidth]{example-image-a}
\caption{Caption of eventual scheme.}\label{scm:eventualscheme}
\end{scheme}
\begin{scheme}[!h]
\centering
\begin{subscheme}{0.45\textwidth}
\centering
\includegraphics[width=0.02\textwidth]{example-image-a}
\phantomsubcaption\label{scm:eventualmultischeme:a}
\end{subscheme}
\begin{subscheme}{0.45\textwidth}
\includegraphics[width=0.02\textwidth]{example-image-b}
\phantomsubcaption\label{scm:eventualmultischeme:b}
\end{subscheme}
\caption{Caption of eventual scheme referring to parts \subref{fig:multi:a} and \subref{fig:multi:b} with subref command.}\label{scm:eventualmultischeme}
\end{scheme}
\chapter{Second chapter}
Text in the second chapter.
Refer to \cref{fig:secondfig}.
% Another example figure
\begin{figure}[!h]
\centering
\includegraphics[width=0.02\textwidth]{example-image}
\caption{Caption of figure in second chapter.}\label{fig:secondfig}
\end{figure}
\end{document}
As @leandriis noted in the comments, the chemmacros
package apparently already does what you want.
Otherwise, you just have to add the lines
\usepackage{newfloat}
\DeclareFloatingEnvironment[fileext=los,placement={!ht},name=Scheme]{myscheme}
\captionsetup[myscheme]{labelfont=bf}
\crefname{myscheme}{scheme}{schemes}
to your preamble and then can use a new float type myscheme
similar to figures
. The list of schemes is produces with \listofmyschemes
.