• Latex技巧:LaTex插图命令includegraphics参数详解


    Latex插图的命令是includegraphics[选项]{文件}

      这里的选项在表 7.1, 7.2, 7.3 中列出。 因为 includegraphics 不会结束 当前段落,所以它能够在文本中放置图形如   includegraphics[width=12pt]{recycle.eps} 和  includegraphics[width=12pt]{illusion.eps}

    下面的命令将以 file.eps  的自然大小插入到 LATEX 文档中:

    documentclass{article}

        usepackage{graphicx}

        egin{document}

        includegraphics{file.eps}

    end{document}

    image

    image

    image

    如果加入的图形文件没有指明扩展名,那么 includegraphics 会根据  DeclareGraphicsExtensions 的扩展名列表自动为它加上扩展名(见第  9.1 节)。由于缺省的扩展名列表不包括空的扩展名,  includegraphics{file} 不会读入 file。除非空的扩展名 已被加到扩展名列表中。 命令

    includegraphics[width=3in]{file.eps}

    file.eps 插入文档并且它的宽度被缩放到 3 英寸,高度也会 按相应的比例缩放。如果用 extwidthem 等的函数来 指定宽度,而不是用像 3 英寸这样的固定尺寸,将会使你的 LATEX 文 档更具通用性。例如:

    includegraphics[width= extwidth]{graphics.eps}

    将所插入图形缩放到和文本行的宽度一样宽。而下面的命令

    includegraphics[width=0.80 extwidth]{graphics.eps}

    使得插入图形的宽度为文本行宽的 80%。当与 calc 宏包配合使用 时,下面的命令可令图形的宽度比文本行宽少 2 英寸:

    includegraphics[width= extwidth-2.0in]{graphics.eps}

    to (需要 graphicx 12/95 或以后的 版本。) 下面是一些使用 includegraphics 命令来插入图形的 例子。这里为方便起见,定义 HR 如下:

    ewcommand{HR}{ ule{1em}{0.4pt}}

      在下面的几个例子中,可以比较以下使用 scale,width,height,angle  以及 keepaspectratio 选项及其不同的顺序所得到的不同效果。

    fbox{%<br>%<br>            includegraphics[scale=.5]{w.eps}}

    左HRfbox{%
    includegraphics[scale=.5]{w.eps}%
    HR 右

    fbox{%<br>%<br>            includegraphics[width=10mm]{w.eps}}
    左HRfbox{%
    includegraphics%
    [width=10mm]{w.eps}%
    HR 右

    fbox{%<br>%<br>            includegraphics[height=20mm,width=30mm]%<br>%<br>            {w.eps}}

    左HRfbox{%
    includegraphics [height=20mm,width=30mm]%
    {w.eps}}HR 右

    fbox{%<br>%<br>            includegraphics[height=20mm,width=30mm,%<br>%<br>            keepaspectratio]{w.eps}}

    左HRfbox{%
    includegraphics [height=20mm,width=30mm,%
    keepaspectratio]{w.eps}}%
    HR 右

    fbox{%<br>%<br>            includegraphics[angle=-45]{w.eps}}

    左HRfbox{%
    includegraphics [angle=-45]{w.eps}}%
    HR 右

    fbox{%<br>%<br>            includegraphics[angle=-45,width=30mm]%<br>%<br>            {w.eps}}

    左HRfbox{%
    includegraphics [angle=-45,width=30mm]%
    {w.eps}}HR 右

    fbox{%<br>%<br>            includegraphics[width=30mm,angle=-45]%<br>%<br>            {w.eps}}

    左HRfbox{%
    includegraphics [width=30mm,angle=-45]%
    {w.eps}}HR 右

    fbox{%<br>%<br>            includegraphics[angle=-60,totalheight=15mm]{w.eps}}<tex2html_comment_mark>446

    左HRfbox{%
    includegraphics [angle=-60,totalheight=15mm]%
    {w.eps}}%
    HR 右

    fbox{%<br>%<br>            includegraphics[angle=-60,totalheight=20mm,width=30mm]{w.eps}}<tex2html_comment_mark>452

    左HRfbox{%
    includegraphics [angle=-60,totalheight=20mm,%
    width=30mm]{w.eps}}%
    HR 右

    fbox{%<br>%<br>            includegraphics[angle=-60,totalheight=20mm,width=30mm,keepaspectratio]{w.eps}}<tex2html_comment_mark>458

    左HRfbox{%
    includegraphics [angle=-60,totalheight=20mm,%
    width=30mm,keepaspectratio]%
    {w.eps}}%
    HR 右



    参考文献:http://chenli-0925.blog.163.com/blog/static/3408462920109802115554/

  • 相关阅读:
    win10 开机背景图
    关于在不知道具体实例化哪个窗体时调用该窗体公共变量的方法
    devexpress 严重性 代码 说明 项目 文件 行 禁止显示状态 错误 “lc.exe”已退出,代码为 -1。
    获取打印机设置的纸张参数
    mysql 添加字段语句
    curl模拟post请求
    php CI框架log写入
    winform程序更新
    JSP的EL和JSTL解析
    报错:java.lang.IllegalArgumentException: object is not an instance of declaring class
  • 原文地址:https://www.cnblogs.com/yifdu25/p/8326025.html
Copyright © 2020-2023  润新知