mathworks / jupyter-matlab-proxy

MATLAB Integration for Jupyter enables you to run MATLAB code in Jupyter Notebooks and other Jupyter environments. You can also open MATLAB in a browser directly from your Jupyter environment to use more MATLAB features.
Other
237 stars 33 forks source link

Print tables in LaTeX #85

Open napaalm opened 6 months ago

napaalm commented 6 months ago

When I print a table in a MATLAB notebook I would like to render it in LaTeX, but it is not currently possible. The following is an example of a code that doesn't get LaTeX output.

syms x y;
eq = cos(x)*cos(y) == 0;
struct2table(solve(eq, [x y]))
ans = 2x2 table
     x       y  
    ____    ____

    pi/2    0   
    0       pi/2

With complex expression it is evident that a LaTeX table would be easier to read.

rashedmyt commented 5 months ago

Hi @napaalm

With R2024a, we support displaying tables as HTML tables. You can learn more about it here. Below is how the example you have given looks in R2024a.

image

Does this work for you?

napaalm commented 5 months ago

@rashedmyt I guess this is a step forward, but I think the real issue here is that the formulas inside table cells are not rendered as LaTeX. If we had more complex expressions inside the cells the difference in readability would be very noticeable.

rashedmyt commented 5 months ago

Thank you for the feedback. I'll forward this enhancement request to the development team.