原文地址:http://blog.163.com/xiaoting_hu/blog/static/504647722013528143405/
侵删
步骤:
1. 用图形软件输出 EPS 格式的文件,或PDF格式的图形 2. 在源文件的导言中加入下面代码,这样下面几种类型的图都可以插入
\ifCLASSINFOpdf \usepackage[pdftex]{graphicx} \graphicspath{{../pdf/}{../jpeg/}} % declare the path(s) where your graphic files are \DeclareGraphicsExtensions{.pdf,.jpeg,.png} \else \usepackage[dvips]{graphicx} \graphicspath{{../eps/}} \DeclareGraphicsExtensions{.eps} \fi
3 插入浮动图形(浮动图形由latex自动指定位置,一般放在一页的最前面或最后面)
\begin{figure} \centering //设置对齐格式 \includegraphics [width=0.75,height=2.5]{arch.pdf} //指定图形大小和图形名称,一般将该图形放在latex文件同一路径下就不需要指明路径 \caption{Proposed Secure Systolic Montgomery modular MultiplierArchitecture} 设置图形标题
\label{fig:arch} 设置图形引用名称 \end{figure}
或者使用\includegraphics[width=0.25\textwidth]{arch.pdf} //此处width=0.25和命令\textwidth配合可实现原图按比例缩放的功能,此处代表原图的宽度为页面的大小的25%,高度按比例自动缩放。
4.想要把图形插在自己指定位置并且需要交叉引用的话,要使用以下的格式:
\makeatletter
\def\@captype{figure}
\makeatother
\includegraphics [width=0.75,height=2.5]{arch.pdf} //此处用法同3
\caption{...}
\label{...}
5.文中引用
In Figure \ref{fig:arch} //其中的fig:arch为定义该图时的label名
6.{figure} and {figure*}的区别
figure相对本栏,figure* 相对于通栏。
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有