From bdb99d765dc973abca7bb61ab5dcd71f6e5eeada Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Adjemian=20=28Ry=C3=BBk=29?= Date: Fri, 25 Mar 2022 10:02:40 +0100 Subject: [PATCH] Add theorem environments (with counters) --- assets/css/stylesheet-blog.css | 14 +++- assets/css/theorems-fr.css | 130 +++++++++++++++++++++++++++++++++ 2 files changed, 140 insertions(+), 4 deletions(-) create mode 100644 assets/css/theorems-fr.css diff --git a/assets/css/stylesheet-blog.css b/assets/css/stylesheet-blog.css index 5c2c570..3ac8ba9 100644 --- a/assets/css/stylesheet-blog.css +++ b/assets/css/stylesheet-blog.css @@ -10,7 +10,6 @@ src: url(../fonts/Quicksand/Quicksand-Regular.ttf); font-weight: normal; } - @font-face { font-display: swap; font-family: Quicksand; @@ -305,6 +304,13 @@ body { max-width: 1065px; padding: 1em; text-align: justify; + counter-reset: theorem; + counter-reset: definition; + counter-reset: lemma; + counter-reset: corollary; + counter-reset: proposition; + counter-reset: property; + counter-reset: assumption; } code { background-color: #fdf6e3; @@ -373,9 +379,9 @@ h1, h2, h3, h4, h5, h6, ul { } p { - margin-top: 0px; - margin-bottom: 0px; - -moz-hyphens: auto; + margin-top: 12px; + margin-bottom: 12px; + -moz-hyphens: auto; } .figure { diff --git a/assets/css/theorems-fr.css b/assets/css/theorems-fr.css new file mode 100644 index 0000000..50b18dd --- /dev/null +++ b/assets/css/theorems-fr.css @@ -0,0 +1,130 @@ +.theorem { + display: block; + width:90%; + margin:30px auto; + font-style: italic; + counter-increment: theorem; +} +.theorem:before { + content: "Théorème " counter(theorem) "."; + font-weight: bold; + font-style: normal; +} +.theorem p:first-child { + display: inline; +} + + +.lemma { + display: block; + width:90%; + margin:30px auto; + font-style: italic; + counter-increment: lemma; +} +.lemma:before { + content: "Lemme " counter(lemma) "."; + font-weight: bold; + font-style: normal; +} +.lemma p:first-child { + display: inline; +} + +.corollary { + display: block; + width:90%; + margin:30px auto; + font-style: italic; + counter-increment: corollary; +} +.corollary:before { + content: "Corollaire " counter(corollary) "."; + font-weight: bold; + font-style: normal; +} +.corollary p:first-child { + display: inline; +} + +.proposition { + display: block; + width:90%; + margin:30px auto; + font-style: italic; + counter-increment: proposition; +} +.proposition:before { + content: "Proposition " counter(proposition) "."; + font-weight: bold; + font-style: normal; +} +.proposition p:first-child { + display: inline; +} + +.property { + display: block; + width:90%; + margin:30px auto; + font-style: italic; + counter-increment: property; +} +.property:before { + content: "Propriété " counter(property) "."; + font-weight: bold; + font-style: normal; +} +.property p:first-child { + display: inline; +} + +.assumption { + display: block; + width:90%; + margin:30px auto; + font-style: italic; + counter-increment: assumption; +} +.assumption:before { + content: "Hypothèse " counter(assumption) "."; + font-weight: bold; + font-style: normal; +} +.assumption p:first-child { + display: inline; +} + +.definition { + display: block; + width:90%; + margin:30px auto; + font-style: italic; + counter-increment: definition; +} +.definition:before { + content: "Définition " counter(definion) "."; + font-weight: bold; + font-style: normal; +} +.definition p:first-child { + display: inline; +} + +.proof { + display: block; + margin: 30px 0; + font-style: normal; +} +.proof:before { + content: "Preuve."; + font-style: italic; +} +.proof:after { + content: "\25FC"; + float:right; + margin-top: -35px; +} +.proof p:first-child { + display: inline; +}