1

It's covered by the picture form the next line as shown below:

enter image description here

I've tried to set subfigure with new width or new height, but the problem is still there.

The environment of my latex is a template on overleaf, I made a simple version and uploaded in Github here.

A simple version of the source code is as below:

\documentclass[type=master,fontset=fandol]{thuthesis}

\usepackage{thuthesis}

\graphicspath{{figures/}}


\begin{document}
\mainmatter

\chapter{test}

\begin{figure}[h]
  \centering%
  \begin{subfigure}{0.5\textwidth}
    \centering
    \includegraphics[width=\linewidth]{1.eps}
    \caption{$v_l^* - l$}
  \end{subfigure}%
%  \hspace{4em}%
  \begin{subfigure}{0.5\textwidth}
    \centering
    \includegraphics[width=\linewidth]{2.eps}
    \caption{$\sigma_l^* - l$}
  \end{subfigure}

  \begin{subfigure}{0.5\textwidth}
    \centering
    \includegraphics[width=\linewidth]{3.eps}
    \caption{$v_b - l$}
  \end{subfigure}%
%  \hspace{4em}%
  \begin{subfigure}{0.5\textwidth}
    \centering
    \includegraphics[width=\linewidth]{4.eps}
    \caption{$\sigma_b - l$}
  \end{subfigure}

  \caption{}
  \label{fig:ov}
\end{figure}

\end{document}
  • Welcome to TeX.SE! Please extend your code snippet to complete but small document beginning with \documentclass{...} and ending with \end{document} with your code fragment is not possible to reproduce your problem. – Zarko May 26 at 9:21
  • @Zarko It's from a template on overleaf( overleaf.com/latex/templates/… ), you may put my code in it and reproduce the problem – Hangci Du May 27 at 9:22
  • Please again, make your code compilable. Your link will be soon or later dead and people will not be able to reproduce your problem. From your code fragment we can only conclude, that it is not source of your problem. – Zarko May 27 at 9:29
  • @Zarko Sorry for may fresh mind. I have uploaded the source code in GitHub here, please feel free to check it. Best wishes! – Hangci Du May 28 at 15:59
  • Please, please consider my previous comments. Links to your code is not what i ask you. Just open your file in your editor, copy its content, and past it your question. Simply like this. – Zarko May 28 at 16:04
0

with your MWE, after small tweak of images width (from width=0.5\textwidth to 0.48\textwidth) and fixing error in document class (undefined\bibfont`), i obtain the following result:

enter image description here

Corrected MWE is:

\documentclass[type=master,fontset=fandol, demo]{thuthesis}
\usepackage{thuthesis}
%\graphicspath{{figures/}}
\usepackage{subcaption}

\begin{document}
\mainmatter

\chapter{test}
\begin{figure}[ht]
  \begin{subfigure}{0.48\textwidth}
    \includegraphics[width=\linewidth]{1}
    \caption{$v_l^* - l$}
  \end{subfigure}%
\hfill
  \begin{subfigure}{0.48\textwidth}
    \includegraphics[width=\linewidth]{2}
    \caption{$\sigma_l^* - l$}
  \end{subfigure}

  \begin{subfigure}{0.48\textwidth}
    \includegraphics[width=\linewidth]{3}
    \caption{$v_b - l$}
  \end{subfigure}%
\hfill
  \begin{subfigure}{0.48\textwidth}
    \includegraphics[width=\linewidth]{4}
    \caption{$\sigma_b - l$}
  \end{subfigure}

  \caption{}
  \label{fig:ov}
\end{figure}
\end{document}
  • you not need to write image file tip (as you can see in MWE above)
  • you should write to document class author and ask him to fix error: \bibfont undefined (temporally i change line 1149 from \renewcommand\bibfont{\ifthu@bachelor\wuhao[1.619]\else\wuhao[1.5]\fi} to \newcommand\bibfont{\ifthu@bachelor\wuhao[1.619]\else\wuhao[1.5]\fi}
  • as you can see, images appear as expected, without any overlapping of sub-captions. if you like to have more space between sub-captions and images in the next row, insert \medskip or \bigskip before second rows of images:
... (images in the first row)
\end{subfigure}

\medskip
\begin{subfigure}{0.48\textwidth}
... (images in the second row)
  • Thank you so much for your great patience and perfectly solved my question! I have asked the template provider to solve this issue in their source code. – Hangci Du May 28 at 17:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.