I am using the overleaf template of TSP.cls journal. I need to put 4 figures side-by-side. I used the following code, it works with other overleaf templates but does not work with TSP.cls template.
can anyone help?
\documentclass[12pt,fleqn]{tsp}
\usepackage{graphicx}
\usepackage{adjustbox}
\usepackage{caption}
\usepackage{subcaption}
\begin{figure*}[t!]
\centering
\begin{subfigure}{0.2\linewidth}
\includegraphics[width=\linewidth,height = 4cm]{a.png}
\captionsetup{justification=centering}
\caption{}
\label{}
\end{subfigure}
\begin{subfigure}{0.2\linewidth}
\includegraphics[ width=\linewidth,height = 4cm ]{a.png}
\captionsetup{justification=centering}
\caption{}
\label{}
\end{subfigure}
\begin{subfigure}{0.2\linewidth}
\includegraphics[width=\linewidth, height =4cm ]{a.png}
\captionsetup{justification=centering}
\caption{}
\label{}
\end{subfigure}
\begin{subfigure}{0.2\linewidth}
\includegraphics[ width=\linewidth, height = 4cm ]{a.png}
\captionsetup{justification=centering}
\caption{}
\label{}
\end{subfigure}
\caption{}
\label{box_plots}
\end{figure*}
\end{document}
The
tspclass loads thesubfigurepackage. Use the syntax from this package instead of trying to combine this with thesubcaptionpackage.