如何在乳胶中允许图像顶部和底部的最小空白空间?

如何在乳胶中允许图像顶部和底部的最小空白空间?

在此处输入图片描述我想在一篇两列文章中插入一个图,其中文章类别是 elsarticle.cls。

我使用了以下代码。但问题是,图形位于页面中,并且图像文件的顶部和底部存在空白。我想在图像周围保留最小的空白。请帮助我。

\documentclass[final,3p,times,twocolumn]{elsarticle}
%% The amssymb package provides various useful mathematical symbols
\usepackage{blindtext, graphicx, amsmath, algorithm, algpseudocode, pifont, 
algcompatible, comment, layout, amsthm, amssymb}
\usepackage{enumitem}   
\usepackage{eso-pic}
\usepackage{booktabs}
\usepackage{float}
\renewcommand{\qedsymbol}{$\blacksquare$}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{hyperref} 
\hypersetup{ colorlinks=true, linkcolor=black, filecolor=black, urlcolor=cyan, }
\usepackage{caption}
\captionsetup{justification=raggedright, singlelinecheck = false}
\captionsetup[table]{labelformat=simple, labelsep=newline}
\captionsetup[figure]{labelformat=simple, labelsep=period}
\newtheorem{theorem}{Theorem}
\newtheorem{lemma}{Lemma}
\newtheorem{definition}{Definition}
\journal{ICT Express}
\begin{document}
\begin{frontmatter}
\title{Submission Guideline for ICT Express}
\author{Author’s Full Name 1\corref{cor1}}
\ead{[email protected]}
\author{Author’s Full Name 2}
\ead{[email protected]}
\author{Author’s Full Name 3}
\ead{[email protected]}
\address{Department, Organization, City, Country\\Department, Organization, 
City, Country\\Department, Organization, City, Country}
\cortext[cor1]{Corresponding author}
\begin{abstract}
Texts...
\end{abstract}
\begin{keyword}
abc \sep def \sep xyz
\end{keyword}
\end{frontmatter}
\section{Introduction}\label{sec1}
Texts...
\begin{figure*}
\centering
\includegraphics[width=2\columnwidth]{image.png}
\caption{Collected image from wikipedia}
\label{fig:ex}
\end{figure*}
\end{document}

答案1

我建议用multicol包替换类的双列选项。

您必须multicols 在正确的位置开始和完成环境以允许宽大的图形适合。

我添加了虚拟文本来模拟更真实的场景。

\documentclass[final,3p,times]{elsarticle}

% The amssymb package provides various useful mathematical symbols
\usepackage{blindtext, graphicx, amsmath, algorithm, algpseudocode, pifont, 
algcompatible, comment, layout, amsthm, amssymb}

\usepackage{multicol}

\usepackage{enumitem}   
\usepackage{eso-pic}
\usepackage{booktabs}
\usepackage{float}
\renewcommand{\qedsymbol}{$\blacksquare$}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{hyperref} 
\hypersetup{ colorlinks=true, linkcolor=black, filecolor=black, urlcolor=cyan, }
\usepackage{caption}
\captionsetup{justification=raggedright, singlelinecheck = false}
\captionsetup[table]{labelformat=simple, labelsep=newline}
\captionsetup[figure]{labelformat=simple, labelsep=period}
\newtheorem{theorem}{Theorem}
\newtheorem{lemma}{Lemma}
\newtheorem{definition}{Definition}
\journal{ICT Express}

\begin{document}
\begin{frontmatter}
    \title{Submission Guideline for ICT Express}
    \author{Author’s Full Name 1\corref{cor1}}
    \ead{[email protected]}
    \author{Author’s Full Name 2}
    \ead{[email protected]}
    \author{Author’s Full Name 3}
    \ead{[email protected]}
    \address{Department, Organization, City, Country\\Department, Organization, 
    City, Country\\Department, Organization, City, Country}
    \cortext[cor1]{Corresponding author}
    \begin{abstract}
        Texts...
    \end{abstract}
    \begin{keyword}
        abc \sep def \sep xyz
    \end{keyword}
\end{frontmatter}

\begin{multicols}{2}
    \section{Introduction}\label{sec1}  
    \blindtext[4]
\end{multicols}

\begin{figure*}[h]
    \centering
    \includegraphics[width=\textwidth]{example-image-A}
    \caption{Collected image from wikipedia}
    \label{fig:ex}
\end{figure*}

\begin{multicols}{2}
    \section{Other section}
    \blindtext[2]
\end{multicols}

\end{document}

输出

最近有关于同一主题、不同课程的问答。

整个页面上有两列文档图形

相关内容