插入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}
使用\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}
评论