Forgot password
 Register account
View 166|Reply 3

请教autorefname引用item要怎么把最后的点去掉?

[Copy link]

414

Threads

1641

Posts

15

Reputation

Show all posts

abababa posted 2022-10-13 20:17 |Read mode
如题,我先是写了\setlist[enumerate,2,3,4]{label*=\arabic*.},让所有的item都变成数字,然后引用的写了\renewcommand\Itemautorefname{条目}。之后在嵌套的enumerate的最里面那个中写了
\item\label{item:pp:01}性质1
\item\label{item:pp:01}性质2

最后引用的时候:\autoref{item:pp:01}。它引用时写的是“条目 1.1.-条目 1.2.”这种,最后都带一个点,我希望在引用时不带上最后那个点,请教这个要怎么弄才行?

673

Threads

110K

Posts

218

Reputation

Show all posts

kuing posted 2022-10-13 23:06
看了下 enumitem 包的手册,有 label*=... 却没有 ref*=...

那只好分开写啦:
  1. \setlist[enumerate,2]{label*=\arabic*.,ref=\theenumi.\arabic*}
  2. \setlist[enumerate,3]{label*=\arabic*.,ref=\theenumii.\arabic*}
  3. \setlist[enumerate,4]{label*=\arabic*.,ref=\theenumiii.\arabic*}
Copy the Code
如何?

673

Threads

110K

Posts

218

Reputation

Show all posts

kuing posted 2022-10-13 23:22
另外还搜到一个 enumitem-zref 包,不知是否适用,看手册也一时看不太懂……

414

Threads

1641

Posts

15

Reputation

Show all posts

original poster abababa posted 2022-10-14 13:57
kuing 发表于 2022-10-13 23:06
看了下 enumitem 包的手册,有 label*=... 却没有 ref*=...

那只好分开写啦:
谢谢,最开始我写setlist的时候就是分开的,不过我不知道还有ref=的参数,后来就合在一起了,现在又要分开

Quick Reply

Advanced Mode
B Color Image Link Quote Code Smilies
You have to log in before you can reply Login | Register account

$\LaTeX$ formula tutorial

Mobile version

2025-7-20 05:50 GMT+8

Powered by Discuz!

Processed in 0.013649 seconds, 22 queries