在双栏文档中正确放置侧边图

在双栏文档中正确放置侧边图

我在对齐图片和文本时遇到了问题,我尝试创建一个最小工作示例来说明这个问题。抱歉,文本太多了,但我需要添加大量文本才能显示我的问题。

我在用:

\usepackage{rotating}

\begin{sidewaysfigure*}[ht]

将我的图形旋转 90 度。当我这样做时,我的图形不在页面中央,它们试图适应两列格式,因此最终被推向页面的左侧。有人告诉我这是因为 apj 的默认格式是两列。

为了修复这个问题,我只需要:

\onecolumngrid

在数字之前,并且:

\twocolumngrid

之后。这解决了我的数字问题,但也弄乱了我的文本。如果你将我的 tex 转换为 pdf,在第 2 页上你会看到类似以下内容:

在此处输入图片描述

您是否看到左侧第一列在页面中间停止,然后继续在右侧列中移动,而不是继续到页面底部?换句话说,顶部两个段落是一对,底部两个段落也是一对。

这显然是我打开和关闭 \onecolumngrid 的结果。但是我怎样才能让我的图表正确绘制(在一列页面的中央)并且不让文本混乱呢?

谢谢你!

\documentclass{emulateapj}
\newcommand{\vdag}{(v)^\dagger}
\newcommand\aastex{AAS\TeX}
\newcommand\latex{La\TeX}
\usepackage{amsmath,mathtools,etoolbox}
%\usepackage{longtable}                                                                                                                                                                                                                                                                                 
%\usepackage{float}                                                                                                                                                                                                                                                                                     
\usepackage{capt-of}
\usepackage{tabularx,colortbl}
\usepackage{mathtools}
\usepackage{array}
\usepackage{makecell}
\usepackage{stackengine}
\setstackEOL{\cr}
\usepackage[table]{xcolor}
%\usepackage{caption}                                                                                                                                                                                                                                                                                   
%\usepackage[showframe]{geometry}                                                                                                                                                                                                                                                                       
\usepackage{rotating}

\begin{document}

\title{MINIMAL WORKING EXAMPLE}

\author{
  A.~N.~Other\altaffilmark{1},
  A.~N.~Other\altaffilmark{1},
  A.~N.~Other\altaffilmark{1},
  A.~N.~Other\altaffilmark{1},
  A.~N.~Other\altaffilmark{1}}

\affil{$^{1}$Department of Blah, Blah University}

\begin{abstract}
abstract abstract abstract abstract abstract abstract abstract abstract abstract abstract abstract abstract abstract abstract abstract abstract abstract abstract abstract abstract abstract abstract abstract
\end{abstract}

\section{Introduction}
\label{intro}
One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve.

One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve.

One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve.

One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve.

One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve.

\onecolumngrid
\begin{center}
\begin{sidewaysfigure*}[ht]
  \centering
  \begin{tabular}{@{}cc@{}}
    \includegraphics[width=120mm]{fig2a.png} &
    \includegraphics[width=120mm]{fig2b.png}
  \end{tabular}
    \captionof{figure}{Figure caption figure caption figure caption figure caption figure caption figure caption figure caption figure caption figure caption figure caption figure caption figure caption figure caption figure caption figure caption figure caption figure caption figure caption figure caption figure caption.}
\end{sidewaysfigure*}
\end{center}
\begin{center}
\begin{sidewaysfigure*}[ht]
  \centering
  \begin{tabular}{@{}cc@{}}
    \includegraphics[width=120mm]{fig3a.png} &
    \includegraphics[width=120mm]{fig3b.png}
  \end{tabular}
  \captionof{figure}{Figure caption figure caption figure caption figure caption figure caption figure caption figure caption figure caption figure caption figure caption figure caption figure caption figure caption figure caption figure caption figure caption figure caption figure caption figure caption figure caption.}
\end{sidewaysfigure*}
\end{center}
\twocolumngird

\onecolumngrid
\begin{center}
\begin{sidewaysfigure*}[ht]
  \begin{tabular}{@{}cc@{}}
    \includegraphics[width=120mm]{fig4a.png} &
    \includegraphics[width=120mm]{fig4b.png}
  \end{tabular}
      \captionof{figure}{Figure caption figure caption figure caption figure caption figure caption figure caption figure caption figure caption figure caption figure caption figure caption figure caption figure caption figure caption figure caption figure caption figure caption figure caption figure caption figure caption.}
\end{sidewaysfigure*}
\end{center}
\begin{center}
\begin{sidewaysfigure*}[ht]
  \begin{tabular}{@{}cc@{}}
    \includegraphics[width=120mm]{fig5a.png} &
    \includegraphics[width=120mm]{fig5b.png}
  \end{tabular}
  \captionof{figure}{Figure caption figure caption figure caption figure caption figure caption figure caption figure caption figure caption figure caption figure caption figure caption figure caption figure caption figure caption figure caption figure caption figure caption figure caption figure caption figure caption.}
\end{sidewaysfigure*}
\end{center}
\twocolumngrid

\end{document}

答案1

Figure* 仍然有效。可以sidewaysfigure使用minipage\rotatebox(graphicx 包) 进行模拟。

\documentclass{emulateapj}
\newcommand{\vdag}{(v)^\dagger}
\newcommand\aastex{AAS\TeX}
\newcommand\latex{La\TeX}
\usepackage{amsmath,mathtools,etoolbox}
%\usepackage{longtable}                                                                                                                                                                                                                                                                                 
%\usepackage{float}                                                                                                                                                                                                                                                                                     
\usepackage{capt-of}
\usepackage{tabularx,colortbl}
\usepackage{mathtools}
\usepackage{array}
\usepackage{makecell}
\usepackage{stackengine}
\setstackEOL{\cr}
\usepackage[table]{xcolor}
%\usepackage{caption} 

%\usepackage{showframe}
\usepackage{graphicx}

\begin{document}

\title{MINIMAL WORKING EXAMPLE}

\author{
  A.~N.~Other\altaffilmark{1},
  A.~N.~Other\altaffilmark{1},
  A.~N.~Other\altaffilmark{1},
  A.~N.~Other\altaffilmark{1},
  A.~N.~Other\altaffilmark{1}}

\affil{$^{1}$Department of Blah, Blah University}

\begin{abstract}
abstract abstract abstract abstract abstract abstract abstract abstract abstract abstract abstract abstract abstract abstract abstract abstract abstract abstract abstract abstract abstract abstract abstract
\end{abstract}

\section{Introduction}
\label{intro}
One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve.

One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve.

\begin{figure*}[p]
  \sbox0{\begin{tabular}{@{}cc@{}}
    \includegraphics[width=110mm]{example-image-a} &
    \includegraphics[width=110mm]{example-image-b}
  \end{tabular}}% measure width
  \rotatebox{90}{\begin{minipage}[c][\textwidth][c]{\wd0}
    \usebox0
    \captionof{figure}{Figure caption figure caption figure caption figure caption figure caption figure caption figure caption figure caption figure caption figure caption figure caption figure caption figure caption figure caption figure caption figure caption figure caption figure caption figure caption figure caption.}
  \end{minipage}}
\end{figure*}

One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve.

One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve.

One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve One two three four five six seven eight nine ten eleven twelve.

\end{document}

相关内容