1. 插入單欄圖片:
插圖首先得導(dǎo)入包\usepackage{graphicx}
\begin{figure}[htbp]
\centerline{\includegraphics{1.png}} %添加圖片路徑
\caption{The structure of proposed method.} %圖片描述
\label{fig} %圖片索引
\end{figure}
htbp是設(shè)置圖片強(qiáng)制位置的,讓圖片位于頁面頂部或底部,具體看這篇博客。
文中如果要引用這張圖片,就用\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.為圖片設(shè)置固定大小
\begin{figure}[htbp]
\centerline{\includegraphics[width=0.75,height=2.5]{1.png}}
\caption{The structure of proposed method.}
\label{fig1}
\end{figure}
5.上下插入多個子圖
插入多個子圖首先得導(dǎo)入子圖包\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}
調(diào)節(jié)\begin{minipage}[t]{0.7\linewidth}中的數(shù)字來調(diào)節(jié)圖片大小,不是很好調(diào)節(jié),需要自己多次嘗試。
參考:
Latex強(qiáng)制圖片位置
Latex圖片旋轉(zhuǎn) 縮放
latex圖片跨雙欄
latex中插圖心得