You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While working on this answer, I found an inconsistency in the counter representation/dependencies (per chapter vs. continuous) as well as in the "chapter gap" in schemes and \listofschemes as compared to figure/table and \listoffigures/\listoftables in different documentclasses.
Using the report class, figures/tables are by default numbered per chapter and the \listoffigures/\listoftables contains a larger vertical white space between figures/tables of different chapters than between figures/tables of the same chpter ("chapter gap"). Schemes on the other hand, are numbered continuously and no chapter gap is present in the \listofschemes.
Changing the scheme numbering style from continuous to per chapter using \AtEndPreamble{\numberwithin{scheme}{chapter}} corrects the numbering style to the expected one, but still leaves us with no gap in the \listofschemes. Using \usepackage{xpatch}\makeatletter\xapptocmd{\@chapter}{\addtocontents{los}{\protect\addvspace{10\p@}}}{}{}\makeatother,
I can add the missing gap back in, however, I would have expected the \listofschemes to look like the \listoffigures initially and without having to do thouse changes.
Interestingly, when using memoir, the schemes are already numbered within the chapter, as expected, however, the chapter gap is missing here, as well.
Taking a look at the KOMA-script classes, we get the opposite result: Using scrbook or scrreprt, the chapter gap is correctly present, and also correctly responds to adding listof=nochaptergap as a class option, as well. On the other hand, the numbering scheme is again continuous instead of per chapter.
MWE:
\documentclass{report} % schemes numbered continuously instead of per chapter, chapter gap in listofschemes missing
%\documentclass{scrbook} % schemes numbered continuously instead of per chapter, chapter gap in listofschemes present
%\documentclass{memoir} % schemes numbered per chapter, chapter gap in listofschemes missing
\usepackage{chemmacros}
\chemsetup{modules=scheme}
\begin{document}
\listoffigures
\listoftables
\listofschemes
\chapter{first chapter}
\begin{figure}\caption{figure}\end{figure}
\begin{figure}\caption{figure}\end{figure}
\begin{table}\caption{table}\end{table}
\begin{table}\caption{table}\end{table}
\begin{scheme}\caption{scheme}\end{scheme}
\begin{scheme}\caption{scheme}\end{scheme}
\chapter{second chapter}
\begin{figure}\caption{figure}\end{figure}
\begin{figure}\caption{figure}\end{figure}
\begin{table}\caption{table}\end{table}
\begin{table}\caption{table}\end{table}
\begin{scheme}\caption{scheme}\end{scheme}
\begin{scheme}\caption{scheme}\end{scheme}
\end{document}
According to my investigations, this should be (partially) fixable by adding
\counterwithin {#1} {chapter} to the definition of \chemmacros_define_float_method:nnn {KOMA}
While working on this answer, I found an inconsistency in the counter representation/dependencies (per chapter vs. continuous) as well as in the "chapter gap" in
schemes
and\listofschemes
as compared tofigure
/table
and\listoffigures
/\listoftables
in different documentclasses.Using the
report
class,figures
/tables
are by default numbered per chapter and the\listoffigures
/\listoftables
contains a larger vertical white space between figures/tables of different chapters than between figures/tables of the same chpter ("chapter gap").Schemes
on the other hand, are numbered continuously and no chapter gap is present in the\listofschemes
.Changing the
scheme
numbering style from continuous to per chapter using\AtEndPreamble{\numberwithin{scheme}{chapter}}
corrects the numbering style to the expected one, but still leaves us with no gap in the\listofschemes
. Using\usepackage{xpatch}\makeatletter\xapptocmd{\@chapter}{\addtocontents{los}{\protect\addvspace{10\p@}}}{}{}\makeatother
,I can add the missing gap back in, however, I would have expected the
\listofschemes
to look like the\listoffigures
initially and without having to do thouse changes.Interestingly, when using
memoir
, the schemes are already numbered within the chapter, as expected, however, the chapter gap is missing here, as well.Taking a look at the KOMA-script classes, we get the opposite result: Using
scrbook
orscrreprt
, the chapter gap is correctly present, and also correctly responds to addinglistof=nochaptergap
as a class option, as well. On the other hand, the numbering scheme is again continuous instead of per chapter.MWE:
According to my investigations, this should be (partially) fixable by adding
\counterwithin {#1} {chapter}
to the definition of\chemmacros_define_float_method:nnn {KOMA}
and
to the definition of
\chemmacros_define_float_method:nnn {memoir}
.The text was updated successfully, but these errors were encountered: