如何在两列页面中添加九个数字?

如何在两列页面中添加九个数字?

我正在尝试在双栏纸张的页面中间添加 9 个图形,以便图形的标题以双栏样式显示,这样纸张看起来就像这样

在此处输入图片描述

这是我在添加数字之前使用的代码

%%
%% Beginning of file 'sample.tex'
%%
%%  2007 September
%%
%% This is a sample manuscript marked up using the
%% AASTeX v5.x LaTeX 2e macros.
%%  mimicing ASTR journal style
\documentclass{aastex}
\usepackage{spr-astr-addons}
\usepackage{url}\urlstyle{rm}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{subcaption}


\RequirePackage{color}
\def\imagei{\centerline{\color[gray]{.75}\rule{\hsize}{4pc}}}%
\def\imageii{\centerline{\color[gray]{.75}\rule{4pc}{4pc}}}%



\begin{document}

\title{Title}


\begin{abstract}

\begin{description}

\item[PACS numbers] 04.50.Kd, 04.20.-q, 04.25.Nx
\end{description}

\end{abstract}


\keywords{Keywords}

\section{Intro}




\section{Conclusion}


\end{document}

%%
%% End of file `sample.tex'.

有人知道如何添加图形使它们看起来像上面的图像吗?

谢谢

答案1

调整我的答案在 revtex 中可以有两列图形标题吗?

\documentclass{aastex}
%\usepackage{spr-astr-addons} % I haven't it

\usepackage{url}\urlstyle{rm}
\usepackage{graphicx}
\usepackage{color}
\usepackage[caption=false]{subfig}

\usepackage{lipsum}

\captionsetup[subfigure]{position=top}

\makeatletter
\newcommand{\twocolumncaption}{\@dblarg\@twocolumncaption}
\def\@twocolumncaption[#1]#2{%
  \renewcommand{\@makecaption}[2]{%
    \par\vskip\abovecaptionskip\begingroup\small\rmfamily
    \splittopskip=0pt
    \setbox\@tempboxa=\vbox{
      \@arrayparboxrestore \let \\\@normalcr
      \hsize=.5\hsize \advance\hsize-1em
      \let\\\heading@cr
      \noindent ##1\ ##2\par% this line for aastex
    }%
    \vbadness=10000
    \setbox\z@=\vsplit\@tempboxa to .55\ht\@tempboxa
    \setbox\z@=\vtop{\hrule height 0pt \unvbox\z@}
    \setbox\tw@=\vtop{\hrule height 0pt \unvbox\@tempboxa}
    \noindent\box\z@\hfill\box\tw@\par
    \endgroup\vskip \belowcaptionskip
  }%
  \setlength{\abovecaptionskip}{4ex}%
  \caption[#1]{#2}%
}
\makeatother



\begin{document}

\title{Title}
\author{A. Uthor}
\affil{Somewhere}

\begin{abstract}

\lipsum[2]

\begin{description}

\item[PACS numbers] 04.50.Kd, 04.20.-q, 04.25.Nx
\end{description}

\end{abstract}


\keywords{Keywords}

\maketitle

\section{Intro}

\lipsum[1-3]

\begin{figure*}
\centering

\subfloat[]{\includegraphics[width=0.25\textwidth]{example-image}}\ 
\subfloat[]{\includegraphics[width=0.25\textwidth]{example-image}}\ 
\subfloat[]{\includegraphics[width=0.25\textwidth]{example-image}}\ 
\subfloat[]{\includegraphics[width=0.25\textwidth]{example-image}}\ 
\subfloat[]{\includegraphics[width=0.25\textwidth]{example-image}}\ 
\subfloat[]{\includegraphics[width=0.25\textwidth]{example-image}}\ 
\subfloat[]{\includegraphics[width=0.25\textwidth]{example-image}}\ 
\subfloat[]{\includegraphics[width=0.25\textwidth]{example-image}}\ 
\subfloat[]{\includegraphics[width=0.25\textwidth]{example-image}}

\twocolumncaption{%
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut,
placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris. Nam arcu libero, 
nonummy eget, consectetuer id, vulputate  a, magna. Donec vehicula augue eu neque. 
Pellentesque habitant morbi  tristique senectus et netus et malesuada fames ac turpis 
egestas. Mauris  ut leo. Cras viverra metus rhoncus sem. Nulla et lectus vestibulum 
urna  fringilla.}

\end{figure*}

\lipsum

\section{Conclusion}

\lipsum

\end{document}

在此处输入图片描述

\makeatletter如果 Springer 样式已经制作了两列标题,请删除到(包含在内)的代码\makeatother并直接使用\caption

答案2

使用 caption 包可以声明一种新格式。如果没有 caption 包,您可以简单地将标题放入多列中。

\documentclass[twocolumn]{article}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{multicol}
\usepackage{blindtext}% MWE only

\DeclareCaptionFormat{twocolumn}{\begin{multicols}{2}#1#2#3\end{multicols}}

\begin{document}
\begin{figure*}
\centering
\begin{subfigure}{0.3\textwidth}
\caption{}
\includegraphics[width=\textwidth]{example-image}
\end{subfigure}\hfil
\begin{subfigure}{0.3\textwidth}
\caption{}
\includegraphics[width=\textwidth]{example-image}
\end{subfigure}\hfil
\begin{subfigure}{0.3\textwidth}
\caption{}
\includegraphics[width=\textwidth]{example-image}
\end{subfigure}

\begin{subfigure}{0.3\textwidth}
\caption{}
\includegraphics[width=\textwidth]{example-image}
\end{subfigure}\hfil
\begin{subfigure}{0.3\textwidth}
\caption{}
\includegraphics[width=\textwidth]{example-image}
\end{subfigure}\hfil
\begin{subfigure}{0.3\textwidth}
\caption{}
\includegraphics[width=\textwidth]{example-image}
\end{subfigure}

\begin{subfigure}{0.3\textwidth}
\caption{}
\includegraphics[width=\textwidth]{example-image}
\end{subfigure}\hfil
\begin{subfigure}{0.3\textwidth}
\caption{}
\includegraphics[width=\textwidth]{example-image}
\end{subfigure}\hfil
\begin{subfigure}{0.3\textwidth}
\caption{}
\includegraphics[width=\textwidth]{example-image}
\end{subfigure}

\captionsetup{singlelinecheck=false,format=twocolumn}%
\caption[short caption]{\blindtext}
\end{figure*}
\end{document}

演示

答案3

利用\documentclass{article},可以简单获得以下内容:

在此处输入图片描述

\documentclass[12pt,twocolumn]{article}
\usepackage[a4paper]{geometry}
\usepackage[font=small, labelfont=bf]{caption}
\usepackage{subcaption}
\usepackage{graphicx}

\begin{document}
\begin{figure*}[htb]
\begin{subfigure}{.3\textwidth}
  \caption{}
\includegraphics[width=\linewidth]{example-image-a}% width
    \label{fig:myfig-a}
\end{subfigure}
\hfil
\begin{subfigure}{.3\textwidth}
  \caption{}
\includegraphics[width=\linewidth]{example-image-b}% width
    \label{fig:myfig-b}
\end{subfigure}
\hfil
\begin{subfigure}{.3\textwidth}
  \caption{}
\includegraphics[width=\linewidth]{example-image-c}% width
    \label{fig:myfig-c}
\end{subfigure}

\begin{subfigure}{.3\textwidth}
  \caption{}
\includegraphics[width=\linewidth]{example-image-a}% width
    \label{fig:myfig-d}
\end{subfigure}
\hfil
\begin{subfigure}{.3\textwidth}
  \caption{}
\includegraphics[width=\linewidth]{example-image-b}% width
    \label{fig:myfig-e}
\end{subfigure}
\hfil
\begin{subfigure}{.3\textwidth}
  \caption{}
\includegraphics[width=\linewidth]{example-image-c}% width
    \label{fig:myfig-f}
\end{subfigure}

\begin{subfigure}{.3\textwidth}
  \caption{}
\includegraphics[width=\linewidth]{example-image-a}% width
    \label{fig:myfig-g}
\end{subfigure}
\hfil
\begin{subfigure}{.3\textwidth}
  \caption{}
\includegraphics[width=\linewidth]{example-image-b}% width
    \label{fig:myfig-h}
\end{subfigure}
\hfil
\begin{subfigure}{.3\textwidth}
  \caption{}
\includegraphics[width=\linewidth]{example-image-c}% width
    \label{fig:myfig-i}
\end{subfigure}

\caption{My figures}
    \end{figure*}
\end{document}

不幸的是,我没有您的文档类,因此如果它与使用的包存在一些问题。

相关内容