This might be a really rare combination of techniques.
I’m using Emacs
with org-mode
’s org-babel
to write code blocks. And I’m using emacs-jupyter
to connect to Jupyter
’s Julia
kernel.
When working with Symbolics.jl
it prints pretty latex in output. In order to see it rendered in my ORG
document I’m choosing :results raw
header arguments.
It works fine until I have multiline latex output. Latex get’s wrapped with $$
. I suspect emacs-jupyer doing that but not sure where that is happening.
Whats worse it also wraps output with some additional stuff:
\\begin{minipage}{\\textwidth}
\\begin{flushright}\n" data "\n\\end{flushright}
\\end{minipage}")
Eventually what I get in my output is something like this:
\begin{minipage}{\textwidth}
\begin{flushright}
$$ \begin{equation}
\left[
\begin{array}{c}
t_2 + v_{{1}} \lambda^{x}_{{1}} + \left( \lambda^{v}_{{1}} + \mu^{a}_{{1}} \right) \left( \lambda^{v}_{{1}} + \mu^{a}_{{1}} - a\left( t \right) \right) \\
- t_2 - v_{{2}} \lambda^{x}_{{2}} - \left( \lambda^{v}_{{2}} + \mu^{a}_{{2}} \right) \left( \lambda^{v}_{{2}} + \mu^{a}_{{2}} - a\left( t \right) \right) \\
\end{array}
\right]
\end{equation}
$$
\end{flushright}
\end{minipage}
Which can’t be rendered properly. If there where no $$
stuff in generated output everything renders fine.
In jupyter-repl
there are also issues with rendering multi-line expressions from Symbolics.jl
. That’s why I’m suspecting Symbolics.jl
in this behavior as well. And it seems the issue again connected to these extra $$
stuff.
I have a little hope someone uses same combination of technologies and ran into same issues. And I’m not sure who is responsible for extra $$
which breaks normal rendering (whether emacs-jupyer
responsible for that or Symbolics.jl
).