Skip to content

Commit bb35a88

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 parent f6799ab commit bb35a88

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
return None
317+
318+
def _repr_markdown_(self):
319+
return self._repr_html_()
317320

318321
@property
319322
def repr_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
assert g._repr_html_() == ref_html
1443+
assert g._repr_html_() == g._repr_markdown_()
14431444

14441445

14451446
@pytest.mark.parametrize(

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy