xref without link

10 views
Skip to first unread message

Adam Smith

unread,
Oct 3, 2025, 7:05:42 PMOct 3
to pretext...@googlegroups.com
Is there any way to make an <xref> that refers to a certain chapter, but without making a link to it?

The reason is because I want to say something like "under the X heading in Chapter Y, we discuss the...". That is, I want X to be the link to a particular unnumbered heading (really a subsubsection), but I don't want to spring this on people without some context. So I give them an <xref>-like thing that names the chapter/section/whatever that contains the heading, without actually linking to it (which would be redundant and odd). Does this make sense?

Thanks,
Adam

--------------------
Adam A. Smith
Associate Professor of Computer Science
University of Puget Sound

Rob Beezer

unread,
Oct 4, 2025, 3:34:38 AMOct 4
to pretext...@googlegroups.com
It makes some sense. ;-)

But I have to point out that if you were not explicitly hiding numbers on the subsubsection, an #xref directly to it would have a number that began with "Y." So, in a way, our default behavior provides the information you wish to convey.

There are some semi-comlicated text forms for an #xref but without looking, they may not accomplish what you want.

And what is really so bad about "Chapter Y" being an active link? It does not seem redundant to me, or even that odd.

Procedurally, it may be straightforward to sidestep the various "link manufacture" templates with a trivial one. With markup like @active="no". But there are knock-on effects, like not making knowl content, that require exceptions.

I'm not convinced the intrusion in the code are warranted by the desire to de-activate the link.

If there was a semi-natural way to adjust the markup on the "real" #xref to request "<heading>, Chapter Y" as the link text, that might be more inline with what we do already. (And more complicated to implement!)

Maybe look at the "phrase" options we have (I've not done that).

Rob

On October 4, 2025 1:05:29 AM GMT+02:00, Adam Smith <aas...@pugetsound.edu> wrote:
>Is there any way to make an <xref> that refers to a certain chapter, but
>without making a link to it?
>
>The reason is because I want to say something like "under the *X* heading
Reply all
Reply to author
Forward
0 new messages