0

I have the following code included in my LaTeX report:

\begin{figure}[h]                                                                  
    \subfigure[Probe 1, Fluoreszenz]{                                                                                 
        \includegraphics[width=0.48\textwidth]{images/p1flPart}                    
        \label{fig:patha}                                                          
    }                                                                              
    \subfigure[Probe 2, Fluoreszenz]{                                              
        \includegraphics[width=0.48\textwidth]{images/p2flPart}                    
        \label{fig:pathb}                                                          
    }                                                                              
    \subfigure[Probe 1, Phasenkontrast]{                                           
        \includegraphics[width=0.48\textwidth]{images/p1phPart}                    
        \label{fig:pathc}                                                          
    }                                                                              
    \subfigure[Probe 2, Phasenkontrast]{                                           
        \includegraphics[width=0.48\textwidth]{images/p2phPart}                    
        \label{fig:pathd}                                                          
    }                                                                              
    \caption{                                                                      
        Rekonstruierte Trajektorien der erkannten Teilchen.                        
    }                                                                              
    \label{fig:path}                                                               
\end{figure}

The resulting image appears to be faulty and I don't know why. enter image description here

1

Answer with subcaption package...

\documentclass{scrbook}
\usepackage[demo]{graphicx}
\usepackage{subcaption}

\usepackage{cleveref}


\captionsetup[subfigure]{subrefformat=simple,labelformat=simple}
\renewcommand\thesubfigure{(\alph{subfigure})}


\setcounter{chapter}{1}

\begin{document}

\begin{figure}[htbp!]
    \centering
      \begin{subfigure}{0.48\textwidth}
        \includegraphics[width=\textwidth]{image1}
          \caption{Probe 1, Fluoreszenz}
          \label{fig:patha} 
      \end{subfigure}
      \begin{subfigure}{0.48\textwidth}
        \includegraphics[width=\textwidth]{image1}
          \caption{Probe 2, Fluoreszenz}
          \label{fig:pathb} 
      \end{subfigure}
      \begin{subfigure}{0.48\textwidth}
        \includegraphics[width=\textwidth]{image1}
          \caption{Probe 1, Phasenkontrast}
          \label{fig:pathc} 
      \end{subfigure}
      \begin{subfigure}{0.48\textwidth}
        \includegraphics[width=\textwidth]{image1}
          \caption{Probe 2, Phasenkontrast}
          \label{fig:pathd} 
      \end{subfigure}
\caption{Rekonstruierte Trajektorien der erkannten Teilchen.
\label{fig:path}
}
\end{figure}

\Cref{fig:path} is whole image.

\Cref{fig:patha} is first image.


\end{document}

Your Answer

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