如何调整双列 BioMed Central LaTex 模板中的图形框大小?

如何调整双列 BioMed Central LaTex 模板中的图形框大小?

我在 BioMed Central LaTex 模板中使用 {twocolumn} 文档类,需要创建不同大小的图形(例如,单列和双列)。在此模板中,图形位于框内。常规图形控件仅调整框内图像的大小,但框大小保持不变。此外,调整大小后的图像与另一列中的文本重叠。问题如下:在此处输入图片描述

下面是我在 Tex 文件中添加图形的方法:

\begin{figure}[t]
    \begin{center}
        \includegraphics[width=1.2\columnwidth]{tree.png}
        \caption{---------}
        \label{fig:1}
    \end{center}
    \vspace{1em}
\end{figure}

答案1

用于\begin{figure*}宽框图形。它们通常会出现在下一页。

A

\documentclass[twocolumn]{bmcart}% 
\usepackage{amsthm,amsmath}

\usepackage[utf8]{inputenc} %unicode support

\usepackage{graphicx} % needed <<<<<<<<<

\usepackage{kantlipsum}% dummy text

\begin{document}    

\begin{frontmatter}

%\begin{fmbox}
\dochead{Research}

\title{A sample article title}

\author[
  addressref={aff1},                   % id's of addresses, e.g. {aff1,aff2}
  corref={aff1},                       % id of corresponding address, if any
% noteref={n1},                        % id's of article notes, if any
  email={[email protected]}   % email address
]{\inits{J.E.}\fnm{Jane E.} \snm{Doe}}
\author[
  addressref={aff1,aff2},
  email={[email protected]}
]{\inits{J.R.S.}\fnm{John R.S.} \snm{Smith}}    

\address[id=aff1]{%                           % unique id
  \orgdiv{Department of Science},             % department, if any
  \orgname{University of Cambridge},          % university, etc
  \city{London},                              % city
  \cny{UK}                                    % country
}
\address[id=aff2]{%
  \orgdiv{Institute of Biology},
  \orgname{National University of Sciences},
  %\street{},
  %\postcode{}
  \city{Kiel},
  \cny{Germany}
}
    
%\end{fmbox}% comment this for two column layout    

\begin{abstractbox}

\begin{abstract} % abstract
\parttitle{First part title} %if any
Text for this section.

\parttitle{Second part title} %if any
Text for this section.
\end{abstract}
    
\begin{keyword}
\kwd{sample}
\kwd{article}
\kwd{author}
\end{keyword}   

\end{abstractbox}   

\end{frontmatter}

%%%%%%%%%%%%%%%%

\section*{Content}
Text and results for this section, as per the individual journal's instructions for authors.

\section*{Section title}

\textbf{>>>FIGURE 1 INSERTED HERE <<<}

\begin{figure*}[h!] % use figure* for wide boxed figures
    \includegraphics{example-image-a}
        \caption{Sample figure title a}
    \label{fig:example-image-a}
\end{figure*}

In this section we examine the growth rate of the mean of $Z_0$, $Z_1$ and $Z_2$. In
addition, we examine a common modeling assumption and note the
importance of considering the tails of the extinction time $T_x$ in
studies of escape dynamics.
We will first consider the expected resistant population at $vT_x$ for
some $v>0$, (and temporarily assume $\alpha=0$)
%
\[
E \bigl[Z_1(vT_x) \bigr]=
\int_0^{v\wedge
1}Z_0(uT_x)
\exp (\lambda_1)\,du .
\]
%
If we assume that sensitive cells follow a deterministic decay
$Z_0(t)=xe^{\lambda_0 t}$ and approximate their extinction time as
$T_x\approx-\frac{1}{\lambda_0}\log x$, then we can heuristically
estimate the expected value as
%
\begin{equation}\label{eqexpmuts}
\begin{aligned}[b]
&      E\bigl[Z_1(vT_x)\bigr]\\
&\quad      = \frac{\mu}{r}\log x
\int_0^{v\wedge1}x^{1-u}x^{({\lambda_1}/{r})(v-u)}\,du .
\end{aligned}
\end{equation}
%
Thus we observe that this expected value is finite for all $v>0$.

\section*{Availability of data and materials}%% if any
1. \kant[1-4]

\section*{Ethics approval and consent to participate}

\textbf{>>>FIGURE 2 INSERTED HERE <<<}

\begin{figure*}[h!] % use figure* for wide boxed  figures
    \includegraphics{example-image-b}
        \caption{Sample figure title b}
    \label{fig:example-image-b}
\end{figure*}

2. \kant[2-6]

\end{document}

该类bmcart设置了自己的图形设置:字体、上下空间、......

\def\figure@settings{%
  \let\textbf\fig@textbf%
  \setattribute{floatcaption}{size}{\footnotesize\sffamily\raggedright}
  \if@figurestar\hsize=\textwidth\fi% <<<<<<<<<<<<<
  \@tempdima\hsize%
  \advance\@tempdima by-\figure@sep%
  \advance\@tempdima by-\figure@sep%
  \hsize\@tempdima%
  \parindent\z@%
  \centering%
  \setlength\abovecaptionskip{6\p@}%
  \setlength\belowcaptionskip{0\p@}%
}

查找\begin{figure*}将图形宽度设置为\textwidth

相关内容