Documentation du Dr FRAPPE

Ce wiki regroupe les résultats de mes expériences en informatique accumulés au cours de mes recherches sur le net.

Dans la mesure du possible, j'ai cité mes sources ; il en manque certainement… :-)

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
logiciel:internet:dokuwiki:plugins:numberedheadings:start [2021/02/27 15:17] adminlogiciel: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'impression) 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'impression)
 +<code css [dokuwiki]/lib/tpl/THEME/user/screen.css>
 +/* Numérotation automatique des titres via CSS 
 +https://philarcher.org/diary/2013/headingnumbers/ */
  
-Pour le modèle **default** :<code php [dokuwiki]/lib/tpl/default/user/screen.css> 
-.dokuwiki .page {counter-reset: level1;} 
-.dokuwiki #dw__toc:before, .dokuwiki #dw__toc:after {counter-reset: level1; content: "";} 
-.dokuwiki #dw__toc h3:before{content: ""} 
-      
-.dokuwiki .page h1, .dokuwiki ul.toc li.level1 {counter-reset: level2;} 
-.dokuwiki .page h2, .dokuwiki ul.toc li.level2 {counter-reset: level3;} 
-.dokuwiki .page h3, .dokuwiki ul.toc li.level3 {counter-reset: level4;} 
-.dokuwiki .page h4, .dokuwiki ul.toc li.level4 {counter-reset: level5;} 
-.dokuwiki .page h5, .dokuwiki ul.toc li.level5 {} 
-      
-.dokuwiki .page h1:before, 
-.dokuwiki ul.toc li.level1 a:before { 
-    content: counter(level1) " "; 
-    counter-increment: level1; 
-} 
-.dokuwiki .page h2:before, 
-.dokuwiki ul.toc li.level2 a:before { 
-    content: counter(level1) "." counter(level2) " "; 
-    counter-increment: level2; 
-} 
-.dokuwiki .page h3:before, 
-.dokuwiki ul.toc li.level3 a:before { 
-    content: counter(level1) "." counter(level2) "." counter(level3) " "; 
-    counter-increment: level3; 
-} 
-.dokuwiki .page h4:before, 
-.dokuwiki ul.toc li.level4 a:before { 
-    content: counter(level1) "." counter(level2) "." counter(level3) "." counter(level4) " "; 
-    counter-increment: level4; 
-} 
-.dokuwiki .page h5:before, 
-.dokuwiki ul.toc li.level5 a:before { 
-    content: counter(level1) "." counter(level2) "." counter(level3) "." counter(level4) "." counter(level5) " "; 
-    counter-increment: level5; 
-} 
-</code> 
- 
-Pour les autres thèmes, il faut remplacer chaque occurrence de .page par la "boîte entourant le contenu" du thème ("#content" ou similaire). 
- 
-Par exemple pour le thème vector :<code php lib/tpl/vector/user/screen.css> 
-/* Automatically numbering Headings via CSS  
-https://philarcher.org/diary/2013/headingnumbers/ */ 
 body {counter-reset: h2} body {counter-reset: h2}
 h2 {counter-reset: h3} h2 {counter-reset: h3}
Ligne 66: Ligne 26:
 h2.nocount:before, h3.nocount:before, h4.nocount:before, h5.nocount:before, h6.nocount:before, #dw__toc h3:before, #panel h5:before { content: ""; counter-increment: none } h2.nocount:before, h3.nocount:before, h4.nocount:before, h5.nocount:before, h6.nocount:before, #dw__toc h3:before, #panel h5:before { content: ""; counter-increment: none }
    
-/* Automatically numbering Table of Contents (TOC) via CSS+/* Numérotation automatique de la table des matières (TOC) via CSS
 https://www.freecodecamp.org/news/numbering-with-css-counters/ */ https://www.freecodecamp.org/news/numbering-with-css-counters/ */
-#dw__toc ul ul {+.dokuwiki #dw__toc ul ul {
   list-style-type: none;   list-style-type: none;
   counter-reset: css-counters 0; /* intializes counter, set -1 for zero-based counters */   counter-reset: css-counters 0; /* intializes counter, set -1 for zero-based counters */
 } }
    
-#dw__toc ul ul li div.li:before {+.dokuwiki #dw__toc ul ul li div.li:before {
   counter-increment: css-counters;   counter-increment: css-counters;
   content: counters(css-counters, ".") " "; /* generates inherited counters from parents */   content: counters(css-counters, ".") " "; /* generates inherited counters from parents */
 } }
-</code> 
  
-<code - /doc/lib/tpl/monobook/user/screen.css> +/* Styles des titres */
-.dokuwiki #content {counter-reset: level1;} +
-.dokuwiki #dw__toc:before, .dokuwiki #dw__toc:after {counter-reset: level1; content: "";+
-.dokuwiki #dw__toc h3:before{content: ""+
- +
-.dokuwiki #content h1, .dokuwiki ul.toc li.level1 {counter-reset: level2;} +
-.dokuwiki #content h2, .dokuwiki ul.toc li.level2 {counter-reset: level3;} +
-.dokuwiki #content h3, .dokuwiki ul.toc li.level3 {counter-reset: level4;} +
-.dokuwiki #content h4, .dokuwiki ul.toc li.level4 {counter-reset: level5;} +
-.dokuwiki #content h5, .dokuwiki ul.toc li.level5 {} +
- +
-.dokuwiki #content h1:before, +
-.dokuwiki ul.toc li.level1 a:before { +
-    content: counter(level1) " "; +
-    counter-increment: level1; +
-+
-.dokuwiki #content h2:before, +
-.dokuwiki ul.toc li.level2 a:before { +
-    content: counter(level1) "." counter(level2) " "; +
-    counter-increment: level2; +
-+
-.dokuwiki #content h3:before, +
-.dokuwiki ul.toc li.level3 a:before { +
-    content: counter(level1) "." counter(level2) "." counter(level3) " "; +
-    counter-increment: level3; +
-+
-.dokuwiki #content h4:before, +
-.dokuwiki ul.toc li.level4 a:before { +
-    content: counter(level1) "." counter(level2) "." counter(level3) "." counter(level4) " "; +
-    counter-increment: level4; +
-+
-.dokuwiki #content h5:before, +
-.dokuwiki ul.toc li.level5 a:before { +
-    content: counter(level1) "." counter(level2) "." counter(level3) "." counter(level4) "." counter(level5) " "; +
-    counter-increment: level5; +
-+
-</code> +
-</WRAP> +
- +
-===== Pré-requis ===== +
- +
-===== Installation ===== +
- +
-==== Modification pour exclure de la numérotation le premier h1 (titre de la page) ==== +
- +
-<code - [dokuwiki]/lib/tpl/monobook/user/screen.css> +
-.dokuwiki #content {counter-reset: level1;} +
-.dokuwiki #dw__toc:before, +
-.dokuwiki #dw__toc:after {counter-reset: level1; content: "";+
-.dokuwiki #dw__toc h3:before{content: ""+
-  +
-.dokuwiki #content h1, .dokuwiki ul.toc li.level1 {counter-reset: level2;} +
-.dokuwiki #content h2, .dokuwiki ul.toc li.level2 {counter-reset: level3;} +
-.dokuwiki #content h3, .dokuwiki ul.toc li.level3 {counter-reset: level4;} +
-.dokuwiki #content h4, .dokuwiki ul.toc li.level4 {counter-reset: level5;} +
-.dokuwiki #content h5, .dokuwiki ul.toc li.level5 {} +
-  +
-.dokuwiki #content h1:before, +
-.dokuwiki ul.toc li.level1 a:before { +
-    content: counter(level1) " "; +
-    counter-increment: level1; +
-+
-.dokuwiki #content h1.sectionedit1:before, +
-.dokuwiki ul.toc li.level1:first-child a:before { +
-    content: none; +
-+
-.dokuwiki #content h2:before, +
-.dokuwiki ul.toc li.level2 a:before { +
-    content: counter(level1) "." counter(level2) " "; +
-    counter-increment: level2; +
-+
-.dokuwiki #content h3:before, +
-.dokuwiki ul.toc li.level3 a:before { +
-    content: counter(level1) "." counter(level2) "." counter(level3) " "; +
-    counter-increment: level3; +
-+
-.dokuwiki #content h4:before, +
-.dokuwiki ul.toc li.level4 a:before { +
-    content: counter(level1) "." counter(level2) "." counter(level3) "." counter(level4) " "; +
-    counter-increment: level4; +
-+
-.dokuwiki #content h5:before, +
-.dokuwiki ul.toc li.level5 a:before { +
-    content: counter(level1) "." counter(level2) "." counter(level3) "." counter(level4) "." counter(level5) " "; +
-    counter-increment: level5; +
-+
-</code> +
- +
-=== 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'impression) ou dans un **userstyle.css** dans votre répertoire **./conf** : +
- +
-Pour le thème monobook : +
-<code - /doc/lib/tpl/monobook/user/screen.css> +
-/* +
-   Place for user defined CSS rules (screen media) - this file can safely be +
-   preserved when updating. See README for details. +
- +
-   Note: All example files are delivered with the ".dist" extensions to make +
-         sure your changes do not get overwritten when updating the template. +
-         Just remove the ".dist" extension to use them. +
-*/ +
- +
-/* headlines */+
 div#content .dokuwiki h1, div#content .dokuwiki h1,
 div#content .dokuwiki h2 { div#content .dokuwiki h2 {
   font-weight: bold;   font-weight: bold;
 } }
 +
 div#content .dokuwiki h3, div#content .dokuwiki h3,
 div#content .dokuwiki h4, div#content .dokuwiki h4,
Ligne 194: Ligne 51:
 } }
  
-div#content .dokuwiki {counter-reset: level1;} +div#content .dokuwiki h1 { 
-.dokuwiki #dw__toc:before, +  font-size160%;
-.dokuwiki #dw__toc:after {counter-reset: level1; content: "";+
-.dokuwiki #dw__toc h3:before{content: ""+
-  +
-div#content .dokuwiki h1, .toc-body ul.toc li.level1 {counter-reset: level2;} +
-div#content .dokuwiki h2, .toc-body ul.toc li.level2 {counter-reset: level3;} +
-div#content .dokuwiki h3, .toc-body ul.toc li.level3 {counter-reset: level4;} +
-div#content .dokuwiki h4, .toc-body ul.toc li.level4 {counter-reset: level5;} +
-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-incrementlevel1;+
 } }
-div#content .dokuwiki h1.sectionedit1:before, + 
-.dokuwiki ul.toc li.level1 a:before +div#content .dokuwiki h2 
-    contentnone;+  font-size140%;
 } }
-div#content .dokuwiki h2:before, + 
-.dokuwiki ul.toc li.level2 a:before +div#content .dokuwiki h3 
-    content: counter(level2) ". "; +  font-size132%;
-    counter-incrementlevel2;+
 } }
-div#content .dokuwiki h3:before, + 
-.dokuwiki ul.toc li.level3 a:before +div#content .dokuwiki h4 
-    content: counter(level2) "." counter(level3) ". "; +  font-size116%;
-    counter-incrementlevel3;+
 } }
-div#content .dokuwiki h4:before, + 
-.dokuwiki ul.toc li.level4 a:before +div#content .dokuwiki h5 
-    content: counter(level2) "." counter(level3) "." counter(level4) ". "; +  font-size100%;
-    counter-incrementlevel4;+
 } }
-div#content .dokuwiki h5:before, + 
-.dokuwiki ul.toc li.level5 a:before +div#content .dokuwiki h6 
-    content: counter(level2) "." counter(level3) "." counter(level4) "." counter(level5) ". "; +  font-size80%
-    counter-incrementlevel5+}</code> 
-} + 
-</code>+ 
 +===== Pré-requis ===== 
 + 
 +===== Installation ===== 
 + 
  
 ===== Configuration ===== ===== Configuration =====
- 
-Ce CSS fonctionne avec monobook :<code - screen.css> 
-div.dokuwiki {counter-reset: level1;} 
-div.dokuwiki #dw__toc:before, 
-div.dokuwiki #dw__toc:after {counter-reset: level1; content: "";} 
-div.dokuwiki #dw__toc h3:before{content: ""} 
-  
-div.dokuwiki h1, .toc-body ul.toc li.level1 {counter-reset: level2;} 
-div.dokuwiki h2, .toc-body ul.toc li.level2 {counter-reset: level3;} 
-div.dokuwiki h3, .toc-body ul.toc li.level3 {counter-reset: level4;} 
-div.dokuwiki h4, .toc-body ul.toc li.level4 {counter-reset: level5;} 
-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: level1; 
-} 
-div.dokuwiki h1.sectionedit1:before, 
-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(level2) ". "; 
-    counter-increment: level2; 
-} 
-div.dokuwiki h3:before, 
-div.dokuwiki ul.toc li.level3 a:before { 
-    content: counter(level1) "." counter(level2) "." counter(level3) ". "; 
-    counter-increment: level3; 
-} 
-div.dokuwiki h4:before, 
-div.dokuwiki ul.toc li.level4 a:before { 
-    content: counter(level1) "." counter(level2) "." counter(level3) "." counter(level4) ". "; 
-    counter-increment: level4; 
-} 
-div.dokuwiki h5:before, 
-div.dokuwiki ul.toc li.level5 a:before { 
-    content: counter(level1) "." counter(level2) "." counter(level3) "." counter(level4) "." counter(level5) ". "; 
-    counter-increment: level5; 
-} 
-</code> 
  
 ===== Utilisation ===== ===== Utilisation =====