居中子标题(无文字),仅保留(a)、(b)等

居中子标题(无文字),仅保留(a)、(b)等

我怎样才能不写子标题但保留子标题编号?也就是说,我怎样才能只保留 (a)、(b)、(c) ... 并依次将这些字母置于每张图片下方的中心?

例子:

\begin{figure}
\captionsetup[subfigure]{justification=centering}
\centering
    \begin{subfigure}[b]{0.32\textwidth}
        \includegraphics[scale=1]{fig/genero1.png}
        \caption{}
        \label{fig:hyper_N5xx_gender_11}
    \end{subfigure}
    \hfill
     %add desired spacing between images, e. g. ~, \quad, \qquad, \hfill etc. 
      %(or a blank line to force the subfigure onto a new line)
    \begin{subfigure}[b]{0.32\textwidth}
        \includegraphics[scale=1]{fig/genero2.png}
        \caption{}
        \label{fig:hyper_N612_gender_11}
    \end{subfigure}
    \hfill
     %add desired spacing between images, e. g. ~, \quad, \qquad, \hfill etc. 
    %(or a blank line to force the subfigure onto a new line)
    \begin{subfigure}[b]{0.32\textwidth}
        \includegraphics[scale=1]{fig/genero3.png}
        \caption{}
        \label{fig:hyper_N614_gender_11}
    \end{subfigure}
    \hfill
    \begin{subfigure}[b]{0.32\textwidth}
        \includegraphics[scale=1]{fig/genero4.png}
        \caption{}
        \label{fig:hyper_N624_gender_11}
    \end{subfigure}
    \hfill
     %add desired spacing between images, e. g. ~, \quad, \qquad, \hfill etc. 
      %(or a blank line to force the subfigure onto a new line)
    \begin{subfigure}[b]{0.32\textwidth}
        \includegraphics[scale=1]{fig/genero5.png}
        \caption{}
        \label{fig:hyper_N7070_gender_11}
    \end{subfigure}
    \hfill
     %add desired spacing between images, e. g. ~, \quad, \qquad, \hfill etc. 
    %(or a blank line to force the subfigure onto a new line)
    \begin{subfigure}[b]{0.32\textwidth}
        \includegraphics[scale=1]{fig/genero6.png}
        \caption{}
        \label{fig:hyper_N7071_gender_11}
    \end{subfigure}
    \hfill
    \caption{Gender distribution of hypertensive individuals per each CRG in 2011}\label{fig:distri_hyper_11} 

\end{figure}

答案1

嗯,这似乎有些误解。对图中的子图进行稍微重新排列(分成两组,每组三个子图),正确使用\hfill(代码中的最后一个就足够了),得到:

在此处输入图片描述

代码:

\documentclass{article}
\usepackage[justification=raggedright,singlelinecheck=false]{caption}
\usepackage{subcaption}
\usepackage{graphicx}

\begin{document}
\begin{figure}
\captionsetup[sub]{justification=centering}
    \begin{subfigure}[b]{0.32\textwidth}
        \includegraphics[width=\textwidth]{example-image}
        \caption{}
        \label{fig:hyper_N5xx_gender_11}
    \end{subfigure}
    \hfill
    \begin{subfigure}[b]{0.32\textwidth}
        \includegraphics[width=\textwidth]{example-image}
        \caption{}
        \label{fig:hyper_N612_gender_11}
    \end{subfigure}
    \hfill
    \begin{subfigure}[b]{0.32\textwidth}
        \includegraphics[width=\textwidth]{example-image}
        \caption{}
        \label{fig:hyper_N614_gender_11}
    \end{subfigure}
    \bigskip


    \begin{subfigure}[b]{0.32\textwidth}
        \includegraphics[width=\textwidth]{example-image}
        \caption{}
        \label{fig:hyper_N624_gender_11}
    \end{subfigure}
    \hfill
    \begin{subfigure}[b]{0.32\textwidth}
        \includegraphics[width=\textwidth]{example-image}
        \caption{}
        \label{fig:hyper_N7070_gender_11}
    \end{subfigure}
    \hfill
    \begin{subfigure}[b]{0.32\textwidth}
        \includegraphics[width=\textwidth]{example-image}
        \caption{}
        \label{fig:hyper_N7071_gender_11}
    \end{subfigure}
    \caption{Gender distribution of hypertensive individuals per each CRG in 2011}\label{fig:distri_hyper_11}
\end{figure}
    \end{document}

我使用 example-image 而不是您的图片,它提供了 ˙graphics˙package。当然,我对您的序言一无所知。也许您那里有什么东西导致了您的问题......

附录:对于子标题设置,正确的代码\captionsetup[sub]{justification=centering}˙ (corrected in above MWE). The same result with above MWE you also obtain, if you use标题包具有例如以下设置:

\usepackage[justification=raggedright,singlelinecheck=false]{caption}

此外,\bigskip正如 Mico 在其评论中所建议的那样,在第一行子图之后,您可以获得更美观的整幅图。现在已将其添加到 MWE。

相关内容