From: Vladimír Vondruš Date: Mon, 18 Jun 2018 07:50:30 +0000 (+0200) Subject: m.math: having "LaTeX Math" in a hover title is as useless as it can get. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?a=commitdiff_plain;h=198c49908d56f7a479b77b254f40dd8ff32843eb;p=blog.git m.math: having "LaTeX Math" in a hover title is as useless as it can get. I thought browsers would show the as well, but no. So putting the math formula directly in the . --- diff --git a/doxygen/test/contents_custom/math.html b/doxygen/test/contents_custom/math.html index 784fff40..ed83d1ea 100644 --- a/doxygen/test/contents_custom/math.html +++ b/doxygen/test/contents_custom/math.html @@ -23,10 +23,9 @@ Math </h1> <p>A green formula:</p><div class="m-math m-success"><svg height='12.5906pt' version='1.1' viewBox='188.371 -10.0725 11.3035 10.0725' width='14.1293pt'> -<title>LaTeX Math - + \[ \pi^2 \] -</desc> + @@ -36,10 +35,9 @@

A yellow -LaTeX Math - + $ \Sigma $ -</desc> + diff --git a/doxygen/test/contents_math/index.html b/doxygen/test/contents_math/index.html index e954bff6..46dc9a1f 100644 --- a/doxygen/test/contents_math/index.html +++ b/doxygen/test/contents_math/index.html @@ -23,10 +23,9 @@ My Project

Here's a block formula:

-LaTeX Math - + \[ \hat q = [\boldsymbol 0, 1] + \epsilon [\frac{\boldsymbol v}{2}, 0] \] -</desc> + @@ -62,10 +61,9 @@

And -LaTeX Math - + $ \hat q $ -</desc> + @@ -75,10 +73,9 @@ $ \hat q $ is how quaternion is denoted.

-LaTeX Math - + \[ a^2 + b^2 = c^2 \] -</desc> + @@ -98,10 +95,9 @@ $ \hat q $

-LaTeX Math - + $c^2$ -</desc> + @@ -111,10 +107,9 @@ $c^2$ should be part of a new paragraph, not stuck out of it. The following formula has a custom environment:

-LaTeX Math - + \begin{eqnarray*} g &=& \frac{Gm_2}{r^2} \\ &=& 9.82066032\,\mbox{m/s}^2 \end{eqnarray*} -</desc> + diff --git a/doxygen/test/contents_math_cached/math.html b/doxygen/test/contents_math_cached/math.html index 533ac542..8e56824b 100644 --- a/doxygen/test/contents_math_cached/math.html +++ b/doxygen/test/contents_math_cached/math.html @@ -23,10 +23,9 @@ Math

In order to actually test use of the cache, I need to cheat a bit. Inline formula which is pi in the source but -LaTeX Math - + $ \pi $ -</desc> + @@ -37,10 +36,9 @@ $ \pi $ here. Then a block formula which is a Pythagorean theorem in source but not in the output:

-LaTeX Math - + \[ a^2 + b^2 = c^2 \] -</desc> + diff --git a/pelican-plugins/latex2svgextra.py b/pelican-plugins/latex2svgextra.py index 2ffc33c6..5cca1da5 100644 --- a/pelican-plugins/latex2svgextra.py +++ b/pelican-plugins/latex2svgextra.py @@ -53,10 +53,9 @@ _patch_src = re.compile(r"""<\?xml version='1.0' encoding='UTF-8'\?> """) _patch_dst = r"""> -LaTeX Math - + {formula} -</desc> + """ _unique_src = re.compile(r"""(?P id|xlink:href)='(?P#?)(?Pg\d+-\d+|page\d+)'""") diff --git a/pelican-plugins/m/test/math/page.html b/pelican-plugins/m/test/math/page.html index 8079649b..035c39b3 100644 --- a/pelican-plugins/m/test/math/page.html +++ b/pelican-plugins/m/test/math/page.html @@ -24,10 +24,9 @@

m.math

Inline colored math -LaTeX Math - + a^2 -</desc> + @@ -39,10 +38,9 @@ a^2 and colored math block:

-LaTeX Math - + a^2 + b^2 = c^2 -</desc> + @@ -64,10 +62,9 @@ a^2 + b^2 = c^2

Properly align huge formulas vertically on a line: -LaTeX Math - + \hat q^{-1} = \frac{\hat q^*}{|\hat q|^2} -</desc> + @@ -98,10 +95,9 @@ a^2 + b^2 = c^2 and make sure there's enough space for all the complex -LaTeX Math - + W -</desc> + @@ -110,10 +106,9 @@ W things between the lines -LaTeX Math - + W = \sum_{i=0}^{n} \frac{w_i}{h_i} -</desc> + @@ -142,10 +137,9 @@ W = \sum_{i=0}^{n} \frac{w_i}{h_i} because -LaTeX Math - + Y = \sum_{i=0}^{n} B -</desc> + @@ -168,10 +162,9 @@ Y = \sum_{i=0}^{n} B

The \cfrac thing doesn't align well: -LaTeX Math - + W = \sum_{i=0}^{n} \cfrac{w_i}{h_i} -</desc> + diff --git a/pelican-plugins/m/test/math_cached/page.html b/pelican-plugins/m/test/math_cached/page.html index 542d38b1..3a729836 100644 --- a/pelican-plugins/m/test/math_cached/page.html +++ b/pelican-plugins/m/test/math_cached/page.html @@ -25,10 +25,9 @@

In order to actually test use of the cache, I need to cheat a bit. Inline formula which is pi in the source but -LaTeX Math - + \pi -</desc> + @@ -42,10 +41,9 @@ formula which is pi in the source but -LaTeX Math - + a^2 + b^2 = c^2 -</desc> +