From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id aMjREb+as2VnWQEA62LTzQ:P1 (envelope-from ) for ; Fri, 26 Jan 2024 12:42:55 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id aMjREb+as2VnWQEA62LTzQ (envelope-from ) for ; Fri, 26 Jan 2024 12:42:55 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=jrgYihDs; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1706269375; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=Qx/nyONZk8VhDhj1msDW25WITZrQWMqMoGdY/s7StEQ=; b=BML1WX7/gO05I7ZgkMYVk1f/iib2tY3qBXZRtVyQRvO3w1vO3aJEDsIF7O3Mf0tB7QIOAi FvmGdg+xBp01BkE+mpIESJ0DwUBHQ5Scg1snAWCPc7Ebu7vNOPJ2HunmmbvLdcnCtTTsSi fw60GIJf5kkwrF/Uh/B6/L+9mitofhLAH3/eKrLzhZYWpdbr0Azc03YKJMYfggqqRvpRt3 wUVXxOk03HAUhRa4edMMbscippXpqmJMGzPHRLIGyFn4vB+hel3/KS4aIV9iiKi3RuqhdU GLcATQT2OpoRuoOfQe4dhjzg9hG/xXIAHiO0qiF8Kvj/qlnnNMboM1YqVG2x/Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=jrgYihDs; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1706269375; a=rsa-sha256; cv=none; b=NZPACfCqHFWA5a0FrxtKdLOMqO88bYU94jUtmr3Ytb0X9RYgm1EOM1AAr0do4vsVSvJpPP gXhYqhV8Fv4j1f4De/kznn51WqX3KIjd7vLq909EEEZWR8+T/EFxAHzzeLC+siyDsXHc6y 4gQtkygMK0NNIRsPZIi+gnTYTwU5QXOt/8tLKIXIodpQBgmJ24Gf4i3jmLTIz/muVdy2kR lGbqsSQhLI5KduAwEZZFcr8ikpM6cJ7316dMkdUgrVim3aQH2hdqJ4QD+QpFHPQwqj9AeR oj9/guLxQI/+dpUyESm8jT6jJzyn9/tRYavUFbWt97U0oynAj98nkc+d4+XTJg== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 07F9C14503 for ; Fri, 26 Jan 2024 12:42:55 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rTKar-0001S3-4h; Fri, 26 Jan 2024 06:41:57 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rTKao-0001Rt-Hc for emacs-orgmode@gnu.org; Fri, 26 Jan 2024 06:41:54 -0500 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rTKam-00044C-8v for emacs-orgmode@gnu.org; Fri, 26 Jan 2024 06:41:54 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 54536240103 for ; Fri, 26 Jan 2024 12:41:50 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1706269310; bh=nQMZJSmtuwtekwwkFdvrVOMtabepogAccUieXaBSVWM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=jrgYihDsRy1o9lx+aAl3gPWpzLwPhEZRxNaJ1ohpn17CRmKk7Y7sjNTv0peGpXuW5 Dz/dNvjm0XlemwWg86/r/XXdLn8Dfa8d5OEVqlAvvmYOMyt7bDW9VIjC3ICRJtan0y WZSpd51A+itnj0F2WAt3uKjEMQn3lP2Ty/xKFLQj7ZPpwR6djHEWytGnR5Se1cB9d6 NZytstAb206wwv5aNA5eHwWADutHF9Z7PWxR63DkO5I8H1JHNLXDdWl43h7qcv4wII qlpC+blNbN89p47HYjfAQ3/76QoowTmjXlLDnf4cwizRtlZwTEgVFR8nOEmvrkEzRL gqUzc78EZfdlw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TLwlJ6Csxz6txT; Fri, 26 Jan 2024 12:41:48 +0100 (CET) From: Ihor Radchenko To: Leo Butler Cc: Ihor Radchenko , Daniel Fleischer , Org Mode Mailing List Subject: Re: [BUG] beamer export In-Reply-To: <871qa5qtl0.fsf@t14.reltub.ca> References: <871qrvjn9d.fsf@t14.reltub.ca> <877d1maogi.fsf@localhost> <87il3o5a0q.fsf@localhost> <87zfwwrnpt.fsf@t14.reltub.ca> <87le8eg1hs.fsf@localhost> <871qa5qtl0.fsf@t14.reltub.ca> Date: Fri, 26 Jan 2024 11:45:18 +0000 Message-ID: <87cytofhdd.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -9.74 X-Migadu-Scanner: mx13.migadu.com X-Spam-Score: -9.74 X-Migadu-Queue-Id: 07F9C14503 X-TUID: i4xvGoXKzRU6 Leo Butler writes: >> Apparently, LaTeX has really hard time processing verbatim code inside >> beamer frames. > > I looked again at the solution here: > https://tex.stackexchange.com/questions/140719/verbatim-in-beamer-showing-error-file-ended-while-scanning-use-of-xverbatim > > and it errors out with a recent version of pdflatex: > > This is pdfTeX, Version 3.141592653-2.6-1.40.25 (TeX Live 2023/Debian) (preloaded format=pdflatex) > > This is, apparently, a known problem: > > https://github.com/josephwright/beamer/issues/360 > > The end of that issue report includes a work-around that we might apply > in org. I have attached a patch for your feedback. The example that > stimulated this discussion compiles with the patch and the testsuite > shows no errors related to it. Thanks! I have concerns about your approach though. You are replacing all the frame environments with custom environment unconditionally. However, custom environment has downsides. For example, \againframe will stop working, as pointed earlier in the linked beamer thread https://github.com/josephwright/beamer/issues/360#issuecomment-708705250 Since the problem appears only when the frame contents contains \end{frame}, it may be sufficient to replace the standard frame environment with the workaround only in such scenario. > +;; Needed to set-up Beamer export. > +(defconst org-beamer--frame-environment > + (concat "orgframe" (org-id-uuid)) > + "Name of the beamer frame environment. > +This is randomized to prevent collisions.") Please use constant name. (org-id-uuid) makes export randomized for no good reason. > ;; Install a default set-up for Beamer export. > (unless (assoc "beamer" org-latex-classes) > (add-to-list 'org-latex-classes > - '("beamer" > - "\\documentclass[presentation]{beamer}" > + `("beamer" > + ,(concat "\\documentclass[presentation]{beamer}\n" > + ;; Define an alias for the beamer frame environment > + "\\newenvironment<>{" > + org-beamer--frame-environment > + "}[1][]{\\begin{frame}[environment=" > + org-beamer--frame-environment > + ",#1]}{\\end{frame}}") Please use `org-beamer-template' rather than modifying the class. Modifying the class may confuse users. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at