Latex插图位置控制

转自:http://blog.sina.com.cn/s/blog_5e16f1770102dvai.html

排版:https://latexref.xyz/Floats.html#Floats

QQ群:91940767/145316219/141877998/80300084/194770436
淘宝店:http://latexstudio.taobao.com
技巧续篇:http://latexstudio.net/
常见数学公式问题集下载

平时投稿或者写文章,尤其是双栏模式下总是想要把图片放在我们想要她在的位置,非常考验我们的代码水平,特别是下面这种情况:双栏模式下插入单栏图,一般情况下,期刊给出的是使用\begin{figure*}[t] .... \end{figure*} 进而,图片会放到下一页置顶位置,很多用户想把图片放到当前页底部该怎么办呢?

【解决方案】
演示代码如下:
   \documentclass[a4paper,10pt,twocolumn]{article}
   \usepackage{graphicx,dblfloatfix,caption,afterpage}
   \usepackage[english]{babel}
   \usepackage{blindtext}
   \begin{document}
   \tableofcontents
   \section{Zero}
   \blindtext[1]

   \blindtext[1]

   %\afterpage{\newpage} % bottom on third page
   %\afterpage{\clearpage} % cuts a column, bottom on third page

   \blindtext[1]

   \blindtext[1]

   \begin{figure}[!h]
     \centering
     \includegraphics{test.jpg}
     \caption{test picture 1}
   \label{fig:1}
   \end{figure}

   \blindtext[1]

   \begin{figure}[!h]
     \centering
     \includegraphics{test.jpg}
     \caption{test picture 2}
   \label{fig:2}
   \end{figure}

   %\afterpage{\newpage} % bottom on third page
   %\afterpage{\clearpage} % bottom on third page

    % save counter
   \newcounter{savefig}
   \setcounter{savefig}{\value{figure}}
    % step preemptively
   \stepcounter{figure}

    % figure* MUST be declared before first \newpage!
    % so in this case, it is declared (still) within pg1.
   \begin{figure*}[!b]
     \centering
     \includegraphics{test.jpg}
     \caption{test picture dbl}
   \label{fig:dbl}
   \end{figure*}

    % reset counter
   \setcounter{figure}{\value{savefig}}

   \afterpage{\newpage} % first newpage: goes from pg1:col2 to pg2:col1

   \blindtext[1]

   %\afterpage{\clearpage % alone
    %}

   %\newpage~\newpage % clears everything prematurely, but manages to put minipage and bottom on same page
   %\afterpage{\clearpage} %

   \section{One}
    A bit of bla bla bla here...

    A bit of bla bla bla...

   \begin{figure}[h]
     \centering
     \includegraphics{test.jpg}
     \caption{test picture 3}
   \label{fig:3}
   \end{figure}

   %\noindent\begin{minipage}{\columnwidth}
   %\captionsetup{type=figure}
    \centering
    \includegraphics{test.jpg}
    \caption{test picture 3}
   %\label{fig:3}
   %\end{minipage}


   \blindtext[1]

   \afterpage{\newpage}  % second newpage: goes from pg2:col1 to pg2:col2

   \blindtext[1]

   \section{Two}
   \blindtext[1]

   \afterpage{\newpage} % third newpage: goes from pg2:col2 to pg3:col1; AND
    % seemingly this 'flushes' the bottom float, which will now appear on pg2!

    % step post-emptively
    % (as here the bottom, Fig4 should be inserted - so we're ready for Fig5 next)
   \stepcounter{figure}

   \blindtext[1]

   \blindtext[1]

   \begin{figure}[h]
     \centering
     \includegraphics{test.jpg}
     \caption{test picture 5}
   \label{fig:5}
   \end{figure}

   \blindtext[1]

   \end{document}

效果哦:
LaTeX技巧567:latex <wbr>如何在页面下方插入图形

 

2、更新20200105

关于cas-dc模板标题不居中问题的解决。

%\begin{figure*}
 {figure*}
% \begin{figure*}[pos=b,width=\textwidth]% 需要这一句解决问题
\begin{figure*}[pos=htb]
    \centering
    \includegraphics[scale=0.62]{figs/OverviewFig.pdf}
    \caption{Simulation results on a T1-weighted simulated brain MR image (9\% noise, 40\% IIH). Left to right: Original image, Bias field (IIH), CSF, GM, and WM regions, IIH-corrected
image and final segmented image.}
    \label{Fig:OverviewFig}
\end{figure*}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值