texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: * doc/texinfo.texi (HTML Xref Link Basics, HTML X


From: Patrice Dumas
Subject: branch master updated: * doc/texinfo.texi (HTML Xref Link Basics, HTML Xref Configuration): remove teh "HTML Xref Mismatch" node, it is not the best way to go and somewhat obsolete. Keep the information in tp/TODO. Add some information on mismatched cross-references in the last paragraphs of "HTML Xref Link Basics".
Date: Sun, 25 Aug 2024 08:22:48 -0400

This is an automated email from the git hooks/post-receive script.

pertusus pushed a commit to branch master
in repository texinfo.

The following commit(s) were added to refs/heads/master by this push:
     new cc81122e11 * doc/texinfo.texi (HTML Xref Link Basics, HTML Xref 
Configuration): remove teh "HTML Xref Mismatch" node, it is not the best way to 
go and somewhat obsolete.  Keep the information in tp/TODO.  Add some 
information on mismatched cross-references in the last paragraphs of "HTML Xref 
Link Basics".
cc81122e11 is described below

commit cc81122e11d8df98c94d7dc1a85cf118a61a2053
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sun Aug 25 14:21:33 2024 +0200

    * doc/texinfo.texi (HTML Xref Link Basics, HTML Xref Configuration):
    remove teh "HTML Xref Mismatch" node, it is not the best way to go and
    somewhat obsolete.  Keep the information in tp/TODO.  Add some
    information on mismatched cross-references in the last paragraphs of
    "HTML Xref Link Basics".
---
 ChangeLog        |  8 +++++++
 doc/texinfo.texi | 69 ++++++++++++--------------------------------------------
 tp/TODO          | 29 ++++++++++++++++++++++--
 3 files changed, 49 insertions(+), 57 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 21b833c5cb..46ff610423 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2024-08-25  Patrice Dumas  <pertusus@free.fr>
+
+       * doc/texinfo.texi (HTML Xref Link Basics, HTML Xref Configuration):
+       remove teh "HTML Xref Mismatch" node, it is not the best way to go and
+       somewhat obsolete.  Keep the information in tp/TODO.  Add some
+       information on mismatched cross-references in the last paragraphs of
+       "HTML Xref Link Basics".
+
 2024-08-25  Gavin Smith <gavinsmith0123@gmail.com>
 
        * util/htmlxref.cnf (smtp, smtpmail): Rename to smtpmail to
diff --git a/doc/texinfo.texi b/doc/texinfo.texi
index 71a34c32ae..f03777aa0f 100644
--- a/doc/texinfo.texi
+++ b/doc/texinfo.texi
@@ -17495,7 +17495,6 @@ The algorithm was primarily devised by Patrice Dumas in 
2003--04.
 * Node Expansion:    HTML Xref Node Name Expansion.
 * Command Expansion: HTML Xref Command Expansion.
 * 8-bit Expansion:   HTML Xref 8-bit Character Expansion.
-* Mismatch:          HTML Xref Mismatch.
 * Configuration:     HTML Xref Configuration.
 @end menu
 
@@ -17573,15 +17572,18 @@ Finally, the @var{target} part is always the expanded 
node name.
 Whether the present manual is split or mono is determined by user
 option; @command{texi2any} defaults to split, with the
 @option{--no-split} option overriding this.
-
 Whether the referent manual is split or mono, however, is another bit
-of the external information (@pxref{HTML Xref Configuration}).  By
-default, @command{texi2any} uses the same form of the referent manual
-as the present manual.
+of the external information (@pxref{HTML Xref Configuration}).
 
-Thus, there can be a mismatch between the format of the referent
-manual that the generating software assumes, and the format it's
-actually present in.  @xref{HTML Xref Mismatch}.
+By default, @command{texi2any} uses the same form of the referent manual as the
+present manual.  Thus, there can be a mismatch between the format of the
+referent manual that the generating software assumes, and the format it's
+actually present in.  If there is no external information, both mono
+and split form should be generated to be sure that the cross-references
+work irrespective of the split option.  This is something the software
+which generated the @emph{referent} manual has to do in advance, it's
+not something the software generating the cross-reference in the present
+manual can control.
 
 
 @node HTML Xref Node Name Expansion
@@ -17816,57 +17818,14 @@ related documents and implementations are available 
elsewhere on the
 web.
 
 
-@node HTML Xref Mismatch
-@subsection HTML Cross-reference Mismatch
-@cindex HTML cross-references @subentry mismatch
-@cindex Mismatched HTML cross-reference source and target
-
-As mentioned earlier (@pxref{HTML Xref Link Basics}), the generating
-software may need to guess whether a given manual being cross-referenced is 
available in split or monolithic form---and, inevitably,
-it might guess wrong.  However, when the @emph{referent} manual is
-generated, it is possible to handle at least some mismatches.
-
-In the case where we assume the referent is split, but it is actually
-available in mono, the only recourse would be to generate a
-@file{manual_html/} subdirectory full of HTML files which redirect back to
-the monolithic @file{manual.html}.  Since this is essentially the same
-as a split manual in the first place, it's not very appealing.
-
-On the other hand, in the case where we assume the referent is mono,
-but it is actually available in split, it is possible to use
-JavaScript to redirect from the putatively monolithic
-@file{manual.html} to the different @file{manual_html/node.html} files.
-Here's an example:
-
-@example
-function redirect() @{
-  switch (location.hash) @{
-    case "#Node1":
-      location.replace("manual_html/Node1.html#Node1"); break;
-    case "#Node2" :
-      location.replace("manual_html/Node2.html#Node2"); break;
-    @dots{}
-    default:;
-  @}
-@}
-@end example
-
-Then, in the @code{<body>} tag of @file{manual.html}:
-
-@example
-<body onLoad="redirect();">
-@end example
-
-Once again, this is something the software which generated the
-@emph{referent} manual has to do in advance, it's not something the
-software generating the cross-reference in the present manual can
-control.
-
-
 @node HTML Xref Configuration
 @nodedescription @file{htmlxref.cnf}.
 @subsection HTML Cross-reference Configuration: @file{htmlxref.cnf}
 
+@c the "HTML Xref Mismatch" was removed.  Placing the anchor here as
+@c it is the most relevant node for that subject.
+@anchor{HTML Xref Mismatch}
+
 @pindex htmlxref.cnf
 @cindex HTML cross-references @subentry configuration
 @cindex Cross-reference configuration, for HTML
diff --git a/tp/TODO b/tp/TODO
index d7d60324f7..8733a20953 100644
--- a/tp/TODO
+++ b/tp/TODO
@@ -301,8 +301,6 @@ Should we warn if output is on STDOUT and 
OUTPUT_ENCODING_NAME != MESSAGE_OUTPUT
 
 Handle better @exdent in html? (there is a FIXME in the code)
 
-Implement what is proposed in HTML Cross Reference Mismatch.
-
 For plaintext, implement an effect of NO_TOP_NODE_OUTPUT
 * if true, output some title, possibly based on titlepage
   and do not output the Top node.
@@ -658,6 +656,33 @@ In HTML, HEADERS is used.  But not in other modules, 
especially not in
 Plaintext.pm or Info.pm, this is determined by the module used (Plaintext.pm
 or Info.pm).  No idea whether it is right or wrong.
 
+
+In general, the htmlxref.cnf file should be filled and used to determine
+the split of a reference manual, and if no htmlxref.cnf file is used, it
+is a good idea to generate both a mono and a split manual.  Therefore the
+following situation is not something that needs to be supported/implemented,
+however we keep the information on the javascript code here.
+
+If a manual is split and the person generating the manual wants that
+references to a mono manual to be redirected to the split files, it should
+be possible to create a manual.html file that redirects to the
+manual_html/node.html files using the following javascript function:
+
+ function redirect() {
+   switch (location.hash) {
+     case "#Node1":
+       location.replace("manual_html/Node1.html#Node1"); break;
+     case "#Node2" :
+       location.replace("manual_html/Node2.html#Node2"); break;
+     ...
+     default:;
+   }
+ }
+
+And, in the <body> tag of manual.html:
+  <body onLoad="redirect();">
+
+
 From vincent Belaïche. About svg image files in HTML:
 
 I don't think that supporting svg would be easy: its seems that to embed an



reply via email to

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