commit: ccfb02033ecc5f5976742296dd404b9f4df921b3
parent: ee74a0e8315964dfb4425e3415486cc4718c1c5c
author: Chris Noxz <chris@noxz.tech>
date: Sun, 22 Sep 2019 09:46:12 +0200
Fix some mathematics formatting
2 files changed, 22 insertions(+), 23 deletions(-)
diff --git a/noxz.tech/guides/mathematics/index.md b/noxz.tech/guides/mathematics/index.md
@@ -25,7 +25,7 @@ It's common knowledge that every even number (numbers ending with an even
number) is divisible by 2. This is because even numbers are multiples of 2. In
short, if a number ends with either 0, 2, 4, 6 or 8 it is divisible by 2.
-Say we have a number
+Say we have a three digit number
{- class="math"}{- class="variable"}xyz{--}{--}, where
{- class="math"}{- class="variable"}x{--}{--} represents the number of
hundreds,
@@ -33,7 +33,7 @@ Say we have a number
{- class="math"}{- class="variable"}z{--}{--} the number of ones. This number
can be represented as
{- class="math"}
-..{- class="equation"}
+..{- class="expression"}
....{-}100{--}
....{- class="variable"}x{--}
....{- class="operator"}+{--}
@@ -45,14 +45,14 @@ Say we have a number
{--}. If {- class="math"}{- class="variable"}z{--}{--} is divisible by 2 we can
represent it as an even number
{- class="math"}
-..{- class="equation"}
+..{- class="expression"}
....{-}2{--}
....{- class="variable"}n{--}
..{--}
{--}, like so:
{- class="math block"}
-..{- class="equation"}
+..{- class="expression"}
....{-}100{--}
....{- class="variable"}x{--}
....{- class="operator"}+{--}
@@ -63,7 +63,7 @@ Say we have a number
....{- class="variable"}n{--}
..{--}
..{- class="operator"}={--}
-..{- class="equation"}
+..{- class="expression"}
....{-}2{--}
....{- class="fenced parenthesis"}
......{-}({--}
@@ -81,13 +81,13 @@ Say we have a number
{- class="math block"}
..{- class="operator"}⇒{--}
-..{- class="equation"}
+..{- class="expression"}
....{-}2{--}
....{- class="operator"}∣{--}
....{- class="variable"}xyz{--}
..{--}
..{- class="operator"}⇔{--}
-..{- class="equation"}
+..{- class="expression"}
....{-}2{--}
....{- class="operator"}∣{--}
....{- class="variable"}z{--}
diff --git a/noxz.tech/pub/style.css b/noxz.tech/pub/style.css
@@ -255,8 +255,6 @@ ul.repo-log li .log-date {
/* math extensions (alternative to MathML) */
.math {
- font-family : monospace;
- font-size : 1.1em;
}
.math.block {
@@ -275,18 +273,12 @@ ul.repo-log li .log-date {
}
.math .variable {
- vertical-align : middle;
font-style : italic;
padding : 0;
}
-.math .equation {
- vertical-align : middle;
- padding : 0 2px;
-}
-
-.math .equation>* {
- vertical-align : middle;
+.math .expression {
+ padding : 0;
}
.math .operator {
@@ -297,10 +289,17 @@ ul.repo-log li .log-date {
"Asana Math", "Cambria Math", "Lucida Bright Math",
"Minion Math", STIXGeneral, STIXSizeOneSym, Symbol,
"Times New Roman", serif;
- font-size : 0.9em;
- padding : 0 2px;
+ padding : 0 0.35em;
+}
+
+/*
+.math.block .operator,
+.math.block .expression,
+.math.block .expression>*,
+.math.block .variable {
vertical-align : middle;
}
+*/
.math .fenced {
padding : 0 0.4em;
@@ -313,8 +312,8 @@ ul.repo-log li .log-date {
}
.math .fenced.parenthesis {
- border-radius : 3px;
- border : 1px solid #444;
+ border-radius : 0.3em;
+ border : 0.1em solid #444;
border-top : none;
border-bottom : none;
}
@@ -322,7 +321,7 @@ ul.repo-log li .log-date {
.math .fraction,
.math .fraction>span:first-child,
.math .fraction>span:last-child {
- padding : 0 2px;
+ padding : 0 0.1em;
vertical-align : middle;
}
@@ -333,5 +332,5 @@ ul.repo-log li .log-date {
.math .fraction>span:last-child {
display : block;
- border-top : 1px solid #444;
+ border-top : 0.1em solid #444;
}