# Utilisation de sed :
#
#   La commande s%regexp%texte% remplace regexp par texte dans une ligne.
#   N'importe quel autre caractre que % peut tre utilis.
#   Evidement, ni regexp ni texte ne doivent contenir ce caractre.
#
#   Attention : les "\" sont interprts.
#   Si on en utilise, il faudra les doubler.
#
#   regexp est une expression rgulire sed.
#   Les parties entre \(\) peuvent tre rcupr dans texte  l'aide de
#   \nombre
#   Ex : s%@chapter \(.*\)%\1%
#        avec la ligne : "@chapter toto"
#        donne la ligne : "toto"
#
#   Les saut de lignes doivent tre protges par un \
#   Sous emacs, remplacer tout les ^M par \
#   (M-% C-Q C-M RET \ RET !)
#
#   Pb "line too long" => couper les lignes
#

### Les url
s%@t{\(.*\)}%\
@ifhtml\
<a href="\1">\1</a>\
@end ifhtml\
%
s%@t{\(asn1@@rd\.francetelecom\.fr\)}%\
@ifhtml\
<a href="mailto:\1">\1</a>\
@end ifhtml\
%

### Les chapitres
s%@chapter \(.*\)$%@ifhtml\
<!--\
@end ifhtml\
@chapter \1\
@ifhtml\
-->\
  <!-- #BeginLibraryItem "/Library/barre_de_separation.lbi" -->\
  <table cellspacing="0" cellpadding="0" border="0">\
  <tr> \
    <td height="20" width="610"></td>\
  </tr>\
  <tr> \
    <td height="5" valign="top" width="610"><img src="/images/barre_separation.gif" width="610" height="5"></td>\
  </tr>\
  <tr> \
    <td height="10" valign="top" width="610"></td>\
  </tr>\
</table><!-- #EndLibraryItem --> <a name="\1"></a> \
  <table cellspacing="0" cellpadding="0" border="0" width="610">\
    <tr> \
      <td width="10" height="60" valign="middle"></td>\
      <td height="60" valign="middle" width="430"><font size="+3" color="#006666">\1</font></td>\
      <td width="20" height="60" valign="middle"></td>\
      <td width="150" height="60" align="right" valign="middle"> <a href="#top"><img src="/images/htdepage_fleche.gif" width="24" height="17" align="middle" border="0"></a> \
      </td>\
    </tr>\
  </table>\
  <table cellspacing="0" cellpadding="0" border="0" width="610">\
    <tr> \
      <td width="10" valign="top"></td>\
      <td valign="top" width="600"> \
@end ifhtml%

### Les fins de chapitre
s%@c ec%@ifhtml\
      </td>\
    </tr>\
  </table>\
<!-- #EndLibraryItem -->\
@end ifhtml%

### Les sections
s%@section \(.*\)$%@ifhtml\
<!--\
@end ifhtml\
@section \1\
@ifhtml\
-->\
<p><font size="+1" color="#006666">\1<br>\
<br></font>\
@end ifhtml%

### Les fins de section
#  s%@c es%@ifhtml\
#  \
#  @end ifhtml%


### Les items du menu
s%\* \(.*\)::%@ifhtml\
<img src="/images/pointvert.gif" align=middle width="15" height="18" border="0"><a href="#\1"><font size="-1">\1</font></a>\
@end ifhtml%

### Le dbut du menu
s%@menu%%
s%@c menu \(.*\)$%@ifhtml\
  <table cellspacing="0" cellpadding="0" border="0" width="610">\
    <tr> \
      <td height="20" colspan="2" valign="top" width="610"></td>\
    </tr>\
    <tr> \
      <td height="40" valign="top" width="460"> <img src="/images/trianglevert.gif" width="23" height="13" border="0"><a href="/en/tools/index.htm">\
      <font size="-1">Outils</font></a><img src="/images/trianglevert.gif" width="23" height="13" border="0">\
	<a href="/en/tools/emacs/index.htm"> \
        (X)Emacs mode</a><br>\
        <br>\
        </font><font size="+3" color="#006666">\1</font><br>\
@end ifhtml%

### La fin du menu
s%@end menu%@ifhtml\
</td>\
      <td width="150" height="40" valign="top"><br>\
      </td>\
    </tr>\
  </table>\
@end ifhtml%

### head
s%@c head%@ifhtml\
<BASE HREF="http://asn1.elibel.tm.fr/en/tools/emacs/">\
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">\
<html>\
<head>\
@end ifhtml%

### titre
s%@c title \(.*\)$%@ifhtml\
<title>\1</title>\
@end ifhtml%

### description
s%@c description \(.*\)$%@ifhtml\
<meta name="DESCRIPTION" content="\1">\
@end ifhtml%

### body
/@c body/ {
	    # ajoute le contenu du fichier
	    r elibel-body
	    # supprime la ligne (a placer apres "r")
	    d
	  }

### La fin du document
s%@c end-html%@ifhtml\
  <!-- #BeginLibraryItem "/Library/baseline.lbi" --> \
<table width="610" cellspacing="0" cellpadding="0" border="0">\
  <tr> \
    <td height="20" width="610"></td>\
  </tr>\
  <tr> \
    <td height="5" width="610"><img src="/images/barre_separation.gif" width="610" height="5"></td>\
  </tr>\
  <tr> \
    <td height="10" width="610"></td>\
  </tr>\
</table>\
<table width="610" cellspacing="0" cellpadding="0" border="0">\
  <tr> \
    <td width="34" valign="middle"><a href="mailto:asn1@rd.francetelecom.fr"><img src="/images/enveloppe.gif" width="34" height="13" name="mail" border="0" alt="[mailto:asn1@rd.francetelecom.fr]"></a></td>\
    <td width="66" valign="middle"><font size="-2">Webmestre</font></td>\
    <td width="15" valign="middle"><img src="/images/pointbleu_small.gif" width="15" height="12"></td>\
    <td width="65" valign="middle"><font size="-2">\
      29 / 7 / 99\
      </FONT></TD>\
    <TD width="280" valign="middle"></TD>\
    <TD height="20" width="150" valign="middle" align="right"><A href="#top"><IMG src="/images/htdepage.gif" width="150" height="17" border="0"></A></TD>\
  </TR>\
</TABLE>\
<MAP name="Navigation">\
    <AREA shape="rect" coords="9,8,140,27" href="/en/index.htm">\
    <AREA shape="rect" coords="114,36,142,51" alt="version francaise" href="/fr/outils/emacs/manual-utilisation.htm">\
    <AREA shape="rect" coords="47,38,102,50" href="/en/search/index.htm">\
    <AREA shape="rect" coords="8,39,37,51" href="/en/map.htm">\
  </MAP> \
</CENTER>\
</BODY>\
</HTML>\
@end ifhtml%
# Attention : </HTML> est utilise pour reperer la fin du document

