-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
avoid nested xref #198
Comments
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. #183 will be one part of that. Some of the bug-like examples will need to be checked. Otherwise, we'll try to flatten the inner xrefs (here and downstream). @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 |
An observation for the texml side of things: I stumbled upon the old fact that texml might generate xref without 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 \cite: expose optional parameter #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]The text was updated successfully, but these errors were encountered: