Open pkra opened 7 months ago
I added a more complete list from a quick search through publications. We have 94 cases across 11 publications right now, some of which seem like bugs.
Almost all cases are from links inside tag or cite.
As per F2F, we want to avoid nested xrefs in general.
@davidmjones maybe an inner xref should be resolved to a generic wrapping element in case we want to do something downstream (e.g., style it). But we can wait until the need arises.
Just FYI (since I don't think texml should change here): downstream also runs into nested links with xref
inside toc-entry
. That's because we turn toc-entry
to a
so we have also flattened those xref
(since the earliest days).
An observation for the texml side of things: I stumbled upon the old fact that texml might generate xref without rid
attribute (but with a ref-key and undefined ref-type).
I think (but would like to check that) this happens only in extreme edge cases, i.e., I can only find 5 papers right now.
More precisely, it seems this happens only when the referenced labels no longer exists in the source, usually by some clean up.
Since it only affects fairly old papers, I'm wondering if texml has made this obsolete.
Perhaps such an xref construction is an approach for the situation here, too.
@davidmjones ping on this.
bull1835 is a recent example.
While jats and bits technically allow nested xref element, I think texml would do well to avoid it since it tends to lead to nested links in HTML which is invalid and causes usability issues.
Cases seen so far
\tag{\ref{x}}\label{y}
with\ref{y}
.\renewcommand{\thelemma}{{\ref{x}}*} \begin{lemma} \label{y}...
with\ref{y]
\cite[(1.7), (1.8); \cite{X}]{Y}.
(cf. also #183)\cite[eq. (3,\eqref{3.9}]{3}
<xref ...>(<xref ...>4.6</xref>.1)</xref>
[this actually looks like a bug]\hyperref[xxx]{\hyperref[xxx]{xxxx}}
[looks like a hack to get the right chapter+section numbers]