From: Vladimír Vondruš Date: Sun, 15 Sep 2024 21:00:40 +0000 (+0200) Subject: m.math: expand the visual test with inline math. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?a=commitdiff_plain;h=e7a339d0e902dd831fcc40d76c534712afe89509;p=blog.git m.math: expand the visual test with inline math. The CSS classes and DOM nodes are placed different but it should look exactly the same. --- diff --git a/doc/plugins/math-and-code-test.rst b/doc/plugins/math-and-code-test.rst index 61cab170..b40214f4 100644 --- a/doc/plugins/math-and-code-test.rst +++ b/doc/plugins/math-and-code-test.rst @@ -30,11 +30,27 @@ Test :breadcrumb: {filename}/plugins.rst Plugins {filename}/plugins/math-and-code.rst Math and code +.. role:: math-default(math) + :class: m-default +.. role:: math-primary(math) + :class: m-primary +.. role:: math-success(math) + :class: m-success +.. role:: math-warning(math) + :class: m-warning +.. role:: math-danger(math) + :class: m-danger +.. role:: math-info(math) + :class: m-info +.. role:: math-dim(math) + :class: m-dim + Math ==== First is colored except :math:`c^2`, second is colored globally, third is -colored globally with overrides except for :math:`c^2`. +colored globally with overrides except for :math:`c^2`. Second row in each is +the same but inline instead of a block. .. container:: m-row @@ -44,6 +60,10 @@ colored globally with overrides except for :math:`c^2`. {\color{m-default} a^2 + b^2 =} ~ c^2 + .. class:: m-text-center m-noindent + + :math:`{\color{m-default} a^2 + b^2 =} ~ c^2` + .. container:: m-col-m-4 .. math:: @@ -51,6 +71,10 @@ colored globally with overrides except for :math:`c^2`. a^2 + b^2 = c^2 + .. class:: m-text-center m-noindent + + :math-default:`a^2 + b^2 = c^2` + .. container:: m-col-m-4 .. math:: @@ -58,12 +82,20 @@ colored globally with overrides except for :math:`c^2`. {\color{m-default} a^2 + b^2 =} ~ c^2 + .. class:: m-text-center m-noindent + + :math-danger:`{\color{m-default} a^2 + b^2 =} ~ c^2` + .. container:: m-col-m-4 .. math:: {\color{m-primary} a^2 + b^2 =} ~ c^2 + .. class:: m-text-center m-noindent + + :math:`{\color{m-primary} a^2 + b^2 =} ~ c^2` + .. container:: m-col-m-4 .. math:: @@ -71,6 +103,10 @@ colored globally with overrides except for :math:`c^2`. a^2 + b^2 = c^2 + .. class:: m-text-center m-noindent + + :math-primary:`a^2 + b^2 = c^2` + .. container:: m-col-m-4 .. math:: @@ -78,12 +114,20 @@ colored globally with overrides except for :math:`c^2`. {\color{m-primary} a^2 + b^2 =} ~ c^2 + .. class:: m-text-center m-noindent + + :math-danger:`{\color{m-primary} a^2 + b^2 =} ~ c^2` + .. container:: m-col-m-4 .. math:: {\color{m-success} a^2 + b^2 =} ~ c^2 + .. class:: m-text-center m-noindent + + :math:`{\color{m-success} a^2 + b^2 =} ~ c^2` + .. container:: m-col-m-4 .. math:: @@ -91,6 +135,10 @@ colored globally with overrides except for :math:`c^2`. a^2 + b^2 = c^2 + .. class:: m-text-center m-noindent + + :math-success:`a^2 + b^2 = c^2` + .. container:: m-col-m-4 .. math:: @@ -98,12 +146,20 @@ colored globally with overrides except for :math:`c^2`. {\color{m-success} a^2 + b^2 =} ~ c^2 + .. class:: m-text-center m-noindent + + :math-danger:`{\color{m-success} a^2 + b^2 =} ~ c^2` + .. container:: m-col-m-4 .. math:: {\color{m-warning} a^2 + b^2 =} ~ c^2 + .. class:: m-text-center m-noindent + + :math:`{\color{m-warning} a^2 + b^2 =} ~ c^2` + .. container:: m-col-m-4 .. math:: @@ -111,6 +167,10 @@ colored globally with overrides except for :math:`c^2`. a^2 + b^2 = c^2 + .. class:: m-text-center m-noindent + + :math-warning:`a^2 + b^2 = c^2` + .. container:: m-col-m-4 .. math:: @@ -118,12 +178,20 @@ colored globally with overrides except for :math:`c^2`. {\color{m-warning} a^2 + b^2 =} ~ c^2 + .. class:: m-text-center m-noindent + + :math-danger:`{\color{m-warning} a^2 + b^2 =} ~ c^2` + .. container:: m-col-m-4 .. math:: {\color{m-danger} a^2 + b^2 =} ~ c^2 + .. class:: m-text-center m-noindent + + :math:`{\color{m-danger} a^2 + b^2 =} ~ c^2` + .. container:: m-col-m-4 .. math:: @@ -131,6 +199,10 @@ colored globally with overrides except for :math:`c^2`. a^2 + b^2 = c^2 + .. class:: m-text-center m-noindent + + :math-danger:`a^2 + b^2 = c^2` + .. container:: m-col-m-4 .. math:: @@ -138,6 +210,10 @@ colored globally with overrides except for :math:`c^2`. {\color{m-danger} a^2 + b^2 =} ~ c^2 + .. class:: m-text-center m-noindent + + :math-success:`{\color{m-danger} a^2 + b^2 =} ~ c^2` + .. container:: m-row .. container:: m-col-m-4 @@ -146,6 +222,10 @@ colored globally with overrides except for :math:`c^2`. {\color{m-info} a^2 + b^2 =} ~ c^2 + .. class:: m-text-center m-noindent + + :math:`{\color{m-info} a^2 + b^2 =} ~ c^2` + .. container:: m-col-m-4 .. math:: @@ -153,6 +233,10 @@ colored globally with overrides except for :math:`c^2`. a^2 + b^2 = c^2 + .. class:: m-text-center m-noindent + + :math-info:`a^2 + b^2 = c^2` + .. container:: m-col-m-4 .. math:: @@ -160,6 +244,10 @@ colored globally with overrides except for :math:`c^2`. {\color{m-info} a^2 + b^2 =} ~ c^2 + .. class:: m-text-center m-noindent + + :math-danger:`{\color{m-info} a^2 + b^2 =} ~ c^2` + .. container:: m-row .. container:: m-col-m-4 @@ -168,6 +256,10 @@ colored globally with overrides except for :math:`c^2`. {\color{m-dim} a^2 + b^2 =} ~ c^2 + .. class:: m-text-center m-noindent + + :math:`{\color{m-dim} a^2 + b^2 =} ~ c^2` + .. container:: m-col-m-4 .. math:: @@ -175,9 +267,17 @@ colored globally with overrides except for :math:`c^2`. a^2 + b^2 = c^2 + .. class:: m-text-center m-noindent + + :math-dim:`a^2 + b^2 = c^2` + .. container:: m-col-m-4 .. math:: :class: m-danger {\color{m-dim} a^2 + b^2 =} ~ c^2 + + .. class:: m-text-center m-noindent + + :math-danger:`{\color{m-dim} a^2 + b^2 =} ~ c^2`