我正在使用 Elsevier Latex 模板准备期刊文章(双栏)。
使用此模板,跨越两列的图形的标题总是从中心开始。
\documentclass[a4paper,fleqn]{cas-dc}
%\usepackage[authoryear,longnamesfirst]{natbib}
%\usepackage[authoryear]{natbib}
\usepackage[numbers]{natbib}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{lscape}
\usepackage{multirow}
\usepackage{fancyhdr,graphicx,amsmath,amssymb}
\usepackage[ruled,vlined]{algorithm2e}
\usepackage[colorlinks]{hyperref}
\usepackage{graphicx,scalerel,stackengine}
\usepackage{amssymb}
\usepackage{amsmath}
%%%Author definitions
\def\tsc#1{\csdef{#1}{\textsc{\lowercase{#1}}\xspace}}
\tsc{WGM}
\tsc{QE}
\tsc{EP}
\tsc{PMS}
\tsc{BEC}
\tsc{DE}
\begin{document}
\let\WriteBookmarks\relax
\def\floatpagepagefraction{1}
\def\textpagefraction{.001}
\shorttitle{Fourier journal}
\shortauthors{Joshitha. R et~al.}
\begin{figure*}[t]
\centering
\begin{subfigure}{0.18\textwidth}
\includegraphics[width=\linewidth]{example-image-a}
\caption{\footnotesize }
\end{subfigure}
\begin{subfigure}{0.18\textwidth}
\includegraphics[width=\linewidth]{example-image-a}
\caption{\footnotesize }
\end{subfigure}
\begin{subfigure}{0.18\textwidth}
\includegraphics[width=\linewidth]{example-image-a}
\caption{\footnotesize}
\end{subfigure}
\begin{subfigure}{0.18\textwidth}
\includegraphics[width=\linewidth]{example-image-a}
\caption{\footnotesize}
\end{subfigure}\vspace{3pt}
\caption{\footnotesize (\textbf{a}) The extracted 13$\times$13 views of \textit{Fountain-Vincent2}; central view of (\textbf{b}) \textit{Bikes}; (\textbf{c}) \textit{Fountain-Vincent2}; (\textbf{d}) \textit{Stone-Pillars Outside}.}
\label{fig:the dataset}
\end{figure*}
\end{document}
我应该怎么做才能正确地从左侧开始显示字幕?
相同的代码片段在其他模板中也能完美运行。
答案1
正如您在后续评论中所报告的那样,Overleaf 目前仍在使用 TeXLive2020(2020-02-02 版 LaTeX2e 内核)和cas-dc
2020-03-14(2.1 版文档类)。您可能发现了 LaTeX 和文档类之间存在不良交互cas-dc
。
无论如何,使用 TeXLive2021、LaTeX2e 内核 2021-06-01 和cas-dc
2021-05-11 v. 2.3,问题似乎已经消失。您可能需要联系 Overleaf 帮助台——他们的 LaTeX 支持人员是一流的!——并请他们帮助获取最新版本的cas-dc
。也许这足以解决对齐问题。
\documentclass[a4paper,fleqn]{cas-dc}
\usepackage[numbers]{natbib}
\usepackage{caption,subcaption}
\usepackage{lscape}
\usepackage{multirow}
\usepackage{%fancyhdr, % I wouldn't use this package with this document class
graphicx,amsmath,amssymb}
\usepackage[ruled,vlined]{algorithm2e}
\usepackage{graphicx,scalerel,stackengine}
\usepackage[colorlinks]{hyperref} % it's best to load hyperref last
%\usepackage{amssymb} % don't load packages twice!
%\usepackage{amsmath}
%%%Author definitions % not needed for this MWE
%\def\tsc#1{\csdef{#1}{\textsc{\lowercase{#1}}\xspace}}
%\tsc{WGM}
%\tsc{QE}
%\tsc{EP}
%\tsc{PMS}
%\tsc{BEC}
%\tsc{DE}
\begin{document}
\let\WriteBookmarks\relax
\def\floatpagepagefraction{1}
\def\textpagefraction{.001}
\shorttitle{Fourier journal}
\shortauthors{Joshitha. R et~al.}
\begin{figure*}%[t] % [t] has no effect on placement of double-wide floats
\captionsetup[subfigure]{font={footnotesize,sf}}
\begin{subfigure}{0.23\textwidth}
\includegraphics[width=\linewidth]{example-image-a}
\caption{}
\end{subfigure}\hfill
\begin{subfigure}{0.23\textwidth}
\includegraphics[width=\linewidth]{example-image-a}
\caption{}
\end{subfigure}\hfill
\begin{subfigure}{0.23\textwidth}
\includegraphics[width=\linewidth]{example-image-a}
\caption{}
\end{subfigure}\hfill
\begin{subfigure}{0.23\textwidth}
\includegraphics[width=\linewidth]{example-image-a}
\caption{}
\end{subfigure} %\vspace{3pt}
\caption{\footnotesize
(a) The extracted 13$\times$13 views of
\textit{Fountain-Vincent2}; central view of
(b) \textit{Bikes};
(c) \textit{Fountain-Vincent2};
(d) \textit{Stone-Pillars Outside}.}
\label{fig:the dataset}
\end{figure*}
\end{document}