-
Notifications
You must be signed in to change notification settings - Fork 54
Description
Having LaTeX support for blocks would be excellent because org babel produces them. For example, given this org content:
#+begin_src matlab :exports both :results output latex
m = [4*pi, 3*pi; 2*pi, pi];
result = latex(sym(m));
disp(result)
#+end_src
#+RESULTS:
#+begin_export latex
\left(\begin{array}{cc} 4\,\pi & 3\,\pi \\ 2\,\pi & \pi \end{array}\right)
#+end_export
When rendered, we get the following. Notice the LaTeX block is missing. It would be very helpful to have it for scientific papers, etc. directly written in org on github.
m = [4*pi, 3*pi; 2*pi, pi];
result = latex(sym(m));
disp(result)It would also be nice if directly entered LaTeX blocks retendered. For example, given this org content, it would be nice if it rendered.
#+begin_export latex
\begin{align}
y(t) = & f_o(t,x_c,x_d,u,P) && - \text{ outputs } \\
\dot{x}_c(t) = & f_d(t,x_c,x_d,u,P) && - \text{ derivatives } \\
x_d(t+h) = & f_u(t,x_c,x_d,u,P) && - \text{ update }
\end{align}
#+end_export
See https://github.com/mathworks/Emacs-MATLAB-Mode/blob/c4cf0f0dcef89bb8e261e5d8b512ce7b293edbba/examples/matlab-and-org-mode/matlab-and-org-mode.org from where the above was taken from.
Background: MATLAB is used by scientists, engineers, etc. who often create papers and org-mode is excellent at this because of its support for literate programming and reproducible research along with the other org features. It would be very nice if org files with MATLAB or other languages that generate latex blocks into the *.org file using org babel would render correctly in github. Improving org rendering of latex on github would likely result in more people using org mode from this community.