You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are a few different types of link that xml2rfc can produce. There are internal cross references (Section 3.2), bare citations ([RFC2931]), citations with sections (Section 3.2 of [RFC2931]; which is two links), bare links to sections of citations (where the literal text is just turned into a link in HTML), bare URL links (with the URL rendered or text displayed with a hyperlink), and more combinations of the above.
The classes that are used for these in the HTML rendering is fairly limited and not very consistent. For <xref section="3.2" target="CITATION"/>, the rendering produces two links "Section 3.2" has a class of "relref" and "[CITATION]" has a class of "xref". For internal references like <xref target="sec-foo"/>, the link on "Section 3.2" has a class of "xref".
This makes styling these links properly nearly impossible. Though you might like to have markers that indicate external vs. internal, the use of "xref" for both makes that impossible. And though "Section 3.2" likely needs similar rendering treatment (use of white-space: nowrap), the use of different classes makes consistent styling impossible. Linked text that doesn't have any generated text that uses bare links (like <xref sectionFormat="bare" section="3.2" target="CITATION">some text</xref>) also uses "relref", but this form generally does not want special whitespace treatment.
Links that use <eref> don't see to get classes, but these don't distinguish between a bare link (<eref target="foo"/>) and linked text (<eref target="foo">text</eref>), again making the use of consistent styling more challenging.
More consistent use of classes would be appreciated. There are several things that would be interesting to know when styling the link:
If the link text is a bare URL, free form text, "Section X" or "Appendix Q", or a citation anchor
If the link is to a an arbitrary URL, internal anchor, a citation block, or a section in a citation
(For completeness only because I think that selfRef is already consistent) If the link is for the purposes of establishing a clickable anchor only, which is used for headings and pilcrows.
Issue migrated from trac:663 at 2022-02-08 07:16:47 +0000
The text was updated successfully, but these errors were encountered:
type_defect
| by mt@lowentropy.netThere are a few different types of link that xml2rfc can produce. There are internal cross references (Section 3.2), bare citations ([RFC2931]), citations with sections (Section 3.2 of [RFC2931]; which is two links), bare links to sections of citations (where the literal text is just turned into a link in HTML), bare URL links (with the URL rendered or text displayed with a hyperlink), and more combinations of the above.
The classes that are used for these in the HTML rendering is fairly limited and not very consistent. For
<xref section="3.2" target="CITATION"/>
, the rendering produces two links "Section 3.2" has a class of "relref" and "[CITATION]" has a class of "xref". For internal references like<xref target="sec-foo"/>
, the link on "Section 3.2" has a class of "xref".This makes styling these links properly nearly impossible. Though you might like to have markers that indicate external vs. internal, the use of "xref" for both makes that impossible. And though "Section 3.2" likely needs similar rendering treatment (use of
white-space: nowrap
), the use of different classes makes consistent styling impossible. Linked text that doesn't have any generated text that uses bare links (like<xref sectionFormat="bare" section="3.2" target="CITATION">some text</xref>
) also uses "relref", but this form generally does not want special whitespace treatment.Links that use
<eref>
don't see to get classes, but these don't distinguish between a bare link (<eref target="foo"/>
) and linked text (<eref target="foo">text</eref>
), again making the use of consistent styling more challenging.More consistent use of classes would be appreciated. There are several things that would be interesting to know when styling the link:
Issue migrated from trac:663 at 2022-02-08 07:16:47 +0000
The text was updated successfully, but these errors were encountered: