emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Uwe Brauer via "General discussions about Org-mode." <emacs-orgmode@gnu.org>
To: emacs-orgmode@gnu.org
Subject: org-latex-preview, pNiceArray (running latex twice)
Date: Mon, 12 Aug 2024 17:27:24 +0200	[thread overview]
Message-ID: <87wmklyd5v.fsf@mat.ucm.es> (raw)



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	other threads:[~2024-08-12 15:28 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-12 15:27 Uwe Brauer via General discussions about Org-mode. [this message]
2024-08-13 19:35 ` org-latex-preview, pNiceArray (running latex twice) Ihor Radchenko
2024-08-14  7:28   ` Uwe Brauer
2024-08-14  7:33     ` Ihor Radchenko
2024-08-14  7:56       ` Uwe Brauer
2024-08-14  7:59         ` Ihor Radchenko
2024-08-14  8:02           ` Uwe Brauer
2024-08-14  8:07             ` Ihor Radchenko
2024-08-14  9:32               ` Uwe Brauer
2024-08-14  9:51                 ` Ihor Radchenko
2024-08-14 10:21                   ` Uwe Brauer
2024-08-14 10:29                     ` Ihor Radchenko
2024-08-14 10:54                       ` Uwe Brauer
2024-08-15 17:01                         ` [RFC] latex preview and pdflatex-only packages (was: org-latex-preview, pNiceArray (running latex twice)) Ihor Radchenko
2024-08-16  5:46                           ` [RFC] latex preview and pdflatex-only packages Stefan Nobis
2024-08-16  6:30                             ` Stefan Nobis
2024-08-18 12:01                             ` Ihor Radchenko
2024-08-18 13:35                               ` Juergen Fenn
2024-08-18 13:47                                 ` Ihor Radchenko
2024-08-18 14:12                                   ` Juergen Fenn
2024-08-18 14:31                                     ` Ihor Radchenko
2024-08-18 15:00                                       ` Juergen Fenn
2024-08-18 15:32                                         ` Juergen Fenn
2024-08-17 20:12                           ` [RFC] latex preview and pdflatex-only packages (was: org-latex-preview, pNiceArray (running latex twice)) Karthik Chikmagalur
2024-08-18 12:29                             ` Ihor Radchenko
2024-08-14 12:38                       ` org-latex-preview, pNiceArray (running latex twice) Uwe Brauer
2024-08-14 16:21                       ` Uwe Brauer via General discussions about Org-mode.
2024-08-17 20:08   ` Karthik Chikmagalur
2024-08-18  6:09     ` Uwe Brauer
2024-08-18 12:30     ` Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wmklyd5v.fsf@mat.ucm.es \
    --to=emacs-orgmode@gnu.org \
    --cc=oub@mat.ucm.es \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).