2

I want to use a matrix environment that is included in an outer environment, so:

Environment:
\begin{equation*}
\left|
\begin{matrix}
a_1 & b_1\\
a_2 & b_2
\end{matrix}
\right|
\end{equation*}

Display--math:
\[
\left|
\begin{matrix}
a_1 & b_1\\
a_2 & b_2
\end{matrix}
\right|
\]

Inline--math:
\(
\left|
\begin{matrix}
a_1 & b_1\\
a_2 & b_2
\end{matrix}
\right|
\)

But for the second and third cases (display-math and inline-math) the preview and export to latex are failed:

exported LaTeX:

Environment:
\begin{equation*}
\left|
\begin{matrix}
a_1 & b_1\\
a_2 & b_2
\end{matrix}
\right|
\end{equation*}

Display--math:
$\backslash$[
\left|
\begin{matrix}
a_1 & b_1\\
a_2 & b_2
\end{matrix}
\right|
$\backslash$]

Inline--math:
$\backslash$(
\left|
\begin{matrix}
a_1 & b_1\\
a_2 & b_2
\end{matrix}
\right|
$\backslash$)
\end{document}

org-mode preview:

enter image description here

Emacs 26.3

Org-mode 9.3.8

2
  • 1
    I can reproduce it with 9.4 and I believe it is a bug. Please consider submitting a bug report with M-x org-submit-bug-report RET.
    – NickD
    Sep 20, 2020 at 19:31
  • I can reproduce it with Org 9.3 and Emacs 27.1. Having this in an Org buffer produces this LaTeX file by pressing C-c C-e l L.
    – doltes
    Sep 21, 2020 at 0:20

1 Answer 1

2

So, this is not a bug:

nested \begin{...} should not start the line and therefore is not seen as starting a new LaTeX block:

Inline-math:
\(
\left|\begin{matrix}
a_1 & b_1\\
a_2 & b_2
\end{matrix}\right|
\)
1
  • Thanks for checking!
    – NickD
    Sep 21, 2020 at 11:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.