diff options
author | Lila <lila91142@gmail.com> | 2020-05-19 07:45:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-18 22:45:44 -0700 |
commit | f4185fcef0aa5c00e37a1bf8bbc8b8c6459fffe7 (patch) | |
tree | 4a09047038b339afef449f0b2b0591271afe0087 /test | |
parent | 57fa394eb0afbc8368091b9c90e132e29e2b72aa (diff) | |
download | pandoc-f4185fcef0aa5c00e37a1bf8bbc8b8c6459fffe7.tar.gz |
Use CSS in favor of <br> for display math (#6372)
Some CSS to ensure that display math is
displayed centered and on a new line is now included
in the default HTML-based templates; this may be
overridden if the user wants a different behavior.
Diffstat (limited to 'test')
-rw-r--r-- | test/command/5655.md | 4 | ||||
-rw-r--r-- | test/lhs-test.html | 1 | ||||
-rw-r--r-- | test/lhs-test.html+lhs | 1 | ||||
-rw-r--r-- | test/s5-basic.html | 1 | ||||
-rw-r--r-- | test/s5-inserts.html | 1 | ||||
-rw-r--r-- | test/writer.html4 | 3 | ||||
-rw-r--r-- | test/writer.html5 | 3 |
7 files changed, 10 insertions, 4 deletions
diff --git a/test/command/5655.md b/test/command/5655.md index 35987c10a..692009562 100644 --- a/test/command/5655.md +++ b/test/command/5655.md @@ -2,13 +2,13 @@ % pandoc --webtex $T_n={n+1 \choose 2}$ ^D -<p><img style="vertical-align:middle" src="https://latex.codecogs.com/png.latex?%5Ctextstyle%20T_n%3D%7Bn%2B1%20%5Cchoose%202%7D" alt="T_n={n+1 \choose 2}" title="T_n={n+1 \choose 2}" /></p> +<p><img style="vertical-align:middle" src="https://latex.codecogs.com/png.latex?%5Ctextstyle%20T_n%3D%7Bn%2B1%20%5Cchoose%202%7D" alt="T_n={n+1 \choose 2}" title="T_n={n+1 \choose 2}" class="math inline" /></p> ```` ```` % pandoc --webtex $$T_n={n+1 \choose 2}$$ ^D -<p><br /><img style="vertical-align:middle" src="https://latex.codecogs.com/png.latex?%5Cdisplaystyle%20T_n%3D%7Bn%2B1%20%5Cchoose%202%7D" alt="T_n={n+1 \choose 2}" title="T_n={n+1 \choose 2}" /><br /></p> +<p><img style="vertical-align:middle" src="https://latex.codecogs.com/png.latex?%5Cdisplaystyle%20T_n%3D%7Bn%2B1%20%5Cchoose%202%7D" alt="T_n={n+1 \choose 2}" title="T_n={n+1 \choose 2}" class="math display" /></p> ```` diff --git a/test/lhs-test.html b/test/lhs-test.html index 8ec8e5dd9..621d79163 100644 --- a/test/lhs-test.html +++ b/test/lhs-test.html @@ -74,6 +74,7 @@ code span.va { color: #19177c; } /* Variable */ code span.vs { color: #4070a0; } /* VerbatimString */ code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */ + .display.math{display: block; text-align: center; margin: 0.5rem auto;} </style> <!--[if lt IE 9]> <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script> diff --git a/test/lhs-test.html+lhs b/test/lhs-test.html+lhs index 22f807e17..b55556ef3 100644 --- a/test/lhs-test.html+lhs +++ b/test/lhs-test.html+lhs @@ -74,6 +74,7 @@ code span.va { color: #19177c; } /* Variable */ code span.vs { color: #4070a0; } /* VerbatimString */ code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */ + .display.math{display: block; text-align: center; margin: 0.5rem auto;} </style> <!--[if lt IE 9]> <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script> diff --git a/test/s5-basic.html b/test/s5-basic.html index f168ce9c8..7440b575b 100644 --- a/test/s5-basic.html +++ b/test/s5-basic.html @@ -17,6 +17,7 @@ div.column{display: inline-block; vertical-align: top; width: 50%;} div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;} ul.task-list{list-style: none;} + .display.math{display: block; text-align: center; margin: 0.5rem auto;} </style> <!-- configuration parameters --> <meta name="defaultView" content="slideshow" /> diff --git a/test/s5-inserts.html b/test/s5-inserts.html index 2574715d3..1df9dd018 100644 --- a/test/s5-inserts.html +++ b/test/s5-inserts.html @@ -15,6 +15,7 @@ div.column{display: inline-block; vertical-align: top; width: 50%;} div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;} ul.task-list{list-style: none;} + .display.math{display: block; text-align: center; margin: 0.5rem auto;} </style> <link rel="stylesheet" href="main.css" type="text/css" /> STUFF INSERTED diff --git a/test/writer.html4 b/test/writer.html4 index 80106bd56..56b78dfb1 100644 --- a/test/writer.html4 +++ b/test/writer.html4 @@ -15,6 +15,7 @@ div.column{display: inline-block; vertical-align: top; width: 50%;} div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;} ul.task-list{list-style: none;} + .display.math{display: block; text-align: center; margin: 0.5rem auto;} </style> </head> <body> @@ -432,7 +433,7 @@ Blah <li><span class="math inline"><em>α</em> ∧ <em>ω</em></span></li> <li><span class="math inline">223</span></li> <li><span class="math inline"><em>p</em></span>-Tree</li> -<li>Here’s some display math: <br /><span class="math display">$$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$$</span><br /></li> +<li>Here’s some display math: <span class="math display">$$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$$</span></li> <li>Here’s one that has a line break in it: <span class="math inline"><em>α</em> + <em>ω</em> × <em>x</em><sup>2</sup></span>.</li> </ul> <p>These shouldn’t be math:</p> diff --git a/test/writer.html5 b/test/writer.html5 index 431503b03..321b65afd 100644 --- a/test/writer.html5 +++ b/test/writer.html5 @@ -15,6 +15,7 @@ div.column{display: inline-block; vertical-align: top; width: 50%;} div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;} ul.task-list{list-style: none;} + .display.math{display: block; text-align: center; margin: 0.5rem auto;} </style> <!--[if lt IE 9]> <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script> @@ -435,7 +436,7 @@ Blah <li><span class="math inline"><em>α</em> ∧ <em>ω</em></span></li> <li><span class="math inline">223</span></li> <li><span class="math inline"><em>p</em></span>-Tree</li> -<li>Here’s some display math: <br /><span class="math display">$$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$$</span><br /></li> +<li>Here’s some display math: <span class="math display">$$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$$</span></li> <li>Here’s one that has a line break in it: <span class="math inline"><em>α</em> + <em>ω</em> × <em>x</em><sup>2</sup></span>.</li> </ul> <p>These shouldn’t be math:</p> |