LaTeX学习 |(7)LaTeX中的插图

LaTeX中的插图

\documentclass{article}

\usepackage{ctex}

%导言区:需要导入 \usepackage{graphicx} 宏包

%语法:在正文区输入 \includegraphics[<可选项>]{<文件名(可以加后缀也可以不加)>}

%文件格式:EPS,PDF,PNG,JPEG,BMP,JPG

\usepackage{graphicx}

\graphicspath{{figures/},{pics/}} %图片存储路径用{}括起来 多个路径用,分隔。图片在当前目录下的figures

%正文区

\begin{document}

    \LaTeX{}中的插图

    

    \includegraphics{spider}

    \includegraphics{pytorch.png} %可以加后缀

    \includegraphics{english}

    

    %插图太大 可能无法正常排版 可以添加可选参数 调整大小等参数

    %指定缩放因子

    \includegraphics[scale=0.3]{spider}

    \includegraphics[scale=0.03]{pytorch}

    \includegraphics[scale=0.3]{english}

    

    %固定高度

    \includegraphics[height=2cm]{spider}

    \includegraphics[height=2cm]{pytorch}

    \includegraphics[height=2cm]{english}

    

    %固定宽度

    \includegraphics[width=2cm]{spider}

    \includegraphics[width=2cm]{pytorch}

    \includegraphics[width=2cm]{english}

    

    %版型高度0.1倍的图像高度 相对高度

    \includegraphics[height=0.1\textheight]{spider}

    \includegraphics[height=0.1\textheight]{pytorch}

    \includegraphics[height=0.1\textheight]{english}

    

    %版型宽度0.2倍的图像宽度 相对宽度

    \includegraphics[width=0.2\textwidth]{spider}

    \includegraphics[width=0.2\textwidth]{pytorch}

    \includegraphics[width=0.2\textwidth]{english}

    

    %可以同时指定多个可选项 用,分隔 旋转角度和相对宽度

    \includegraphics[angle=-45,width=0.2\textwidth]{spider}

    \includegraphics[width=0.2\textwidth]{pytorch}

    \includegraphics[angle=45,width=0.2\textwidth]{english}    

    

    %可以使用texdoc graphicx查看具体的参数含义

\end{document}

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值