(六)Latex中的插图
\documentclass{article}
\usepackage{ctex}
%导言区:需要导入 \usepackage{graphicx} 宏包
%语法:在正文区输入 \includegraphics[<可选项>]{<文件名(可以加后缀也可以不加)>}
%文件格式:EPS,PDF,PNG,JPEG,BMP,JPG
\usepackage{graphicx}
\graphicspath{{figures1/},{figures2/}} %图片存储相对路径(相对此tex文档)用{}括起来, 多个路径用,分隔
%正文区
\begin{document}
\LaTeX{}中的插图
\includegraphics{spider}
\includegraphics{Puma560.png}
\includegraphics{aaa.png}
%指定缩放因子,调整大小
<1>
\includegraphics[scale=0.3]{spider}
\includegraphics[scale=0.3]{Puma560.png}
\includegraphics[scale=0.3]{aaa.png}
%固定高度
<2>
\includegraphics[height=2cm]{spider}
\includegraphics[height=2cm]{Puma560.png}
\includegraphics[height=2cm]{aaa.png}
%固定宽度
<3>
\includegraphics[width=2cm]{spider}
\includegraphics[width=2cm]{Puma560.png}
\includegraphics[width=2cm]{aaa.png}
%版型高度0.1倍的图像高度 相对高度
<3>
\includegraphics[height=0.1\textheight]{spider}
\includegraphics[height=0.1\textheight]{Puma560.png}
\includegraphics[height=0.1\textheight]{aaa.png}
%版型宽度0.2倍的图像宽度 相对宽度
<4>
\includegraphics[width=0.2\textwidth]{spider}
\includegraphics[width=0.2\textwidth]{Puma560.png}
\includegraphics[width=0.2\textwidth]{aaa.png}
%可以同时指定多个可选项 用,分隔 旋转角度和相对宽度
<5>
\includegraphics[angle=-45,width=0.2\textwidth]{spider}
\includegraphics[width=0.2\textwidth]{Puma560.png}
\includegraphics[angle=45,width=0.2\textwidth]{aaa.png}
%可以使用texdoc graphicx查看具体的参数含义
\end{document}