1#
2#
3# Mod�le "texte"
4#
5# Historique
6#   1998/06/15 : pda : conception
7#   1999/06/20 : pda : s�paration du langage HTML
8#   1999/07/02 : pda : simplification
9#   1999/07/25 : pda : int�gration des tableaux de droopy
10#
11
12#
13# Inclure les directives de formattage de base
14#
15
16inclure-tcl include/html/base.tcl
17
18###############################################################################
19# Proc�dures de conversion HTML sp�cifiques au mod�le
20###############################################################################
21
22proc htg_titre {} {
23    if [catch {set niveau [htg getnext]} v] then {error $v}
24    check-int $niveau
25    if [catch {set texte  [htg getnext]} v] then {error $v}
26    set texte "<H$niveau>$texte</H$niveau>"
27    return $texte
28}
29
30proc htg_partie {} {
31    global partie
32
33    if [catch {set id [htg getnext]} v] then {error $v}
34    if [catch {set texte [htg getnext]} v] then {error $v}
35    set texte [nettoyer-html $texte]
36
37    switch -exact $id {
38	banniere	-
39	titrepage	{
40	    regsub -all "\n" $texte "<BR>\n" texte
41	}
42	default {
43	    regsub -all "\n\n+" $texte "<P>" texte
44	}
45    }
46
47    set partie($id) $texte
48    return {}
49}
50
51###############################################################################
52# Proc�dures du bandeau, communes � tous les mod�les
53###############################################################################
54
55inclure-tcl include/html/bandeau.tcl
56