TRANSLATION ExtIndex; { Sortie HTML des Index (ExtIndex)  }
		      { H. Richy Juillet 1995 }
		      { H. Richy Ajout alphabet Mai 1997 }

COUNTERS
   CptIndex: Rank of Index_table;
   CptRefDirecte: Rank of RefDirecte;

CONST
   BaliseF   = '">';            { Fermeture de balise        }
   AncreDef  = '<A NAME="';     { Arrivee d un lien          }
   AncreRef  = '<A HREF="';     { Depart d un lien           }
   AncreFin  = '</A>';          { Fermeture d ancre de lien  }
   StartOfFile1 = '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN//2.0">\12';
   StartOfFile2 = '<HTML>\12<HEAD>\12<!-- Document generated by Thot -->\12';

   EndOfHead    = '</HEAD>\12<BODY>\12';

   Alphabet1 = '<HR>\12<a href="#Thumb-A">A</a>\12<a href="#Thumb-B">B</a>\12<a href="#Thumb-C">C</a>\12<a href="#Thumb-D">D</a>';
   Alphabet2 = '\12<a href="#Thumb-E">E</a>\12<a href="#Thumb-F">F</a>\12<a href="#Thumb-G">G</a>\12<a href="#Thumb-H">H</a>';
   Alphabet3 = '\12<a href="#Thumb-I">I</a>\12<a href="#Thumb-J">J</a>\12<a href="#Thumb-K">K</a>\12<a href="#Thumb-L">L</a>';
   Alphabet4 = '\12<a href="#Thumb-M">M</a>\12<a href="#Thumb-N">N</a>\12<a href="#Thumb-O">O</a>\12<a href="#Thumb-P">P</a>';
   Alphabet5 = '\12<a href="#Thumb-Q">Q</a>\12<a href="#Thumb-R">R</a>\12<a href="#Thumb-S">S</a>\12<a href="#Thumb-T">T</a>';
   Alphabet6 = '\12<a href="#Thumb-U">U</a>\12<a href="#Thumb-V">V</a>\12<a href="#Thumb-W">W</a>\12<a href="#Thumb-X">X</a>';
   Alphabet7 = '\12<a href="#Thumb-Y">Y</a>\12<a href="#Thumb-Z">Z</a>\12<HR>';

   EndOfFile    = '\12</BODY>\12</HTML>\12';
   Separ        = '<HR>\12<P>';
   Space        = '   ';
   BeginArrow   = '==>';
   EndArrow     = '<==';
   ButtonIndex   = '[Index ';
   EndButton    = ']';

VAR

   NumIndex       : Value(CptIndex);
   NumRefDirecte  : Value(CptRefDirecte);
   IndexFileName  : FileName '.idx' Value(CptIndex) Extension;
   IndexFile      : FileDir FileName '.idx' Value(CptIndex) Extension;
   Ancre2IN  : '<A HREF="' FileName '.idx' Value(CptIndex) Extension '#'; 
   LinkParent : '<LINK HREF="' FileName Extension '" REL="CHILD">\12';

RULES

   Descripteurs:
	BEGIN
	Remove;
	NoTranslation;
	END;

   Renvois:
	BEGIN
	Remove;
	NoTranslation;
	END;

   Options:
	BEGIN
	Remove;
	NoTranslation;
	END;

   Index_table:
	BEGIN
	{ ajouter bouton vers la table d index suivante }
	IF Not First
	   BEGIN
	   Create Separ;
	   Create AncreRef;
	   Create IndexFileName;
	   Create BaliseF;
	   Create ButtonIndex;
	   Create NumIndex;
	   Create EndButton;
	   Create AncreFin;
	   Create Space;
	   Create EndOfFile;
	   END;
        ChangeMainFile IndexFile;
        Create StartOfFile1;
	Create StartOfFile2;
	Create '<TITLE>';
	Create IndexFileName;
	Create '</TITLE>\12';
	Create LinkParent;
	Create EndOfHead;
	Create Alphabet1;
	Create Alphabet2;
	Create Alphabet3;
	Create Alphabet4;
	Create Alphabet5;
	Create Alphabet6;
	Create Alphabet7;
	IF Last
	   Create EndOfFile After;
	END;

  First Marque_Index:
	BEGIN
 	Create AncreDef Before;
	Create RefId Before;
	Create BaliseF Before;
	Create AncreFin After;
   	END;

  Second Marque_Index:
	BEGIN
	END;

  Titre_Index:
        BEGIN
	Create '\12<H1>';
	Create '</H1>\12' After;
        END;

  Intro_Index:
        BEGIN
	Create '\12<DL>';
	Create '</DL>\12' After;
        END;

   Titre_Car :
	BEGIN
	Create '\12<HR><H2><a name="Thumb-';
	Create Content;
	Create  '">';
	Create  '</H2>' After;
	END;

   Car:
        BEGIN
        IF NOT First Create  '-' Before;
        END;

   Contenu_Car :
	BEGIN
	Create   '\12<UL>';
	Create   '\12</UL>\12' after;
	END;

   Elem_Index:
	BEGIN
	END;

   Entr\351e:
	BEGIN
	Create   '\12<LI>' Before;
	IF Referred 
	   BEGIN
	   Create  AncreDef Before;
	   Create  RefId Before;
	   Create  BaliseF Before;
	   END;
	Get Included Terme;
        IF Referred Create  AncreFin;
	END;

   Suite_entr\351e :
	BEGIN
	Create   '\12<UL>';
	Create   '\12</UL>\12' after;
	END;

   Suite_entr\351e1 :
	BEGIN
	Create   '\12<UL>';
	Create   '\12</UL>\12' after;
	END;

   Suite_entr\351e2 :
	BEGIN
	Create   '\12<UL>';
	Create   '\12</UL>\12' after;
	END;

   Terme:
        BEGIN

        END;

   Commentaire:
        BEGIN
	Create  ', \12<EM STYLE="color: #900">';
	Create  '</EM>' After;	
        END;

   Liste_des_Ref:
        BEGIN
	Create  ': \12' Before;
        END;

   Liste_crois\351e:
        BEGIN
        IF First Create  'see ' Before;
        IF NOT First Create  ', \12' Before;
        IF NOT First Create  'see also ' Before;
        END;

   RefDirecte :
	BEGIN
	IF NOT First Create  ', \12' Before;
	END;

   NoteNum:
	BEGIN
	Get PageNum Before;
	Create ' (note ' Before;
	Create ')' After;
	END;

   PageNum:
	BEGIN
	IF Force = Fort
	  BEGIN
	  Create  '<STRONG>';
	  Create  '</STRONG>' After;	
	  END;
	IF Force = Faible
	  BEGIN
	  Create  '<EM>';
	  Create  '</EM>' After;	
	  END;
	END;

   PageUnique:
	BEGIN
	Remove;
	IF Vers_marque
	  BEGIN
	  Create ' Ref' After;
	  END;
	Create NumRefDirecte After;
	Create AncreFin After;
	END;

   PageDebut:
	BEGIN
	Remove;
	IF Vers_marque
	  BEGIN
	  Create ' Ref' After;
	  END;
	Create NumRefDirecte After;
	Create AncreFin After;
	END;

   PageFin:
	BEGIN
	Remove;
	END;

   RefCrois\351e :
	BEGIN
	IF NOT First Create  ', \12' Before;
	END;

   RefCr :
        BEGIN
	  Create  Ancre2IN;
	  Create  Referred RefId;
	  Create  BaliseF;
	  Create  Referred Terme; 
	  Create  AncreFin After;
        END;

ATTRIBUTES

   Vers_marque:
        BEGIN
	  Create AncreRef;
	  Create Referred FileName;
	  Create Extension;
	  Create '#' Before;
	  Create Referred RefId;
	  Create BaliseF;
	END;

   Vers_marque_fin:
        BEGIN
	END;
			   
   Niveau = Romain :
	BEGIN
	END;

   Niveau = Gras :
	BEGIN
	Create  '<B>';
	Create  '</B>' After;	
	END;

   Niveau = Italique :
	BEGIN
	Create  '<I>';
	Create  '</I>' After;	
	END;

   Niveau = ItalGras :
	BEGIN
	Create  '<TT>';
	Create  '</TT>' After;	
	END;

   Valeur = faible:
        BEGIN
	Create  '<EM>';
	Create  '</EM>' After;	
        END;

   Valeur = moyenne:
        BEGIN
        END;

   Valeur = forte:
        BEGIN
	Create  '<STRONG>';
	Create  '</STRONG>' After;	
        END;

PRESENTATION

   Style = Bold:
	BEGIN
	Create '<B> ';
	Create '</B>' After;	
	END;

   Style = Italics:
	BEGIN
	Create '<I> ';
	Create '</I>' After;	
	END;

   Font = Courier:
	BEGIN
	Create '<TT>';
	Create '</TT>' After;	
	END;

END
