1、不错的Latex参考网站
http://www.ctex.org/documents/latex/graphics/node120.html
http://www.ctex.org/documents/latex/graphics/graphics.html
2、插图
\begin{figure} \includegraphics[width=0.25\textwidth]{./figures/figure.eps} \caption{The Figure} \label{fig:figure} \end{figure}
3、插入子图
\begin{figure} \centering \subfigure[A subfigure.]{\includegraphics[width=0.3\columnwidth]{contour.eps}} \ \subfigure[A subfigure.]{\includegraphics[width=0.3\columnwidth]{sin.eps}} \ \subfigure[A subfigure.]{\includegraphics[width=0.3\columnwidth]{contour.eps}} \\ \subfigure[A subfigure.]{\includegraphics[width=0.3\columnwidth]{contour.eps}} \ \subfigure[A subfigure.]{\includegraphics[width=0.3\columnwidth]{contour.eps}} \ \subfigure[A subfigure.]{\includegraphics[width=0.3\columnwidth]{contour.eps}} \caption{a figure.}\label{fig:1} \end{figure}
注意:twocolumn模式下,单栏宽度为\columnwidth。全栏宽度为\textwidth
4、双栏模式通栏插图
注意区别是否加入 stfloats宏包的区别。
\lipsum \begin{figure*}[!t] \centering \subfigure[A subfigure.]{\includegraphics[width=0.3\textwidth]{contour.eps}} \hfill \subfigure[A subfigure.]{\includegraphics[width=0.3\textwidth]{sin.eps}} \hfill \subfigure[A subfigure.]{\includegraphics[width=0.3\textwidth]{contour.eps}} \\ \subfigure[A subfigure.]{\includegraphics[width=0.3\textwidth]{contour.eps}} \hfill \subfigure[A subfigure.]{\includegraphics[width=0.3\textwidth]{contour.eps}} \hfill \subfigure[A subfigure.]{\includegraphics[width=0.3\textwidth]{contour.eps}} \caption{a figure.}\label{fig:1} \end{figure*} \lipsum \lipsum
注意:代码中最后有两个随机文本段落加入(\lipsum命令用于加入随机文本),通栏图将会出现在第三个页面上。
5、裁切显示图像
\documentclass[10pt,twocolumn,letterpaper]{article} \usepackage{times} \usepackage{epsfig} \usepackage{graphicx} \usepackage{adjustbox} \usepackage{lipsum} \begin{document} \begin{figure} \centering \includegraphics[width=\columnwidth]{sin.eps}% \caption{sin.}\label{fig:sin} \end{figure} \begin{figure} \centering \adjustbox{trim={.05\width} {0.01\height} {0.5\width} {.2\height},clip}% {% \includegraphics[width=1.1\columnwidth]{sin.eps}% } \caption{cut sin.}\label{fig:cutsin} \end{figure} .... \end{document}
6、插入子图,不包含子图的标题
代码
\documentclass[a4paper,12pt]{article} \usepackage{lipsum} \usepackage[caption=false,font=footnotesize]{subfig} \usepackage{graphicx} \begin{document} \lipsum \begin{figure}[!ht] \centering \subfloat[]{% \includegraphics[width=0.48\columnwidth]{1.png}% \label{fig:a} % }% end subfigure \hfil \subfloat[]{% \includegraphics[width=0.48\columnwidth]{2.png}% \label{fig:b} % }% end subfigure \\ \subfloat[]{% \includegraphics[width=0.48\columnwidth]{3.png}% \label{fig:c} % }% end subfigure \hfil \subfloat[]{% \includegraphics[width=0.48\columnwidth]{4.png}% \label{fig:d} % }% end subfigure \caption{% Sub-figures illustration. \protect\subref{fig:a} A. \protect\subref{fig:b} B. \protect\subref{fig:c} C. \protect\subref{fig:d} D.% } \label{fig:illus} \end{figure} \lipsum \end{document}