LaTeX puts single-column or double-column pictures in double-column articles [with pictures and codes]

LaTeX puts single-column or double-column pictures in double-column articles [with pictures and codes]

double column article

Add \begin{multicols}{2}...\end{multicols} where two columns are required.
Generally we may want the summary to be a single column.
The rest is set up as a double column, as follows:

\begin{
    
    multicols}{
    
    2}       % 分两栏 若花括号中为3则是分三列
        \input{
    
    body.tex}
\end{
    
    multicols}

Double-column articles with single-column pictures

Sometimes the pictures are too large, and it is difficult to display some pictures completely and well in two columns. We may hope that the pictures are displayed in a single column.
The solution is also very simple, change the original:

\begin{
    
    figure}
...
\end{
    
    figure}

Change to:

\begin{
    
    figure*}
...
\end{
    
    figure*}

That is, add the * sign.

Examples are as follows:

\begin{
    
    figure*}[htbp]
    \centering
    \includegraphics[width=\linewidth]{
    
    figures/prefixt5.png}
    \caption{
    
    T5 prefix Tuning}
    \label{
    
    fig:T5p}
\end{
    
    figure*} 

insert image description here
in:

h:here,此刻位置
t:top,置顶
b:bottom,置底
p:浮动页,将图形放置在允许有浮动对象的页面上

The form is similar to ❣️❣️❣️, also add *.

Double-column articles with single-column pictures

Pictures cannot be placed in the multicols environment, that is, ordinary \begin{figure}…\end{figure} will not be displayed. ❣️❣️❣️To use a single-column graph or table in a multicols environment, you can use the following solution.

Solution 1: Use the [H] position option provided by the float macro package. For example

\begin{
    
    figure}[H]
    \centering
    \includegraphics[width=\linewidth]{
    
    figures/prefixt5.png}
    \caption{
    
    T5 prefix Tuning}
    \label{
    
    fig:T5p}
\end{
    
    figure} 

As shown in the figure:
insert image description here
it becomes a single column.

But it should be noted that the object generated in this way cannot be "floating", that is to say, the position is fixed. Therefore, sometimes you have to carefully adjust its position so that the bottom of the column is not jagged.

Other solution reference: LaTeX——Insert pictures in double-column papers

Guess you like

Origin blog.csdn.net/qq_45934285/article/details/131315832