当我使用代码时
\documentclass[twocolumn,preprintnumbers]{revtex4}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{dcolumn}
\usepackage{bm}
\usepackage{array}
\usepackage{graphicx}
\usepackage{floatrow}
\begin{document}
...
\begin{figure}
\includegraphics[width=3cm]{graph1}
\includegraphics[width=3cm]{graph2}
\caption{White sand beaches. The pink smoothness of the conch shell. A sea abundant with possibilities. Duty-free shops filled with Europe’s finest gifts and perfumes. Play your favorite game of golf amidst the tropical greens on one of the many championship courses.}
\label{Fig1}
\end{figure}
...
\end{document}
图中的标题像这样对齐
但是当我添加\usepackage{subfig}
顶部时,图中的标题像这样对齐
看起来标题是居中的,但我希望标题在两边对齐,我尝试将此代码放在顶部
\usepackage{caption}
\captionsetup{justification=justified,singlelinecheck=false}
但是没用,想问一下如何让标题两边对齐。
答案1
加载subfig
包为:
\usepackage[caption=false]{subfig}
这样,您就可以保留字幕的设置revtex4
。完整的 MWE:
\documentclass[twocolumn,preprintnumbers]{revtex4}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{dcolumn}
\usepackage{bm}
\usepackage{array}
\usepackage{floatrow}
\usepackage[demo]{graphicx}
\usepackage{floatrow}
\usepackage[caption=false]{subfig}
\begin{document}
\begin{figure}
\centering
\includegraphics[width=3cm]{graph1}
\hfil
\includegraphics[width=3cm]{graph2}
\caption{White sand beaches. The pink smoothness of the conch shell. A sea abundant with possibilities. Duty-free shops filled with Europe’s finest gifts and perfumes. Play your favorite game of golf amidst the tropical greens on one of the many championship courses.}
\label{Fig1}
\end{figure}
\end{document}