Info Node: (texinfo)HTML Xref Mismatch

CFHT HOME texinfo: HTML Xref Mismatch


up: HTML Xref next: HTML Xref Configuration prev: HTML Xref 8-bit Character Expansion Back to Software Index

24.4.5 HTML Cross Reference Mismatch
------------------------------------

As mentioned earlier (Note: 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 _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 'manual/'
subdirectory full of HTML files which redirect back to the monolithic
'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 'manual.html' to the
different 'manual/node.html' files.  Here's an example:

     function redirect() {
       switch (location.hash) {
         case "#Node1":
           location.replace("manual/Node1.html#Node1"); break;
         case "#Node2" :
           location.replace("manual/Node2.html#Node2"); break;
         ...
         default:;
       }
     }

  Then, in the '<body>' tag of 'manual.html':

     <body onLoad="redirect();">

  Once again, this is something the software which generated the
_referent_ manual has to do in advance, it's not something the software
generating the cross reference in the present manual can control.


automatically generated by info2www version 1.2