我想要将子标题(c)对齐,如下图所示。
\documentclass[a4paper,fleqn]{cas-dc}
%\usepackage[numbers]{natbib}
%\usepackage[authoryear]{natbib}
\usepackage[authoryear,longnamesfirst]{natbib}
\graphicspath{ {./figures/} }
\usepackage{hyperref}
\usepackage{verbatim} %comments
\usepackage{apalike}
\usepackage{lipsum,capt-of,graphicx}
\usepackage{geometry}% Just for this example
\usepackage{natbib}
\let\printorcid\relax
\usepackage[wby]{callouts}
%\usepackage{cite}
\usepackage{ragged2e}
\usepackage{setspace}
\usepackage[labelfont=bf,justification=raggedright,singlelinecheck=false, font={footnotesize}]{caption}
\captionsetup[figure]{name=Fig. ,labelsep=period, justification=justified, singlelinecheck=off}
\captionsetup[table]{labelsep=newline,font=footnotesize, justification=justified, singlelinecheck=off}%,skip=0pt,belowskip=0pt}
\usepackage{subcaption}
\usepackage{setspace}
\usepackage{etoolbox}
\AtBeginEnvironment{table}{\sffamily}
\usepackage{booktabs,siunitx, multirow}
\sisetup{table-format=1.4, tight-spacing=true, separate-uncertainty}
\sisetup{
output-exponent-marker = \text{e},
exponent-product={},
retain-explicit-plus,
input-open-uncertainty = ,
input-close-uncertainty = ,
table-align-text-pre = false,
table-align-text-post = false,
round-mode=places,
round-precision=2,
table-space-text-pre = (,
table-space-text-post = ),
}
\usepackage{amsmath}
\usepackage{floatrow}
\floatsetup[table]{capposition=top}
\floatsetup[table]{captionskip=0.1pt}
\usepackage{tabularx}
\usepackage[export, demo]{adjustbox}
\begin{document}
\begin{figure*}
\centering
\setkeys{Gin}{clip, trim=1cm 1cm .8cm 0.8cm, width=\linewidth,height=4cm}
\begin{tabularx}{\linewidth}{XX}
\subfloat[\label{sfig:a}]{\includegraphics{C:/Users/foobar/Desktop/Doc1.pdf}}
&
\subfloat[\label{sfig:b}]{\includegraphics{C:/Users/foobar/Desktop/Doc1.pdf}} \\
\subfloat[\label{sfig:c}]{\includegraphics[valign=m]{C:/Users/foobar/Desktop/Doc1.pdf}}
&
\caption{This caption} \label{fig2: Figs}
\end{tabularx}
\end{figure*}
\end{document}
答案1
根据猜测你想要什么。也根据 OP 的评论和对问题的编辑。
编辑: 像这样?
或这个:
\subfoat
现在使用包\subcaption}
中定义的而不是subcaption
。子标题位于分隔的表格行中。这样可以更好地控制标题定位。
\documentclass{article}
\usepackage{tabularx}
\usepackage[export, demo]{adjustbox}
\usepackage[skip=1ex, labelfont=bf]{caption}
\usepackage[skip=0.5ex, belowskip=1ex]{subcaption}
\usepackage{lipsum}
\begin{document}
\begin{figure}[ht]
\centering
\setkeys{Gin}{clip, trim=1cm 1cm 1cm 0.8cm, width=\linewidth,height=4cm}
\renewcommand\tabularxcolumn[1]{b{#1}}
\begin{tabularx}{\linewidth}{XX}
\includegraphics{C:/Users/foobar/Desktop/Doc1.pdf}
& \includegraphics{C:/Users/foobar/Desktop/Doc1.pdf} \\
\subcaption{}\label{sfig:a}
& \subcaption{}\label{sfig:b} \\
\includegraphics[valign=m] % for the second image delete "[valign=m]"
{C:/Users/foobar/Desktop/Doc1.pdf}
& \captionsetup{skip=-2.4ex}
\caption{\lipsum[1][1]}
\label{fig2: neighborhood} \\
\subcaption{}\label{sfig:c}
& \\
\end{tabularx}
\end{figure}
\end{document}
如果在环境中将前两幅图像插入表中,则可以得到类似的结果subfloat
。 在这种情况下,表体是:
\begin{tabularx}{\linewidth}{XX}
\subfloat[]{\includegraphics{C:/Users/foobar/Desktop/Doc1.pdf}}
& \subfloat[]{\includegraphics{C:/Users/foobar/Desktop/Doc1.pdf}} \\
\includegraphics%[valign=m] % for the second image delete "[valign=m]"
{C:/Users/foobar/Desktop/Doc1.pdf}
& \captionsetup{skip=-2.4ex}
\caption{\lipsum[1][1]}
\label{fig2: neighborhood} \\
\subcaption{}\label{sfig:c}
& \\