Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
logiciel:internet:dokuwiki:plugins:numberedheadings:start [2021/04/02 18:06] – [Numérotation des titres par CSS uniquement (remplace numberedheadings)] admin | logiciel:internet:dokuwiki:plugins:numberedheadings:start [2022/08/13 22:27] (Version actuelle) – modification externe 127.0.0.1 | ||
---|---|---|---|
Ligne 8: | Ligne 8: | ||
Placez-le dans l'un des CSS du répertoire user de votre thème (ainsi qu'à nouveau dans le print.css pour avoir la numérotation lors de l' | Placez-le dans l'un des CSS du répertoire user de votre thème (ainsi qu'à nouveau dans le print.css pour avoir la numérotation lors de l' | ||
- | < | + | < |
- | /* Automatically numbering Headings | + | /* Numérotation automatique des titres |
https:// | https:// | ||
Ligne 26: | Ligne 26: | ||
h2.nocount: | h2.nocount: | ||
- | /* Automatically numbering Table of Contents | + | /* Numérotation automatique de la table des matières |
https:// | https:// | ||
.dokuwiki #dw__toc ul ul { | .dokuwiki #dw__toc ul ul { | ||
Ligne 80: | Ligne 80: | ||
===== Installation ===== | ===== Installation ===== | ||
- | ==== Modification pour exclure de la numérotation le premier h1 (titre de la page) ==== | ||
- | <code - [dokuwiki]/ | ||
- | .dokuwiki #content {counter-reset: | ||
- | .dokuwiki # | ||
- | .dokuwiki # | ||
- | .dokuwiki #dw__toc h3: | ||
- | |||
- | .dokuwiki #content h1, .dokuwiki ul.toc li.level1 {counter-reset: | ||
- | .dokuwiki #content h2, .dokuwiki ul.toc li.level2 {counter-reset: | ||
- | .dokuwiki #content h3, .dokuwiki ul.toc li.level3 {counter-reset: | ||
- | .dokuwiki #content h4, .dokuwiki ul.toc li.level4 {counter-reset: | ||
- | .dokuwiki #content h5, .dokuwiki ul.toc li.level5 {} | ||
- | |||
- | .dokuwiki #content h1:before, | ||
- | .dokuwiki ul.toc li.level1 a:before { | ||
- | content: counter(level1) " "; | ||
- | counter-increment: | ||
- | } | ||
- | .dokuwiki #content h1.sectionedit1: | ||
- | .dokuwiki ul.toc li.level1: | ||
- | content: none; | ||
- | } | ||
- | .dokuwiki #content h2:before, | ||
- | .dokuwiki ul.toc li.level2 a:before { | ||
- | content: counter(level1) " | ||
- | counter-increment: | ||
- | } | ||
- | .dokuwiki #content h3:before, | ||
- | .dokuwiki ul.toc li.level3 a:before { | ||
- | content: counter(level1) " | ||
- | counter-increment: | ||
- | } | ||
- | .dokuwiki #content h4:before, | ||
- | .dokuwiki ul.toc li.level4 a:before { | ||
- | content: counter(level1) " | ||
- | counter-increment: | ||
- | } | ||
- | .dokuwiki #content h5:before, | ||
- | .dokuwiki ul.toc li.level5 a:before { | ||
- | content: counter(level1) " | ||
- | counter-increment: | ||
- | } | ||
- | </ | ||
- | |||
- | === Variante === | ||
- | |||
- | Placez le fichier suivant dans l'un des CSS de votre thème (template) (ainsi que dans le **print.css** pour avoir la numérotation lors de l' | ||
- | |||
- | Pour le thème monobook : | ||
- | <code - / | ||
- | /* | ||
- | Place for user defined CSS rules (screen media) - this file can safely be | ||
- | | ||
- | |||
- | Note: All example files are delivered with the " | ||
- | sure your changes do not get overwritten when updating the template. | ||
- | Just remove the " | ||
- | */ | ||
- | |||
- | /* headlines */ | ||
- | div#content .dokuwiki h1, | ||
- | div#content .dokuwiki h2 { | ||
- | font-weight: | ||
- | } | ||
- | div#content .dokuwiki h3, | ||
- | div#content .dokuwiki h4, | ||
- | div#content .dokuwiki h5, | ||
- | div#content .dokuwiki h6 { | ||
- | font-weight: | ||
- | } | ||
- | |||
- | div#content .dokuwiki {counter-reset: | ||
- | .dokuwiki # | ||
- | .dokuwiki # | ||
- | .dokuwiki #dw__toc h3: | ||
- | |||
- | div#content .dokuwiki h1, .toc-body ul.toc li.level1 {counter-reset: | ||
- | div#content .dokuwiki h2, .toc-body ul.toc li.level2 {counter-reset: | ||
- | div#content .dokuwiki h3, .toc-body ul.toc li.level3 {counter-reset: | ||
- | div#content .dokuwiki h4, .toc-body ul.toc li.level4 {counter-reset: | ||
- | div#content .dokuwiki h5, .toc-body ul.toc li.level5 {} | ||
- | |||
- | div#content .dokuwiki h1:before, | ||
- | .dokuwiki ul.toc li.level1 a:before { | ||
- | content: counter(level1) ". "; | ||
- | counter-increment: | ||
- | } | ||
- | div#content .dokuwiki h1.sectionedit1: | ||
- | .dokuwiki ul.toc li.level1 a:before { | ||
- | content: none; | ||
- | } | ||
- | div#content .dokuwiki h2:before, | ||
- | .dokuwiki ul.toc li.level2 a:before { | ||
- | content: counter(level2) ". "; | ||
- | counter-increment: | ||
- | } | ||
- | div#content .dokuwiki h3:before, | ||
- | .dokuwiki ul.toc li.level3 a:before { | ||
- | content: counter(level2) " | ||
- | counter-increment: | ||
- | } | ||
- | div#content .dokuwiki h4:before, | ||
- | .dokuwiki ul.toc li.level4 a:before { | ||
- | content: counter(level2) " | ||
- | counter-increment: | ||
- | } | ||
- | div#content .dokuwiki h5:before, | ||
- | .dokuwiki ul.toc li.level5 a:before { | ||
- | content: counter(level2) " | ||
- | counter-increment: | ||
- | } | ||
- | </ | ||
===== Configuration ===== | ===== Configuration ===== | ||
- | |||
- | Ce CSS fonctionne avec monobook :<code - screen.css> | ||
- | div.dokuwiki {counter-reset: | ||
- | div.dokuwiki # | ||
- | div.dokuwiki # | ||
- | div.dokuwiki #dw__toc h3: | ||
- | |||
- | div.dokuwiki h1, .toc-body ul.toc li.level1 {counter-reset: | ||
- | div.dokuwiki h2, .toc-body ul.toc li.level2 {counter-reset: | ||
- | div.dokuwiki h3, .toc-body ul.toc li.level3 {counter-reset: | ||
- | div.dokuwiki h4, .toc-body ul.toc li.level4 {counter-reset: | ||
- | div.dokuwiki h5, .toc-body ul.toc li.level5 {} | ||
- | |||
- | div.dokuwiki h1:before, | ||
- | div.dokuwiki ul.toc li.level1 a:before { | ||
- | content: counter(level1) ". "; | ||
- | counter-increment: | ||
- | } | ||
- | div.dokuwiki h1.sectionedit1: | ||
- | div.dokuwiki ul.toc li.level1 a:before { | ||
- | content: none; | ||
- | } | ||
- | div.dokuwiki h2:before, | ||
- | div.dokuwiki ul.toc li.level2 a:before { | ||
- | content: counter(level1) " | ||
- | counter-increment: | ||
- | } | ||
- | div.dokuwiki h3:before, | ||
- | div.dokuwiki ul.toc li.level3 a:before { | ||
- | content: counter(level1) " | ||
- | counter-increment: | ||
- | } | ||
- | div.dokuwiki h4:before, | ||
- | div.dokuwiki ul.toc li.level4 a:before { | ||
- | content: counter(level1) " | ||
- | counter-increment: | ||
- | } | ||
- | div.dokuwiki h5:before, | ||
- | div.dokuwiki ul.toc li.level5 a:before { | ||
- | content: counter(level1) " | ||
- | counter-increment: | ||
- | } | ||
- | </ | ||
===== Utilisation ===== | ===== Utilisation ===== |