Repository: python-control/python-control

Issue:
Latex is not rendered in HTML output of in VSCode
On f6799ab8e60d7fcd4b02d52d5903f08c24957faf

As the title says, the math sections in HTML output generated by `_repr_html_` from `StateSpace` (and other classes) is not rendered.

![Image](https://github.com/user-attachments/assets/d2a9bfda-4ffe-420b-b910-d2ed61daa2b4)

This is not really the fault of this library and there is an open [issue](https://github.com/microsoft/vscode/issues/203725) in the VSCode repo for this, but the simpler output which used `_html_latex_` before #1091 did not have this problem.

![Image](https://github.com/user-attachments/assets/a9ffeee7-d25b-4c85-9a7b-0f2e247c0ac5)

I think adding back the old `_repr_latex_` would allow the user to choose between the new mixed HMTL output and the old Latex output if using VSCode, what do you think?

Another option that I saw in the VSCode issue is to explicitly add the renderer into the HTML but this seems really hacky:

![Image](https://github.com/user-attachments/assets/09be3501-2500-46b4-91be-8e1534ef77ed)

Discussion:

Patch:
diff --git a/control/iosys.py b/control/iosys.py
index 11055213..29f5bfef 100644
--- a/control/iosys.py
+++ b/control/iosys.py
@@ -314,6 +314,9 @@ class InputOutputSystem():
     def _repr_html_(self):
         # Defaults to using __repr__; override in subclasses
         return None
+    
+    def _repr_markdown_(self):
+        return self._repr_html_()
 
     @property
     def repr_format(self):


Test patch:
diff --git a/control/tests/statesp_test.py b/control/tests/statesp_test.py
index 0806696f..e3d78bbd 100644
--- a/control/tests/statesp_test.py
+++ b/control/tests/statesp_test.py
@@ -1440,6 +1440,7 @@ def test_html_repr(gmats, ref, dt, dtref, repr_type, num_format, editsdefaults):
     dt_html = dtref.format(dt=dt, fmt=defaults['statesp.latex_num_format'])
     ref_html = ref[refkey].format(dt=dt_html)
     assert g._repr_html_() == ref_html
+    assert g._repr_html_() == g._repr_markdown_()
 
 
 @pytest.mark.parametrize(