科学论文中的图表放置

科学论文中的图表放置

我目前正在为一个会议撰写论文。以下是我想在图片放置方面做的事情:

在此处输入图片描述

我对图 2 很难将其放置在第二页的底部。

以下是您可以在 Overleaf 模板中找到的简单代码:

主文本

\documentclass{article}
\usepackage{spconf,amsmath,graphicx}
\usepackage{lipsum}

% Example definitions.
% --------------------
\def\x{{\mathbf x}}
\def\L{{\cal L}}

% Title.
% ------
\title{Bla Bla Bla}
%
% Single address.
% ---------------
\name{Author Name\thanks{Author's Email}}
\address{Author Affiliation}

\begin{document}

\maketitle
\section{Introduction and Background}

\lipsum[1]

\section{Contributions}

\lipsum[1]
\lipsum[1]
\lipsum[1]
\lipsum[1]

\begin{figure*}[!t]
   \centering
    \includegraphics[width=\linewidth]{t.png}
    \caption{Test 1}
\end{figure*}

\lipsum[1]
\lipsum[1]
\lipsum[1]

\lipsum[1]
\begin{figure*}[!hb]
   \centering
    \includegraphics[width=\linewidth]{t.png}
    \caption{Test 2}
\end{figure*}

\lipsum[1]
\lipsum[1]
\lipsum[1]
\lipsum[1]
\lipsum[1]
\lipsum[1]
\lipsum[1]
\lipsum[1]

{\bf References:}
List and number all bibliographical references at the end of the
paper. The references can be numbered in alphabetic order or in
order of appearance in the document. When referring to them in
the text, type the corresponding reference number in square
brackets as shown at the end of this sentence \cite{C2}. An
additional page is allowed, but must contain only references to the prior literature and figures.

% References should be produced using the bibtex program from suitable
% BiBTeX files (here: strings, refs, manuals). The IEEEbib.bst bibliography
% style file from IEEE produces unsorted bibliography list.
% -------------------------------------------------------------------------
\bibliographystyle{IEEEbib}
\bibliography{refs}

\end{document}

spconf.sty

\renewcommand{\sfdefault}{phv}
\renewcommand{\rmdefault}{ptm}
\renewcommand{\ttdefault}{pcr}

%\oddsidemargin  -0.31in
%\evensidemargin -0.31in
\oddsidemargin  -6.2truemm
\evensidemargin -6.2truemm

\topmargin 0truept
\headheight 0truept
\headsep 0truept
%\footheight 0truept
%\footskip 0truept
\textheight 229truemm
\textwidth 178truemm

\twocolumn
\columnsep 6truemm
\pagestyle{empty}

\emergencystretch=11pt

\def\ninept{\def\baselinestretch{.95}\let\normalsize\small\normalsize}

\def\maketitle{\par
 \begingroup
 \def\thefootnote{}
 \def\@makefnmark{\hbox
 {$^{\@thefnmark}$\hss}}
 \if@twocolumn
 \twocolumn[\@maketitle]
 \else \newpage
 \global\@topnum\z@ \@maketitle \fi\@thanks
 \endgroup
 \setcounter{footnote}{0}
 \let\maketitle\relax
 \let\@maketitle\relax
 \gdef\thefootnote{\arabic{footnote}}\gdef\@@savethanks{}%
 \gdef\@thanks{}\gdef\@author{}\gdef\@title{}\let\thanks\relax}

\def\@maketitle{\newpage
 \null
 \vskip 2em \begin{center}
 {\large \bf \@title \par} \vskip 1.5em {\large \lineskip .5em
\begin{tabular}[t]{c}\@name \\ \@address
 \end{tabular}\par} \end{center}
 \par
 \vskip 1.5em}

\def\title#1{\gdef\@title{\uppercase{#1}}}
\def\name#1{\gdef\@name{{\em #1}\\}}
\def\address#1{\gdef\@address{#1}}
\gdef\@title{\uppercase{title of paper}}
\gdef\@name{{\em Name of author}\\}
\gdef\@address{Address - Line 1 \\
               Address - Line 2 \\
               Address - Line 3}

\let\@@savethanks\thanks
\def\thanks#1{\gdef\thefootnote{}\@@savethanks{#1}}
\def\sthanks#1{\gdef\thefootnote{\fnsymbol{footnote}}\@@savethanks{#1}}

\def\twoauthors#1#2#3#4{\gdef\@address{}
   \gdef\@name{\begin{tabular}{@{}c@{}}
        {\em #1} \\ \\
        #2\relax
   \end{tabular}\hskip 1in\begin{tabular}{@{}c@{}}
        {\em #3} \\ \\
        #4\relax
\end{tabular}}}

\def\@sect#1#2#3#4#5#6[#7]#8{
   \refstepcounter{#1}\edef\@svsec{\csname the#1\endcsname.\hskip 0.6em}
       \begingroup \ifnum #2=1\bf\centering
          {\interlinepenalty \@M
             \@svsec\uppercase{#8}\par}\else\ifnum #2=2\bf
          \noindent{\interlinepenalty \@M \@svsec #8\par}\else\it
          \noindent{\interlinepenalty \@M
             \@svsec #8\par}\fi\fi\endgroup
       \csname #1mark\endcsname{#7}\addcontentsline
         {toc}{#1}{\protect\numberline{\csname the#1\endcsname} #7}
     \@tempskipa #5\relax
     \@xsect{\@tempskipa}}

\def\abstract{\begin{center}
{\bf ABSTRACT\vspace{-.5em}\vspace{0pt}}
\end{center}}
\def\endabstract{\par}

% Keyword section, added by Lance Cotton, adapted 
% from IEEEtran, corrected by Ulf-Dietrich Braumann
\def\keywords{\vspace{.5em}
{\bfseries\textit{Index Terms}---\,\relax%
}}
\def\endkeywords{\par} 

\def\copyrightnotice#1{\gdef\@copyrightnotice{#1}}
\let\@copyrightnotice\relax
\def\toappear#1{\gdef\@toappear{#1}}\let\@toappear\relax

\newif\if@preprint\@preprintfalse
\@namedef{ds@preprint}{\global\@preprinttrue}
\@options
\def\ps@preprint{\def\mypage{}\let\@mkboth\@gobbletwo\def\@oddhead{}
  \def\@oddfoot{\rlap{\@toappear}\hfil\mypage\hfil
    \llap{\@copyrightnotice}
    \gdef\mypage{\thepage}\gdef\@toappear{}\gdef\@copyrightnotice{}}}

\if@preprint\ps@preprint
\else\ps@empty\flushbottom\fi

\def\thebibliography#1{\section{References}\list
 {[\arabic{enumi}]}{\settowidth\labelwidth{[#1]}\leftmargin\labelwidth
 \advance\leftmargin\labelsep
 \usecounter{enumi}}
 \def\newblock{\hskip .11em plus .33em minus .07em}
 \sloppy\clubpenalty4000\widowpenalty4000
 \sfcode`\.=1000\relax}
\let\endthebibliography=\endlist

\long\def\@makecaption#1#2{
 \vskip 10pt
 \setbox\@tempboxa\hbox{#1. #2}
 \ifdim \wd\@tempboxa >\hsize #1. #2\par \else \hbox
to\hsize{\hfil\box\@tempboxa\hfil}
 \fi}

\def\fnum@figure{{\bf Fig.\ \thefigure}}
\def\fnum@table{{\bf Table \thetable}}

\flushbottom

有人有想法吗?

谢谢!

答案1

对于\twocolumn文档,LaTeX 根本不允许将一个双倍宽度的浮动元素放在页面顶部,将另一个放在同一页面的底部。默认是将所有双倍宽度的浮动元素放在页面顶部。spconf(“Springer Conference”的缩写,对吧?)软件包似乎在这件事上遵循了 LaTeX 的默认设置。

假设您被告知使用该spconf软件包,我会先与会议组织者仔细核对,并请求他们允许偏离默认设置。

无论如何,就我个人而言,我不会说 LaTeX 在双列文档中放置浮动元素的默认布局有什么令人反感。

在此处输入图片描述

请注意,下面的代码只包含一个figure*环境。

\documentclass[demo]{article} % remove 'demo' option in real doc.
\usepackage{spconf,graphicx,lipsum}

\begin{document}

\lipsum[1-6] % filler text

\begin{figure*} % start a double-wide float

\includegraphics[width=\textwidth]{pic1}
\caption{First}

\bigskip\bigskip

\includegraphics[width=\textwidth]{pic2}
\caption{Second}

\end{figure*}

\lipsum[7-15] % more filler text

\end{document} 

相关内容