![subfloatrow:居中单个子图](https://linux22.com/image/283645/subfloatrow%EF%BC%9A%E5%B1%85%E4%B8%AD%E5%8D%95%E4%B8%AA%E5%AD%90%E5%9B%BE.png)
在下面的例子中,我怎样才能使第三个图形(C)居中?
\documentclass[a4paper,12pt]{article}
\usepackage{tikz}
\usepackage{floatrow}
\usepackage{subfig}
\begin{document}
\begin{figure}[htbp]
\floatsetup{objectset=centering}
\ffigbox{%
\begin{subfloatrow}%
\ffigbox{\begin{tikzpicture}
\draw[fill=blue] (0,0) rectangle (4,4);
\end{tikzpicture}}{\caption{A}}%
\ffigbox{\begin{tikzpicture}
\draw[fill=blue] (0,0) rectangle (4,4);
\end{tikzpicture}}{\caption{B}}%
\end{subfloatrow}
\begin{subfloatrow}%
\ffigbox{\begin{tikzpicture}
\draw[fill=blue] (0,0) rectangle (4,4);
\end{tikzpicture}}{\caption{C}}%
\end{subfloatrow}
}{\caption{}}
\end{figure}
\end{document}
省略第二个子浮点行可以让我居中,但是,我保留了子标题编号。
答案1
图 C 对我来说处于中心位置。您可以使用以下方法改进代码:
\documentclass[a4paper,12pt]{article}
\usepackage{tikz}
\usepackage{subfig}
\begin{document}
\begin{figure}[h]
\centering
\subfloat[][\emph{A}.]
{
\begin{tikzpicture}
\draw[fill=blue] (0,0) rectangle (4,4);
\end{tikzpicture}
} \qquad
\subfloat[][\emph{B}.]
{
\begin{tikzpicture}
\draw[fill=blue] (0,0) rectangle (4,4);
\end{tikzpicture}
} \\
\subfloat[][\emph{C}.]
{
\begin{tikzpicture}
\draw[fill=blue] (0,0) rectangle (4,4);
\end{tikzpicture}
}
\caption{Example.}
\label{fig:subfig}
\end{figure}
\end{document}