diff --git a/ecrire/inc_texte.php3 b/ecrire/inc_texte.php3 index 9be872f30142cec6277bd2bd7c773623d5c2615a..f943c36c3a07000c21f440b46ba0f0ab885a8ebf 100644 --- a/ecrire/inc_texte.php3 +++ b/ecrire/inc_texte.php3 @@ -692,10 +692,14 @@ function traiter_tableau($bloc) { // Gestion de la premiere ligne : if ($l == 1) { - // - <caption> sous forme de ||xxx|| en premiere ligne - if (preg_match(',^\|\|([^|]*)\|$,ms', $ligne, $caption)) { - $debut_table .= "<caption>".$caption[1]."</caption>\n"; + // - <caption> et summary dans la premiere ligne : + // || caption | summary || (|summary est optionnel) + if (preg_match(',^\|\|([^|]*)(\|(.*))?\|$,ms', $ligne, $cap)) { $l = 0; + if ($caption = trim($cap[1])) + $debut_table .= "<caption>".$caption."</caption>\n"; + if ($summary = trim($cap[3])) + $summary = ' summary="'.entites_html($summary).'"'; } // - <thead> sous la forme |{{titre}}|{{titre}}| // Attention thead oblige a avoir tbody @@ -732,7 +736,7 @@ function traiter_tableau($bloc) { } } - return "\n\n</no p><table class=\"spip\">\n" + return "\n\n</no p><table class=\"spip\"$summary>\n" . $debut_table . "<tbody>\n" . join ('', $html) diff --git a/ecrire/spip_style.php3 b/ecrire/spip_style.php3 index fd637f8830a58e05e221fff67d7674879d6edbec..c80e59080a76bc52985c559c97e4270f1c5519c9 100644 --- a/ecrire/spip_style.php3 +++ b/ecrire/spip_style.php3 @@ -1354,7 +1354,9 @@ table.spip { } table.spip caption{ - caption-side: top; + caption-side: top; /* bottom */ + text-align:center; + background-color: #FCF4D0; } table.spip tr.row_first { diff --git a/spip_style.css b/spip_style.css index a683aa2a884b7200678e10bae6652abab8c41383..21eae69b65943d99afd5c1559f042d3258ef310b 100644 --- a/spip_style.css +++ b/spip_style.css @@ -58,6 +58,8 @@ table.spip { table.spip caption{ caption-side: top; /* bottom */ + text-align:center; + background-color: #FCF4D0; } table.spip tr.row_first {