My Latex document suddenly stopped compiling and raising the "! LaTeX Error: Counter too large." error for no apparent reason. It compiled before, with the same amount of figures and subfigures, but even by erasing the things I added since the last time it compiled, it just doesn't work anymore.
I know what generally causes this error => when captioning more than 26 subfigures, it runs out of letter to label the subfigures and throws this error. This is not my case. My largest figure only has 8 subfigures so I don't know why it doesn't work.
Here's part of my code (more figures come before this):
\documentclass[11pt, oneside]{Thesis} % The default font size and one-sided printing (no margin offsets)
\graphicspath{{./Pictures/}} % Specifies the directory where pictures are stored
\usepackage[T1]{fontenc}
\usepackage{mathtools} % loads »amsmath«
\usepackage{amsmath}
\usepackage{physics}
\usepackage{float}
\usepackage{tabularx}
\usepackage{adjustbox}
\usepackage[english]{babel}
\usepackage[table]{xcolor}
\usepackage{tabularx}
%\usepackage{showframe} % for demo
\usepackage{lmodern}
\usepackage{microtype}
\usepackage{ragged2e}
\usepackage{lua-visual-debug}
\usepackage{placeins}
\usepackage{multirow}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{subcaption}
\usepackage[square, numbers, comma, sort&compress]{natbib}
\usepackage{booktabs}
%\usepackage[table,xcdraw]{xcolor}
\hypersetup{urlcolor=blue, colorlinks=true} % Colors hyperlinks in blue - change to black if annoying
\title{\ttitle} % Defines the thesis title - don't touch this
\begin{document}
\FloatBarrier
\section{Influence of solid exits}
%compare 5wg and 6wg. REG and SIDE sections, velocity vectors, turbulence, velocity contours?, ... Explain "vortex air-wall" in both, and why it's a clear advantage in 6wg.
\begin{table}[h]
\centering
\hspace*{-2cm}\makebox[\linewidth][c]{%
\begin{tabularx}{1.4\textwidth}{c*{2}{>{\centering\arraybackslash}X}@{}}
& \begin{subfigure}{\hsize}
\includegraphics[width=\hsize]{SE_5wg_REG_VV}
\caption{In-plane velocity vectors [m/s] - 5-wheels geometry}
\medskip
\end{subfigure}
& \begin{subfigure}{\hsize}
\includegraphics[width=\hsize]{SE_6wg_REG_VV}
\caption{In-plane velocity vectors [m/s]] - 6-wheels geometry}
\medskip
\end{subfigure} \\
& \begin{subfigure}{\hsize}
\includegraphics[width=\hsize]{SE_5wg_REG_VVz}
\caption{In-plane velocity vectors [m/s] - 5-wheels geometry close-up}
\medskip
\end{subfigure}
& \begin{subfigure}{\hsize}
\includegraphics[width=\hsize]{SE_6wg_REG_VVz}
\caption{In-plane velocity vectors [m/s] - 6-wheels geometry close-up}
\medskip
\end{subfigure} \\
& \begin{subfigure}{\hsize}
\includegraphics[width=\hsize]{SE_5wg_REG_TANz}
\caption{Tangential velocity contours [m/s] - 5-wheels geometry close-up}
\medskip
\end{subfigure}
& \begin{subfigure}{\hsize}
\includegraphics[width=\hsize]{SE_6wg_REG_TANz}
\caption{Tangential velocity contours [m/s] - 6-wheels geometry close-up}
\medskip
\end{subfigure} \\
& \begin{subfigure}{\hsize}
\includegraphics[width=\hsize]{SE_5wg_REG_TURBz}
\caption{Subgrid turbulent viscosity ratio [kg/m.s] - 5-wheels geometry close-up}
\medskip
\end{subfigure}
& \begin{subfigure}{\hsize}
\includegraphics[width=\hsize]{SE_6wg_REG_TURBz}
\caption{Subgrid turbulent viscosity ratio [kg/m.s] - 6-wheels geometry close-up}
\medskip
\end{subfigure} \\
\end{tabularx}}
\caption{Influence of the solid exits: 5-wheels geometry (left) and 6-wheels geometry (right)}
\label{solid_exits}
\end{table}
\FloatBarrier
\section{Influence of chimneys}
%Chimneys as turbulence creators?
%Chimney diameter? => central reflux! show in both 5wg and 6wg!
%Possible solution => conic chimneys, show with 6wg.
\begin{table}[h]
\centering
\hspace*{-2cm}\makebox[\linewidth][c]{%
\begin{tabularx}{1.4\textwidth}{c*{2}{>{\centering\arraybackslash}X}@{}}
& \begin{subfigure}{\hsize}
\includegraphics[width=\hsize]{CH_5wg_REG_VV}
\caption{In-plane velocity vectors [m/s] - 5-wheels geometry}
\medskip
\end{subfigure}
& \begin{subfigure}{\hsize}
\includegraphics[width=\hsize]{CH_6wg_REG_VV}
\caption{In-plane velocity vectors [m/s]] - 6-wheels geometry}
\medskip
\end{subfigure} \\
& \begin{subfigure}{\hsize}
\includegraphics[width=\hsize]{CH_5wg_REG_VVz2}
\caption{In-plane velocity vectors [m/s] - 5-wheels geometry close-up}
\medskip
\end{subfigure}
& \begin{subfigure}{\hsize}
\includegraphics[width=\hsize]{CH_6wg_REG_VVz2}
\caption{In-plane velocity vectors [m/s] - 6-wheels geometry close-up}
\medskip
\end{subfigure} \\
& \begin{subfigure}{\hsize}
\includegraphics[width=\hsize]{CH_5wg_REG_AXIz}
\caption{Axial velocity contours [m/s] - 5-wheels geometry close-up}
\medskip
\end{subfigure}
& \begin{subfigure}{\hsize}
\includegraphics[width=\hsize]{CH_6wg_REG_AXIz}
\caption{Axial velocity contours [m/s] - 6-wheels geometry close-up}
\medskip
\end{subfigure} \\
& \begin{subfigure}{\hsize}
\includegraphics[width=\hsize]{CH_5wg_REG_TURBz2}
\caption{Subgrid turbulent viscosity ratio [kg/m.s] - 5-wheels geometry close-up}
\medskip
\end{subfigure}
& \begin{subfigure}{\hsize}
\includegraphics[width=\hsize]{CH_6wg_REG_TURBz2}
\caption{Subgrid turbulent viscosity ratio [kg/m.s] - 6-wheels geometry close-up}
\medskip
\end{subfigure} \\
\end{tabularx}}
\caption{Influence of the chimneys: 5-wheels geometry (left) and 6-wheels geometry (right)}
\label{chimneys}
\end{table}
\end{document}
I know I didn't used the most straightforward method to create my tables, and I could have used a minipage for my subfigures instead. But if possible I would like to keep those "tables with subfigures" as they are (with minor changes if necessary to fix the problem ofc).
example-image
fromgraphicx
package and instead ofThesis
I usebook
) and remove doubled packages. I don't get any error your, but caption numbering system doesn't work and counting of subimages is not reset in new figures.tabularx
?