博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
latex 图片的使用
阅读量:2442 次
发布时间:2019-05-10

本文共 2374 字,大约阅读时间需要 7 分钟。

图片插入:

首先得调用宏:

\usepackage{graphics}

一般在文章中插入图片的语句为:

\begin{figure*}[htbp]

\centering

\includegraphics[width=0.75\textwidth]{figureName.eps}

\caption{FigureTitle}

\label{figure}

\end{figure*}

在双栏下插入图片占据双栏时,加上两个*:

\begin{figure*}[htbp]

\centering

\includegraphics[width=0.75\textwidth]{figureName.eps}

\caption{FigureTitle}

\label{figure}

\end{figure*}

插入并列的子图时:\usepackage{subfigure}

\begin{figure}[htbp]

\centering

\subfigure[SubfigureTitle]{

\label{Fig.sub.1}

\includegraphics[width=0.75\textwidth]{figurename.eps}}

\subfigure[SubfigureTitle]{

\label{Fig.sub.2}

\includegraphics[width=0.75\textwidth]{figurename.eps}}

\caption{MainfigureTitleCaption}

\label{figure}

\end{figure}

对于语句中figure后的[htbp]说明:

这是个可选参数项,允许用户来指示图形有可能被放置的位置。这一可选参数项可以是下列字母的任意组合。

h     here 当前位置;将图形放置在 正文文本中给出该图形环境的地方。如果本页所剩的页面不够, 这一参数将不起作用。

t      top 顶部;将图形放置在页面的顶部。

b     bottom 底部;将图形放置在页面的底部。

p     page 浮动页;将图形放置在一只允许有浮动对象的页面上。

注:在使用这些参数时:

(1)如果在图形环境中没有给出上述任一参数,则缺省为 [tbp]。

(2)给出参数的顺序不会影响到最后的结果。因为在考虑这些参数时 LATEX  总是尝试以 h-t-b-p 的顺序来确定图形的位置。所以  [hb] 和 [bh] 都使 LaTex 以h-b 的顺序来排版。

(3)给出的参数越多,LATEX 的排版结果就会越好。[htbp], [tbp], [htp], [tp] 这些组合得到的效果不错。

指定图片大小:

\includegraphics[width=90mm,height=60mm]{figure.eps}

设定图片长宽,图片高度会自动缩放。

\includegraphics[width=\textwidth]{figure.eps}

设定图片宽度为文本宽度。

\includegraphics[width=0.75\textwidth]{figure.eps}

设定图片宽度为文本宽度的0.75倍

\includegraphics[scale=1]{figure.eps}

设定图片与原文件比例为1。

\includegraphics[angle=90]{figure.eps}

将图片旋转90度。

图片使用编译时得注意:

-- 在对.eps格式的图片进行编译时,得注意编译顺序,不能直接使用PDFLaTex,这样会出现编译错误说:Unknown graphics extension: .eps.而是得LaTex编译生成dvi->dvi2pdf或者LaTex编译生成dvi->dvi2ps->ps2pdf。

-- 在对.pdf或者.jpg格式的图片进行编译时,可以直接使用PDFLaTex。

label的使用:

标签使用语句:

\label{LabelName}

在需要引用该label时,\ref{LabelName}

\label的使用注意事项:

\label{key}

A \label command appearing in ordinary text assigns to the key the number of the current sectional unit; one appearing inside a numbered environment assigns that number to the key.

A key can consist of any sequence of letters, digits, or punctuation characters. Upper- and lowercase letters are different.

The number assigned to the key can be accessed by use of the \ref command. For example,

 \begin{equation} 

   .... 

 \label{eq:no1} 

 \end{equation}

 ...

 One can see from Eq.~(\ref{eq:no1}) that ...

In a table or figure environment, the \label command should follow the \caption command (or be part of its argument) since it is the \caption command which generates the number.

转载地址:http://hpiqb.baihongyu.com/

你可能感兴趣的文章
程序员连续剧_每个程序员都应该看的5部最佳电视连续剧
查看>>
人工智能优缺点_人工智能的优缺点
查看>>
运算符重载 python_Python运算符重载
查看>>
tensorflow简介_TensorFlow简介
查看>>
矩阵 python 加法_Python矩阵加法
查看>>
python快速排序_Python快速排序
查看>>
人工神经网络导论_神经网络导论
查看>>
C ++ STL无序多集– std :: unordered_multiset
查看>>
深度学习导论
查看>>
go-back-n_iMyFone D-Back iPhone数据恢复
查看>>
MailboxValidator –批量电子邮件列表清理服务
查看>>
机器学习中常见的最优化算法_最常见的机器学习算法
查看>>
css图片和边框之间有间隔_CSS和CSS3之间的区别
查看>>
iphone浏览器劫持修复_修复iPhone卡在Apple徽标问题上的问题
查看>>
5个最佳Python机器学习IDE
查看>>
c语言中定义和声明的区别_C中声明和定义之间的区别
查看>>
python插入排序_Python插入排序
查看>>
机器学习python 库_最佳Python机器学习库
查看>>
c++变量_C ++变量
查看>>
机器学习ml_机器学习简介(ML)
查看>>