Latex插入图像常见操作

1. 插入单栏图片
插图首先得导入包\usepackage{graphicx}

\begin{figure}[htbp]
\centerline{\includegraphics{1.png}} %添加图片路径
\caption{The structure of proposed method.} %图片描述
\label{fig} %图片索引
\end{figure}

htbp是设置图片强制位置的,让图片位于页面顶部或底部,具体看这篇博客。
文中如果要引用这张图片,就用\ref{figure}

2. 插入双栏图片

\begin{figure*}[htbp]
\centerline{\includegraphics{1.png}}
\caption{The structure of proposed method.}
\label{fig}
\end{figure*}

是的,加一个星号就行了,就这么简单哈哈哈哈哈

3. 缩放图片

\begin{figure}[htbp]
\centerline{\includegraphics[scale=0.5]{1.png}}
\caption{The structure of proposed method.}
\label{fig1}
\end{figure}

4.为图片设置固定大小

\begin{figure}[htbp]
\centerline{\includegraphics[width=0.75,height=2.5]{1.png}}
\caption{The structure of proposed method.}
\label{fig1}
\end{figure}

5.上下插入多个子图
插入多个子图首先得导入子图包\usepackage{subfigure}

\begin{figure}[htbp]
    \centering
    \subfigure[]{
    \begin{minipage}[t]{0.7\linewidth}
    \includegraphics[width=\linewidth]{1.jpg}
    \end{minipage}
    }
    \\
    \centering
    \subfigure[]{
    \begin{minipage}[t]{0.7\linewidth}
    \includegraphics[width=\linewidth]{2.jpg}
    \end{minipage}
    }
\centering
\caption{(a) CWRU experimental platform; (b) XJTU-SY experimental platform}
\label{fig2}
\end{figure}

调节\begin{minipage}[t]{0.7\linewidth}中的数字来调节图片大小,不是很好调节,需要自己多次尝试。

参考:
Latex强制图片位置
Latex图片旋转 缩放
latex图片跨双栏
latex中插图心得

你可能感兴趣的:(Latex插入图像常见操作)