
如果我想引用一個段落,但不給它們編號,我該怎麼做?
目前,我正在做一些事情:
\subsection{A}
This is where I'm referring to the paragraph, using cref.
For further information, see \cref{par:X}.
\subsection{B}
Bla bla blub
\paragraph{Paragraph header}\label{par:X}
lorem impsum dolor met sit amet whatever I don't know the rest
不幸的是,它本身只印出“...,請參閱 [B 號碼] 小節”。
現在,如果我使用:
\setcounter{secnumdepth}{6}
\crefname{paragraph}{paragraph}{paragraphs}
\Crefname{paragraph}{paragraph}{paragraphs}
在序言中,我能參考段落,而不僅僅是(子(子))部分。
但是,我想使用段落作為文本中的強調,而不是作為實際編號的標題,這就是現在正在發生的情況 - 它們被編號。
因此我的問題 - 我如何引用我的標籤,以便它呈現為“參見段落段落標題「(來自上面的範例)並且實際段落沒有分配編號?
答案1
要引用段落的標題,您可以\nameref
從 hyperref
包中使用:
\documentclass{article}
\usepackage{hyperref}
\usepackage{cleveref}
\begin{document}
\subsection{A}
This is where I'm referring to the paragraph, using cref.
For further information, see \nameref{par:X}.
\subsection{B}
Bla bla blub
\paragraph{Paragraph header}\label{par:X}
lorem impsum dolor met sit amet whatever I don't know the rest
\end{document}