接上篇 使用XeLaTeX
排版
插入图片
代码
usepackage{graphicx} % 插入图片所需宏包
begin{figure}[htbp] % []中调整图片位置(htbp为自动选择)
centering % 居中
includegraphics[scale=0.6]{y-s-1980.png}
caption{Moore's(1980)method} % 图片说明
label{fig:label} % 图片标签
end{figure}
关于includegraphics[]{}
[]
中设置图片的大小,scale
表示缩放系数 {}
中输入图片路径
效果
![e18d84886083e524525dc7352021bf2d.png](https://i-blog.csdnimg.cn/blog_migrate/24aa674609b5f39841081e074e4dbd2d.jpeg)
并排插入两张图片
代码
begin{figure}[htbp]
begin{minipage}[c]{0.45linewidth} %需调整
centering
includegraphics[scale=0.45]{y-s-1980.png} %需调整
caption{Moore's(1980)method}
label{fig:label}
end{minipage}
hfill %弹性长度
begin{minipage}[c]{0.45linewidth} %需调整
centering
includegraphics[scale=0.45]{y-s-1980.png} %需调整
caption{Moore's(1980)method}
label{fig:label}
end{minipage}
end{figure}
Tips
- 代码中间换行导致排版错乱 (不知道什么原因)
- 需要自行调整
[scale=0.45]
和{0.45linewidth}
以正常显示图片 (不要超过页面尺寸)
效果
![e00d33fad940a66dbc6b7caea9cae2e3.png](https://i-blog.csdnimg.cn/blog_migrate/0cf939c27aef75d995c166f3995f32e5.jpeg)
参考资料
Latex中插图总结(一)_编程小栈-CSDN博客_latex插入图片blog.csdn.net![2974ca9871e6f8781a647b3717982c02.png](https://i-blog.csdnimg.cn/blog_migrate/7b1cf7685bc3c468133cf59379c9c7b0.jpeg)