Hi
I see your point...
You have an argument for keeping the name (and the label)... agreed.
I continue to have a problem with the caption, though... because
keeping it results in
⛔ Warning (ox-latex): PDF file produced with warnings: [undefined
control sequence]
when I use align* outside an environment in places like ltx-talk. It
confused me a lot. How would you proceed in this case?
Best, /PA
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}
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.
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}")))
--
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