Forgot password?
 Create new account
View 1288|Reply 5

有一个包是能自动引用类别的,忘了是哪一个。

[Copy link]

418

Threads

1628

Posts

110K

Credits

Credits
11891

Show all posts

abababa Posted at 2020-2-26 18:31:51 |Read mode
如题,比如在某个定理上做了标记:
\begin{theorem}\label{mythm001}
然后引用时用:
  1. 定理\ref{mythm001}
Copy the Code
这样的。
现在我用的是上面这种。但之前我用过一个包,引用时会直接标记出这是定理,而不是其它的性质、推论、引理之类的,像下面这样引用就行:
  1. \ref{mythm001}
Copy the Code
然后就能自动加上“定理”两个字。这是哪个包呢?用法是什么样的?

701

Threads

110K

Posts

910K

Credits

Credits
94172
QQ

Show all posts

kuing Posted at 2020-2-27 02:40:41
我一直是用 hyperref 宏包的 \autoref 命令,见:kuing.cjhb.site/forum.php?mod=viewthread&tid=5197
应该不是你说的包,如果你想起来了,记得告诉我一声。

418

Threads

1628

Posts

110K

Credits

Credits
11891

Show all posts

 Author| abababa Posted at 2020-2-27 12:45:06
回复 2# kuing

这个也很好用,谢谢。
但我说的那个感觉确实和这个不一样,在引用时“定理”两个字是不带链接的,仍然是标号带了链接,只是“定理”两个字不用写出来。
现在就用这个代替也很好,省了还得查找是定理还是命题之类的。

418

Threads

1628

Posts

110K

Credits

Credits
11891

Show all posts

 Author| abababa Posted at 2020-8-26 23:32:16
这个autoref,能不能在引用时把定理名也引用上?比如我有个定理是:
\begin{theorem}[柯西中值定理]\label{thm0305}

我想在引用时把那个“柯西中值定理”这几个字引用上,这应该怎么做?

418

Threads

1628

Posts

110K

Credits

Credits
11891

Show all posts

 Author| abababa Posted at 2020-8-29 17:56:36
回复 2# kuing

我之前用的那个包想起来了,是\usepackage{cleveref},然后引用时要\cref,不过还有一些东西要设置,怎么设置现在还没想起来,默认的情况,对定理的引用,是显示“theorem+编号”的形式

701

Threads

110K

Posts

910K

Credits

Credits
94172
QQ

Show all posts

kuing Posted at 2020-8-29 18:34:04
回复 5# abababa

粗略看了下该包的手册,考虑到了更全面更细致的东西,相应地设置也更复杂,暂时没心思细看……

至于 4# 的问题,暂时还不知道……

手机版Mobile version|Leisure Math Forum

2025-4-20 22:14 GMT+8

Powered by Discuz!

× Quick Reply To Top Return to the list