Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix mathtext tutorial for build with Sphinx 1.8.#12570

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
jklymak merged 1 commit intomatplotlib:masterfromanntzer:sphinx18math
Oct 20, 2018
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 16 additions & 3 deletionsdoc/sphinxext/math_symbol_table.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
from matplotlib import mathtext


symbols = [
["Lower-case Greek",
6,
Expand DownExpand Up@@ -112,9 +115,19 @@ def get_n(n, l):
header = " " + (('=' * max_width) + ' ') * columns
lines.append(header)
for part in get_n(columns, syms):
line = " " + " ".join(
":math:`{0}` ``{0}``".format(sym).rjust(max_width)
for sym in part)
line = (
" " +
" ".join(
"{} ``{}``".format(
sym
if not sym.startswith("\\")
else sym[1:]
if (sym[1:] in mathtext.Parser._overunder_functions
or sym[1:] in mathtext.Parser._function_names)
else chr(mathtext.tex2uni[sym[1:]]),
sym)
.rjust(max_width)
for sym in part))
lines.append(line)
lines.append(header)
lines.append('')
Expand Down
6 changes: 5 additions & 1 deletiontutorials/text/mathtext.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -179,9 +179,13 @@

r's(t) = \mathcal{A}\/\sin(2 \omega t)'

.. Here we cheat a bit: for HTML math rendering, Sphinx relies on MathJax which
doesn't actually support the italic correction (\/); instead, use a thin
space (\,) which is supported.

.. math::

s(t) = \mathcal{A}\/\sin(2 \omega t)
s(t) = \mathcal{A}\,\sin(2 \omega t)

The choices available with all fonts are:

Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp