加载中…
个人资料
周树森
周树森
  • 博客等级:
  • 博客积分:0
  • 博客访问:0
  • 关注人气:0
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
正文 字体大小:大 中 小

Latex \ref与编号不一致问题的解决办法

(2011-12-08 12:27:49)
标签:

杂谈

对插入的图片都作了\label,然后用\ref引用,但是图片的编号与引用的编号不一致。

原因是:\label是fragile的,一定要跟在\caption后面才行。

Hypertext Help with LaTeX
\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 thekey.

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.

The \label command is fragile but it can be used in the argument of a sectioning command or \caption command.


0

阅读┊ 收藏 ┊ 喜欢▼ ┊打印┊举报/Report
  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有