emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

org-latex-preview, pNiceArray (running latex twice)


From: Uwe Brauer
Subject: org-latex-preview, pNiceArray (running latex twice)
Date: Mon, 12 Aug 2024 17:27:24 +0200
User-agent: Gnus/5.13 (Gnus v5.13)


Hi 

Look a the following example
--8<---------------cut here---------------start------------->8---
\begin{equation*}
  A^{0}=
  \begin{pNiceArray}{C|CCC}[margin]
    -m^{00}& 0 & 0 & 0\\
    \hline
    0 & \Block{3-3}{-m^{ab}}& &\\
    0 & & & \\
    0 & & & \\
  \end{pNiceArray}
  \qquad
  A^{k}=
  \begin{pNiceArray}{C|CCC}[margin]
    -2m^{0k}& m^{1k} & m^{2k} & m^{3k}\\
    \hline
    m^{1k}& \Block{3-3}{0_{3\times3 }}& &\\
    m^{2k}& & & \\
    m^{3k}& & &
  \end{pNiceArray}
\end{equation*}
--8<---------------cut here---------------end--------------->8---

Here is a MWE:
--8<---------------cut here---------------start------------->8---
\documentclass{article}
\usepackage{nicematrix}
\newcolumntype{C}{c}
\begin{document}
\begin{equation*}
  A^{0}=
  \begin{pNiceArray}{C|CCC}[margin]
    -m^{00}& 0 & 0 & 0\\
    \hline
    0 & \Block{3-3}{-m^{ab}}& &\\
    0 & & & \\
    0 & & & \\
  \end{pNiceArray}
  \qquad
  A^{k}=
  \begin{pNiceArray}{C|CCC}[margin]
    -2m^{0k}& m^{1k} & m^{2k} & m^{3k}\\
    \hline
    m^{1k}& \Block{3-3}{0_{3\times3 }}& &\\
    m^{2k}& & & \\
    m^{3k}& & &
  \end{pNiceArray}
\end{equation*}
\end{document}
--8<---------------cut here---------------end--------------->8---
for which I added

To org-format-latex-header
   "\\usepackage{nicematrix}\12\newcolumntype{C}{c}\12"

In order to obtain a nice result the corresponding latex file
should run twice, however.

Any this is a problem for org-latex-preview, it seems.

Any idea how to make this example work?

Thanks and regards

Uwe Brauer 



-- 
I strongly condemn Hamas heinous despicable pogroms/atrocities on Israel
I strongly condemn Putin's war of aggression against Ukraine.
I support to deliver weapons to Ukraine's military. 
I support the EU and NATO membership of Ukraine. 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]