Hi Ihor,

a TONYCHANGE to silence a compiler warnig when you define your math font in an ltx-talk presentation attached.
--
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
From e444269cae470ab9b5139dc6a45839d9fe06f2d3 Mon Sep 17 00:00:00 2001
From: "Pedro A. Aranda" <[email protected]>
Date: Mon, 5 Oct 2026 17:46:32 +0200
Subject: [PATCH 54/55] ox-latex.el: add ltx-talk exception for the
 unicode-math package

* lisp/ox-latex.el (org-latex--needs-math-font): Check for the
  ltx-talk. This silences a warning for the unicode-math package in that
  specific case.
---
 lisp/ox-latex.el | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index b99afb6a1..4e62fe245 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -1967,10 +1967,14 @@ (defun org-latex--caption/label-string (element info)
 	      (org-export-data main info))))))
 ;;;;
 (defun org-latex--needs-math-font (info)
-  "Return t if INFO contains a :latex-fontspec-config with a math font."
+  "Return t if INFO contains a :latex-fontspec-config with a math font.
+
+This is used to include \"\\RequirePackage{unicode-math}\" in the headers.
+The ltx-talk class complains about this command."
 
   (when-let* ((fontspec-config (plist-get info :latex-fontspec-config)))
-    (assoc-string "math" fontspec-config)))
+    (and (not (equal (plist-get info :latex-class) "ltx-talk"))
+         (assoc-string "math" fontspec-config))))
 
 ;;;
 (defun org-latex-guess-inputenc (header)
-- 
2.53.0

Reply via email to