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

Commitbb35a88

Browse files
committed
fix latex not being rendered in html output in VSCode
by adding a blanket _repr_markdown_ InputOutputSystem which is the same as _repr_html_ but the renderer for _repr_markdown_ will also render contained latex
1 parentf6799ab commitbb35a88

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

‎control/iosys.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,9 @@ def _repr_latex_(self):
314314
def_repr_html_(self):
315315
# Defaults to using __repr__; override in subclasses
316316
returnNone
317+
318+
def_repr_markdown_(self):
319+
returnself._repr_html_()
317320

318321
@property
319322
defrepr_format(self):

‎control/tests/statesp_test.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1440,6 +1440,7 @@ def test_html_repr(gmats, ref, dt, dtref, repr_type, num_format, editsdefaults):
14401440
dt_html=dtref.format(dt=dt,fmt=defaults['statesp.latex_num_format'])
14411441
ref_html=ref[refkey].format(dt=dt_html)
14421442
assertg._repr_html_()==ref_html
1443+
assertg._repr_html_()==g._repr_markdown_()
14431444

14441445

14451446
@pytest.mark.parametrize(

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp