Small fixes for tests. Needed to adapt them to the output as a result of the comments.
Best, /PA On Sat, 27 Jun 2026 at 17:29, Pedro Andres Aranda Gutierrez < [email protected]> wrote: > Squashed patch w/ quirks pointed out soled (hopefully). > > Answers inline: > > On Sat, 27 Jun 2026 at 08:33, Ihor Radchenko <[email protected]> wrote: > >> Pedro Andres Aranda Gutierrez <[email protected]> writes: >> >> > Attached is the patch adding support for ltx-talk in ox-beamer. >> > Splitting it in three files addressing the different aspects of >> ltx-talk is >> > intentional. >> > >> > 0001 Provides the basic differentiation between beamer and ltx-talk. >> > 0002 Adds support for sectioning. >> > 0003 Addresses frames with verbatim contents. >> > >> > Thanks uncountable to Roger for his patience and support testing. >> >> Thanks! >> As discussed, it is good idea to squash the patches and summarize all the >> changes made in the commit message. Currently, the patches add and >> immediately remove some things, which makes it harder to review the >> series. >> >> The patch does not currently warn when ltx-talk is used without lualatex. >> It should. >> > Done > >> >> Also, ORG-NEWS entry needs to be added. >> > > Done > >> >> More comments inline. >> >> > +popular display formats. Additionally, the Beamer exporter provides >> > +/preliminary/ support for =ltx-talk=, which produces accesible >> > +presentation in PDF using the *LuaLaTeX* compiler. > > >> Let's not use "preliminary" in the manual. We will have plenty of time >> before this is a part of Org release. Before that, all the new features >> are not fully stable and are a subject of testing for users who use main >> branch. >> >> Also, "accessible presentation" may be easy to understand for some >> people, but not for all. It is a good idea to explain exactly what it >> refers two - mention screen readers and PDF accessibility requirements >> in EU universities. >> >> > +If you plan to use =ltx-talk=, consult the >> > +[[ >> https://mirrors.ctan.org//macros/latex/contrib/ltx-talk.tds.zip/ltx-talk.pdf][=ltx-talk= >> > +documentation]]. >> >> It is still a good idea to describe the most important differences >> between beamer and ltx-talk in a separate section of the manual. For >> example, the fact that themes are not a thing. Or other pitfalls, >> especially when some features that are explicitly supported in Org mode >> will no longer work. >> > > Hopefully done in the example section. > > > >> >> > +*** An example of a presentation using =ltx-talk= >> >> I am not sure if it is worth having a separate example of presentation. >> Maybe we can get along with the existing 13.8.6 A Beamer example >> section, just adjusting it a little to indicate which options do not >> work in ltx-talk and which options need to be added (like >> documentmetadata) >> > > I hope it now makes sense. > > >> The existing example is almost just a normal beamer presentation with >> ,#+LATEX_CLASS: ltx-talk >> ,#+LATEX_CLASS_PRE: \\DocumentMetadata{tagging=on} >> before a sole difference. >> > > The notes should make the difference here. > > > It would be nice (but optional), to generate documentmetadata >> automatically. At least language can be derived from #+LANG keyword. We >> could introduce #+LATEX_METADATA keyword to assist this. >> > > TODO > > >> >> > @@ -72,7 +75,8 @@ (defcustom org-beamer-frame-level 1 >> > This integer is relative to the minimal level of a headline >> > within the parse tree, defined as 1." >> > :group 'org-export-beamer >> > - :type 'integer) >> > + :type 'integer >> > + :safe #'integerp) >> >> This is fine, but not related to adding ltx-talk. You can push it as a >> separate change. >> > > OK, removed. > > > + (:latex-class-pre "LATEX_CLASS_PRE" nil nil newline) >> >> This is redundant. We already define the keyword in the parent ox-latex. >> > removed > >> >> > + ;; FIXME: no labels for ltx-talk in \begin{frame} >> > + ;; find an alternative! >> > + (and (equal "beamer" latex-class) >> > + (not (member "allowframebreaks" options)) >> >> ltx-talk supports something called "name", which should be used instead >> of beamer labels. That way, againframe will remain supported. >> > > done > > >> >- (format "{%s}" >> >+ ;; Separate frametitle doesn't hurt beamer >> >+ ;; but ltx-talk will not work w/o it. >> >+ (format "\n\\frametitle{%s}" >> >> I suggest not changing the existing export format for beamer case. >> I know from past discussions that it is really a big deal for some users >> - more verbose export annoy them. >> Just do special case of ltx-talk. >> > > sigh... (but done the code is more convoluted now :( ) > > >> + (beamer-class (plist-get info :latex-class))) >> + (when (and (equal beamer-class "ltx-talk") >> + (plist-get info :latex-class-options)) >> + (warn "ox-beamer: ignoring LaTeX class options for `ltx-talk'") >> + (setq info (plist-put info :latex-class-options nil))) >> >> This is not right. ltx-talk supports class options (see the >> manual). There is no reason to strip them. >> > > Fixed > > >> + (unless (equal beamer-class "ltx-talk") >> + (let ((format-theme >> >> Apparently, there are equivalents of beamer themes ported to ltx-talk. >> For example, talkthemespectrum or talkthemetuc. Also, >> beamertheme-tcolorbox appears to support ltx-talk. >> >> Not for now, but may be something we want to support in the future. >> Especially if more themes are ported from beamer to ltx-talk. >> > > Agree... > > Also, it looks like ltx-talk does not support some of the environments >> users may have in the documents: >> >> | Environment | In ltx-talk? | Evidence >> | >> >> |-----------------------------+--------------+-------------------------------| >> | =block= | No | Not in index or content >> | > > block is supported. Shown in the example... > >> | =alertblock= | Partial | Only =alertenv= exists >> (p.20) | >> | =exampleblock= | No | Not in index or content >> | >> | =theorem= | No | Manual discourages (p.27) >> | >> | =definition= | No | Same as theorem >> | >> | =proof= | No | Same >> | >> | =beamercolorbox= | No | Not in index or content >> | >> | =onlyenv= | Yes | p.12 >> | >> | =structureenv= | No | Not in index >> | >> | \note. |No | Checked with the example | >> > > I added the information above slightly adapted as a table in the manual > >> >> -- >> Ihor Radchenko // yantar92, >> Org mode maintainer, >> Learn more about Org mode at <https://orgmode.org/>. >> Support Org development at <https://liberapay.com/org-mode>, >> or support my work at <https://liberapay.com/yantar92> >> > > > -- > 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 > > This was produced by a human (implied virtues and weaknesses acknowledged) > I'd hate this being fed to any form of AS (sorry AI)... > > -- 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 This was produced by a human (implied virtues and weaknesses acknowledged) I'd hate this being fed to any form of AS (sorry AI)...
From 564582c2c31eff7a0e9dad991261a156f29ff530 Mon Sep 17 00:00:00 2001 From: "Pedro A. Aranda" <[email protected]> Date: Sat, 27 Jun 2026 18:26:53 +0200 Subject: [PATCH 2/2] Fix some tests Addressing review comments changed changed output. Tests needed to be adapted to the new output. * testing/lisp/test-ox-beamer.el (test-ox-beamer/ltx-talk-class): LaTeX class options are no longer ignored. Frames now have, at least, the name as an option. (test-ox-beamer/beamer-verb-frame): Revert to frame title in begin{frame} behaviour. --- testing/lisp/test-ox-beamer.el | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/testing/lisp/test-ox-beamer.el b/testing/lisp/test-ox-beamer.el index a6566bb5d..72baa29ea 100644 --- a/testing/lisp/test-ox-beamer.el +++ b/testing/lisp/test-ox-beamer.el @@ -115,8 +115,8 @@ (ert-deftest test-ox-beamer/ltx-talk-class () "Initial test for a simple ltx-talk example. 1. Default Metadata is inserted 2. Sectioning is supported -3. Labels and Beamer theme stuff are ignored -4. LaTeX class options are also ignored and a warning is issued." +3. Labels and Beamer theme stuff are ignored" + (let ((org-latex-compiler "lualatex") (org-latex-hyperref-template nil) (org-latex-packages-alist nil) @@ -126,7 +126,7 @@ (ert-deftest test-ox-beamer/ltx-talk-class () "#+STARTUP: beamer #+OPTIONS: toc:nil H:2 #+LATEX_CLASS: ltx-talk -#+LATEX_CLASS_OPTIONS: warn +#+LATEX_CLASS_OPTIONS: #+LATEX_CLASS_PRE: \\DocumentMetadata{tagging = on} #+TITLE: Testing =ltx-talk= #+BEAMER_THEME: Boadilla @@ -227,12 +227,12 @@ (ert-deftest test-ox-beamer/ltx-talk-multi-verb-frame () (save-excursion (should (search-forward "\\DocumentMetadata{tagging=on}" nil t)) (should (search-forward "\\section{A section}\n" nil t)) - (should (search-forward "\\begin{frame}\n" nil t)) + (should (search-forward "\\begin{frame}" nil t)) (should (search-forward "\\frametitle{A frame}\n" nil t)) - (should (search-forward "\\end{frame}\n" nil t)) - (should (search-forward "\\begin{frame*}\n" nil t)) + (should (search-forward "\\end{frame}" nil t)) + (should (search-forward "\\begin{frame*}" nil t)) (should (search-forward "\\frametitle{A frame with a listing}\n" nil t)) - (should (search-forward "\\end{frame*}\n" nil t)))))) + (should (search-forward "\\end{frame*}" nil t)))))) (ert-deftest test-ox-beamer/beamer-verb-frame () "Test that a frame with verbatim elements sets fragile in beamer. @@ -270,11 +270,9 @@ (ert-deftest test-ox-beamer/beamer-verb-frame () (should (search-forward "\\documentclass[presentation,11pt,t]{beamer}" nil t)) (should (search-forward "\\usetheme{" nil t))) (should (search-forward "\\section{A section}\n" nil t)) - (should (search-forward-regexp "^\\\\begin{frame}\\[.+?]$" nil t)) - (should (search-forward "\\frametitle{A frame}\n" nil t)) + (should (search-forward-regexp "^\\\\begin{frame}\\[.+?]{A frame}$" nil t)) (should (search-forward "\\end{frame}\n" nil t)) - (should (search-forward-regexp "^\\\\begin{frame}\\[.+?\\,fragile]$" nil t)) - (should (search-forward "\\frametitle{A frame with a listing}\n" nil t)) + (should (search-forward-regexp "^\\\\begin{frame}\\[.+?\\,fragile]{A frame with a listing}$" nil t)) (should (search-forward "\\end{frame}\n" nil t))))) (provide 'test-ox-beamer) -- 2.43.0
