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 @@ @node HTML Xref * 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 @@ @node HTML Xref Link Basics 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 @@ @node HTML Xref 8-bit Character Expansion 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{} tag of @file{manual.html}: - -@example - -@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 tag of manual.html: + + + 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