bug-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: do not upper case @sc argument in HTML cross manual Cross References


From: pertusus
Subject: Re: do not upper case @sc argument in HTML cross manual Cross References
Date: Thu, 9 Mar 2023 16:35:20 +0100

On Thu, Mar 09, 2023 at 09:10:13AM +0200, Eli Zaretskii wrote:
> > From: pertusus@free.fr
> > Indeed, following this change, the following two nodes will clash while
> > they did not before
> > 
> > @node my node
> > 
> > @node my @sc{node}
> > 
> > However, I consider it better if the two nodes clash.
> 
> Do we have a good clash resolution technique for these cases?  I
> thought what we do in those cases is rather flaky, and only "works"
> because it isn't supposed to happen too much, and because we don't
> really care too much about case-insensitive filesystems.

To determine if node names clash when formatting an Texinfo manual, we
normalize their name and compare the normalized strings.  This is done
independently of the output format.  The name normalization is very
similar to the one used to setup the targets in HTML cross references.

In more details, the steps 1 to 6 in the following are applied:
https://www.gnu.org/software/texinfo/manual/texinfo/html_node/HTML-Xref-Node-Name-Expansion.html

@-commands are expanded as in
https://www.gnu.org/software/texinfo/manual/texinfo/html_node/HTML-Xref-Command-Expansion.html

and 8 bit characters replacement is described in (no transliteration
in that case)
https://www.gnu.org/software/texinfo/manual/texinfo/html_node/HTML-Xref-8_002dbit-Character-Expansion.html


The issue about case-insensitive filesystems does not apply here, as we
are only comparing node names internally when formatting a manual, not
setting up URLs.  A similar normalization is done to prepare
cross-references id in the manual being generated and cross references
to other manuals.  Even if node names do not clash (HTML anchors never
clash too if node names do not clash), file names used in cross-references
may, for diverse reasons:
* non 7bit Unicode characters are transliterated
  (can be avoided with --no-transliterate-file-names)
* filesystem may be case insensitive (can be taken into account with
  CASE_INSENSITIVE_FILENAMES)
* long names are truncated (length can be set by setting
  BASEFILENAME_LENGTH, default is 255 - 10).

-- 
Pat



reply via email to

[Prev in Thread] Current Thread [Next in Thread]