Hi again,

maybe a small example in the manual can help. See attached patch.

Additionally an MWE also attached ;-)



On Sun, 22 Nov 2026 at 09:56, Pedro A. Aranda <[email protected]> wrote:

> MOre insights inline
>
> On 22/11/26 7:57, Ihor Radchenko wrote:
> > "Pedro A. Aranda" <[email protected]> writes:
> >
> >>> except that you also drop erasing #+name and #+caption
> >>>
> >>>    (org-element-put-property table :name nil)
> >>>    (org-element-put-property table :caption nil)
> >>>
> >>> done in `org-latex--wrap-latex-matrices'.
> >>
> >> Yes, because that would go in an outer environment in documents. In
> >> presentations, mainly with ltx-talk, that's not needed.
> >
> > But we are talking about ox-latex-wide changes, right?
> > In LaTeX, documents, is there a possibility that users *want* to keep
> > caption or label/name?
> >
> > I am thinking about something like
> >
> > \begin{subequations}\label{lorenz}
> >       \begin{align}
> >               \dot x &= \sigma(y-x)   \label{l1} \\
> >               \dot y &= x(\rho-z) - y \label{l2} \\
> >               \dot z &= xy - \beta z  \label{l3}
> >       \end{align}
> > \end{subequations}
>
> Then, you need to do something like
>
> #+name: two
> #+attr_latex: :environment subequations
> #+begin_quote
>
> #+attr_latex: :mode math* :environment align
> | f(x) | = (x+1)^2       \label{l1} |
> |      | = x^2 + 2*x + 1 \label{l2} |
>
> #+end_quote
>
> With the side effect that captions are not shown...
>
> >>> Or do I miss something?
> >>
> >> Basically the last email. In the final version, I'm wrapping the math*
> >> tables in
> >> {
> >> }
> >>
> >> to support :math-prefix and other attributes. For example:
> >>
> >> #+attr_latex: :mode math* :environment align
> >> #+attr_latex: :math-prefix \addtolength{\jot}{6pt
> >> | f(x) | = (x+1)^2       |
> >> |      | = x^2 + 2*x + 1 |
> >>
> >> will be translated into
> >>
> >> {
> >> \addtolength{\jot}{6pt}\begin{align*}
> >> f(x) & = (x+1)^2 \\
> >>    & = x^2 + 2*x + 1
> >> \end{align*}
> >> }
> >
> > I understand. My main concern is when you have
> >
> > #+name: one
> > #+attr_latex: :mode math* :environment align
> > | f(x) | = (x+1)^2       |
> > |      | = x^2 + 2*x + 1 |
> >
> > #+name: two
> > #+attr_latex: :mode math* :environment align
> > | f(x) | = (x+1)^2       |
> > |      | = x^2 + 2*x + 1 |
> >
> > Equation [[one]] and [[two]], two tables in the row.
>
> If you directly apply #+name: to an align or align* you'll get a PDF
> that may crash some readers when clicking on the reference (my painful
> experience).
>
>
> >
> >> To go back to the dropping of :name and :caption, yes, I do drop them,
> >> because these environments don't support them.
> >
> > Environment not supporting align should not stop us. Just as it does not
> > stop captions to be honored in :mode math.
> > I am referring to
> > :markup
> >                                 (cond ((string= mode "inline-math")
> 'inline)
> >                                       ((or caption name) 'equation)
> >                                       (t 'math))
> >
> > and then
> >
> > (`equation
> >       (let ((caption (org-latex--caption/label-string matrices info))
> >          (caption-above? (org-latex--caption-above-p matrices info)))
> >         (concat "\\begin{equation}\n"
> >              (and caption-above? caption)
> >              contents
> >              (and (not caption-above?) caption)
> >              "\\end{equation}")))
> >
>
> Maybe adding the example above should be enough... WDYT?
>
> --
> Pedro A. Aranda
> ox-latex & ox-beamer maintainer
>
> Sagen's Paradeiser! (ORF: Als Radiohören gefährlich war) => write BE!
> IA: onomatopeya del rebuzno
> 2nd year of the New Koprocracy
>
>

-- 
Fragen sind nicht da, um beantwortet zu werden,
Fragen sind da um gestellt zu werden
Georg Kreisler

"Sagen's Paradeiser" (ORF: Als Radiohören gefährlich war) => write BE!
Year 2 of the New Koprocracy

*IA: onomatopeya del rebuznar*

This was produced by a human (implied virtues and weaknesses acknowledged)
Don't feed your ArtStup (SKA AI) with this. It won't make YOU smarter...
From 3f01f7d5001f82c2ccbbf213816ccf39a9111df4 Mon Sep 17 00:00:00 2001
From: "Pedro A. Aranda" <[email protected]>
Date: Sun, 22 Nov 2026 17:43:56 +0100
Subject: [PATCH 2/2] org-manual: Add example for math* mode

* doc/org-manual.org (* Tables in LaTeX export): Add example for math*
mode.
---
 doc/org-manual.org | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/doc/org-manual.org b/doc/org-manual.org
index 966c640cc..637f93580 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -14999,6 +14999,20 @@ include:
     when the table's =:environment= does not allow wrapping it in any
     of the above LaTeX inlining[fn::Use this for =align=, =align*= or
     other environments, where inlining results in a LaTeX error.].
+
+    There are some table environments in LaTeX which allow you include
+    aligned equations inside. Use the =math*= mode in this case. For
+    example:
+
+    #+BEGIN_SRC org
+,#+name: gr2
+,#+begin_subequations
+,#+attr_latex: :mode math* :environment align
+| f(x) | = (x + 1)^2     |
+|      | = x^2 + 2*x + 1 |
+,#+end_subequations
+    #+END_SRC
+
   - For =tabbing= the LaTeX tabbing environment is used and the
     correct tabbing delimiters =\>= are used.  The LaTeX export
     backend determines the default mode from
-- 
2.53.0

#+startup: beamer
#+latex_compiler: lualatex
#+TITLE: Course
#+SUBTITLE: Lecture
#+AUTHOR: Pedro A. Aranda Gutiérrez
#+LANGUAGE: es
#+LATEX_CLASS: beamer
#+LATEX_CLASS_OPTIONS: [presentation,aspectratio=169]
#+BEAMER_THEME: Boadilla
# Handouts
#+BEAMER_HEADER: \usepackage{pgfpages}
#+BEAMER_HEADER: \mode<handout> {\pgfpagesuselayout{2 on 1}[a4paper, border shrink=5mm]}

#+OPTIONS: H:2 toc:t num:t email:nil
#+COLUMNS: %45ITEM %10BEAMER_ENV(Env) %10BEAMER_ACT(Act) %4BEAMER_COL(Col)

* Section
** Frame

#+name: gr1
#+caption: Two aligned equations
#+begin_subequations
\addtolength{\jot}{6pt}

#+attr_latex: :mode math* :environment align
| f(x) | = (x + 1)^2 \label{l1}     |
|      | = x^2 + 2*x + 1 \label{l2} |
#+end_subequations

- In group [[gr1]] you can find two equations, in group [[gr2]] we have the same
  equations, but without additional spacing and caption.
- Eq. \ref{l1} is developed in eq. \ref{l2}

#+name: gr2
#+begin_subequations

#+attr_latex: :mode math* :environment align
| f(x) | = (x + 1)^2 \label{l3}     |
|      | = x^2 + 2*x + 1 \label{l4} |
#+end_subequations

# Local variables:
# eval: (auto-fill-mode t)
# spell-check-lang: "en"
# org-latex-prefer-user-labels: t
# End:

Attachment: kk.pdf
Description: Adobe PDF document

Reply via email to