加感嘆號來忽略“美學”標准。
\begin{figure}[!htb]
\usepackage{float}
\begin{figure}[H]
插到你代碼相應的位置。
1,插入並列的子圖
\usepackage{subfigure}
\begin{figure}[H]
\centering
\subfigure[SubfigureCaption]{
\label{Fig.sub.1}
\includegraphics[width=0.4\textwidth]{figurename.eps}}
\subfigure[SubfigureCaption]{
\label{Fig.sub.2}
\includegraphics[width=0.4\textwidth]{figurename.eps}}
\caption{MainfigureCaption}
\label{Fig.lable}
\end{figure}
2,控制圖片位置
如果不喜歡讓Latex自動安排圖片位置,可以使用float包,然后
用\begin{figure}[H]。
\usepackage{float}
1,插入jpg圖片
在命令行環境下,使用命令:
ebb figure.jpg
生成bounding box文件figure.bb。
使用如下命令:
\includegraphics[width=0.8\textwidth]{figure.jpg}
可以使用Pdf Texify直接編譯成pdf文件。
2,插入bmp圖片
還沒有找到直接插入bmp圖片的方法。現在的方法是,使用
gimp將bmp轉換成jpg,然后按上述方法插入。轉換時不要
使用windows自帶的painter,圖片質量損失太多。用gimp或
fastone image viewer,將jpg質量選為最高,轉換之后得到的
圖片質量較好。
3,同時插入jpg和eps圖片
插入的命令不變。編譯時使用Latex, dvi2pdf,兩種格式的
圖片都可以顯示。
插入eps圖片
使用\includegraphics[選項]{文件} 命令可以插入eps圖片。下面是一個最簡單的例子:
\documentclass{article}
\usepackage{graphicx} %使用graphicx包
\begin{document}
\includegraphics{file.eps} %插入圖片,按圖片原尺寸插入
\end{document}
注意:
(1)eps文件和tex文件放在同一個文件夾,只用文件名就可以調用,不用寫路徑。
(2)編譯時不能使用pdflatex,會出錯。即使不出錯,也看不到圖。應使用latex編譯生成dvi,然后dvi2ps,ps2pdf就可以看到圖了。
使用[選項]可以指定圖片大小:
\includegraphics[width=3in]{file.eps}
設定圖片寬度為3 inches,圖片高度會自動縮放。
\includegraphics[width=\testwidth]{file.eps}
設定圖片寬度為文本寬度。
\includegraphics[width=0.8\textwidth]{file.eps}
設定圖片寬度為文本寬度的0.8倍
\includegraphics[width=\testwidth-2.0in]{file.eps}
設定圖片寬度比文本寬度少2 inches。
使用[選項]指定圖片旋轉角度:
\includegraphics[angle=270]{file.eps}
將圖片旋轉270度。
兩個選項同時使用,中間用逗號隔開:
\includegraphics[width=\testwidth, angle=270]{file.eps}
轉自http://hi.baidu.com/bend90/blog/item/45236a100dcf6006203f2e4c.html