From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id 2PUlNGb1tWWfmQAAqHPOHw:P1 (envelope-from ) for ; Sun, 28 Jan 2024 07:34:14 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id 2PUlNGb1tWWfmQAAqHPOHw (envelope-from ) for ; Sun, 28 Jan 2024 07:34:14 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=iIRV5WAc; dmarc=pass (policy=none) header.from=gmail.com; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1706423654; 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=nM54jm2G8LJGYUGPVVTcTzQDTTp/NKXu0NhfLC5RHR8=; b=sAcf8U7bjP7j69Mc5du2h63P9j0y/4kuxoH86l6rNyuRZAkac4ZaUc5WeIV7Zj4OD89xN/ oR9SPt+F+PVBQCa2tS2t2ohxpDBFje7nJX8sRUXCs8f6r0YSfdnn47aYCmlzaGNGCoUDWi ihw5rYogP9GllQjfajotPwxcAJPWI79QCDiIa3f+SSn5g1i7g1iHJ9uiNzh0y1u1ckJ3+R K7lR5L6J70rK7kIf7XBlvIzCjw/FL5OYbcfxEhJ4P71MoAMwQPxf5DNXbaniWVIXywI7HL Zen31QHcGBeI5ekx24ZsswRPbZCYj9nLwbefA6Cz/TxqjN3NLfyJ+f7bZutlrQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=iIRV5WAc; dmarc=pass (policy=none) header.from=gmail.com; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1706423654; a=rsa-sha256; cv=none; b=EIspjhOn1RegvGVd8E5xpKPXYUxflOM/77f9Fe2y7EWbWHmVgaqyQ6Qk/1vbddQ5W40EOx YilF7jBICCmaZ8fi6OOwFM//xIqXXMuBIloIEhJ+cjqfkUJwqT5XX1QtwLz+P7rO7uFtlV A4bRshDTcY9ysbI2vjoLetXOSEHwX4/CYHMi1Pht+VB9LzGXVE+MxasOItrvq08+ektKpb 31fa//R7P6msBFIZaJb3/wPohYFxA02/UXR96KP3JCb2F/rhQUm4UYBC4NUzVRY9w0yQro n0FkUH+Es96hGWATwhaHuKwYq5lh1aLldNMIhrsfGZVZOeytehsTqpU9JIzaIg== 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 5417E1042C for ; Sun, 28 Jan 2024 07:34:14 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rTyjI-0007TR-9e; Sun, 28 Jan 2024 01:33:21 -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 1rTyjE-0007Qw-SF for emacs-orgmode@gnu.org; Sun, 28 Jan 2024 01:33:17 -0500 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rTyjB-0005fk-2X for emacs-orgmode@gnu.org; Sun, 28 Jan 2024 01:33:16 -0500 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-40ef0643722so6835685e9.3 for ; Sat, 27 Jan 2024 22:33:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706423582; x=1707028382; darn=gnu.org; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:from:to:cc:subject:date:message-id:reply-to; bh=nM54jm2G8LJGYUGPVVTcTzQDTTp/NKXu0NhfLC5RHR8=; b=iIRV5WAcFwkAe3YC/7CHCwzCXaKl1mcVqlEOEuNB49fRhHOGaKgEG4WUkWCTn5SVdG Zr6j0xfWUVMl8j5M9Bk/J8UpOglUHPAuDe7wux+okgAwP6drXd1NY1whQmLS0Vp1MrSD nn1JYYRFQ3lzbMY0gsJPp3Y6fQ2fE6bZhq1Z6x2ZwJXUG6oYsB1VQgV0GxBhkffOAmja N7wGVZpuTkq4sWQMReUSoFgRv4NOJp5y8zw/oYRQzwXJQIt1qDZlVoLPd31T0tz14HhE 5WzLGNPZ2Ick+tEKN5w0Pq9LZEX9Cw5/xJ6PDpM0yYFD1dihfELBUVmxBVZqrEGPRSeL IT9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706423582; x=1707028382; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=nM54jm2G8LJGYUGPVVTcTzQDTTp/NKXu0NhfLC5RHR8=; b=ozse5ebPJ8X0cs8unroRuZgJcjJXYncY7ECf+t/V4jx4pKkp79pXKKb8we9tNO4dxD tBfB8PEeIbG4VkdvtFYEg4rz4gJGIRa48I97Lqmn6oNCIr43OOHPxmQGsY+/w9rN02V7 PgFnVM0Vlm2SPs4a9JOI7YyITcTVt8Nk7C0bUKkP+6uAqIybqYFGyKUcXhR1Xd0X09vQ oZsGgOlgo1VSwstyH7+AS8pYDiBkMxxl9wvppCN1Fdot+a/296lA+5wS5cMotMIXT0d+ ARFqDTfYVbSEU/AO7QYztVXLZ9ee20NOCe6Qr1v1vdnAQ2VBzNT065GiN1gtkRIidZro Vciw== X-Gm-Message-State: AOJu0YxkjNVxxDf2QhlWF9ZIB266Sa2sGhgUPyZ+/kX27Hj3PP7kGVAS q8cUu0OsVlaTuObkgX9BiZnlSi7pWTXEMNtnmMDNc8Km2uEWsXmJi3Y72mNG X-Google-Smtp-Source: AGHT+IHv0BVFsWzIPh1aWjKJ4v3SrdwINm+CmNuKbeF5kIz3EzgrDJd1/hazAvIWxIPlkYaGFwhV8g== X-Received: by 2002:a05:600c:3b28:b0:40e:6278:95e0 with SMTP id m40-20020a05600c3b2800b0040e627895e0mr2184431wms.22.1706423581977; Sat, 27 Jan 2024 22:33:01 -0800 (PST) Received: from smtpclient.apple (185.red-79-148-95.dynamicip.rima-tde.net. [79.148.95.185]) by smtp.gmail.com with ESMTPSA id g7-20020a05600c4ec700b0040e5945307esm6483055wmq.40.2024.01.27.22.33.01 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 27 Jan 2024 22:33:01 -0800 (PST) From: Pedro Andres Aranda Gutierrez Message-Id: Content-Type: multipart/alternative; boundary="Apple-Mail=_83C8067F-CE26-41FB-B2D7-93DB6069AA4F" Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.8\)) Subject: Re: Re: [BUG] beamer export Date: Sun, 28 Jan 2024 07:33:00 +0100 In-Reply-To: Cc: Leo.Butler@umanitoba.ca, Ihor Radchenko To: Org Mode List References: X-Mailer: Apple Mail (2.3696.120.41.1.8) Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=paaguti@gmail.com; helo=mail-wm1-x32a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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: -8.47 X-Spam-Score: -8.47 X-Migadu-Queue-Id: 5417E1042C X-Migadu-Scanner: mx12.migadu.com X-TUID: A9Xn/x5fd273 --Apple-Mail=_83C8067F-CE26-41FB-B2D7-93DB6069AA4F Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hi CAVEAT EMPTOR: Although it=E2=80=99s some years that I have been using = org to create my slides, I never needed this=E2=80=A6 Interesting to = learn new things ;-)=20 I personally would not oppose to have a customizable = org-frame-environment variable, with its default value being = =E2=80=9Cframe=E2=80=9D.=20 Then, when actually emitting the code, add something like: (unless (string=3D org-frame-environment =E2=80=9Cframe=E2=80=9D =E2=80=A6) Which would create the code most of us would expect (i.e. = \begin{frame}=E2=80=A6\end{frame}) in almost any case except when you = really need the `newenvironment=E2=80=99 construct. My .02 cents, /PA > El 27 ene 2024, a las 18:00, emacs-orgmode-request@gnu.org escribi=C3=B3= : >=20 > Message: 2 > Date: Fri, 26 Jan 2024 20:54:17 +0000 > From: Leo Butler > > To: Ihor Radchenko > > Cc: Ihor Radchenko >, = Daniel Fleischer > >, Org Mode = Mailing List > > Subject: Re: [BUG] beamer export > Message-ID: <87wmrvlsso.fsf@t14.reltub.ca = > > Content-Type: text/plain; charset=3D"iso-8859-1" >=20 > On Fri, Jan 26 2024, Ihor Radchenko > wrote: >=20 >> Leo Butler > = writes: >>=20 >>>> Apparently, LaTeX has really hard time processing verbatim code = inside >>>> beamer frames. >>>=20 >>> 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 = >>>=20 >>> and it errors out with a recent version of pdflatex: >>>=20 >>> This is pdfTeX, Version 3.141592653-2.6-1.40.25 (TeX Live = 2023/Debian) (preloaded format=3Dpdflatex) >>>=20 >>> This is, apparently, a known problem: >>>=20 >>> https://github.com/josephwright/beamer/issues/360 = >>>=20 >>> 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. >>=20 >> Thanks! >> I have concerns about your approach though. >>=20 >> 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 = = >=20 > The comment that you are citing shows how to define the custom > environment so that \againframe works correctly. See the attachment > `beamer-example-againframe.tex' and pdf. You can see that \againframe > works with the custom environment. >=20 >>=20 >> 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. >=20 > Yes, that might be true. But my feeling is that it would be simpler = and > more robust to use the custom frame environment in most cases. >=20 >>=20 >>> +;; 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.") >>=20 >> Please use constant name. (org-id-uuid) makes export randomized for = no >> good reason. >=20 > There is a good reason to randomize (or at least make customize-able) > the environment name: so that beamer code generated by ox-beamer can = be > safely inserted into org files and exported by ox-beamer. With a fixed > name for the environment, we will have just recreated the original > source of the bug report. As a compromise, in the attached patch, I = have > made the environment name customize-able. >=20 >>=20 >>> ;; 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=3D" >>> + org-beamer--frame-environment >>> + ",#1]}{\\end{frame}}") >>=20 >> Please use `org-beamer-template' rather than modifying the class. >> Modifying the class may confuse users. >=20 > Ok, I have done so. >=20 > The docstring of `org-latex-classes' says: >=20 > The HEADER-STRING is the header that will be inserted into the > LaTeX file. It should contain the \documentclass macro, and > anything else that is needed for this setup. >=20 >> =46rom that, I figured that would be the correct place to put that > \newenvironment command. I have moved it, as requested. >=20 > Please see the revised patch. I believe that I have taken into account > your suggestions. >=20 > Leo --Apple-Mail=_83C8067F-CE26-41FB-B2D7-93DB6069AA4F Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 Hi

CAVEAT = EMPTOR: Although it=E2=80=99s some years that I have been using org to = create my slides, I never needed this=E2=80=A6 Interesting to learn new = things ;-) 

I personally would not oppose to have a customizable = org-frame-environment variable, with its default value being = =E2=80=9Cframe=E2=80=9D. 
Then, when actually = emitting the code, add something like:

(unless (string=3D = org-frame-environment =E2=80=9Cframe=E2=80=9D
 =E2=80=A6)

Which would create the code most of us would expect (i.e. = \begin{frame}=E2=80=A6\end{frame}) in almost any case except when you = really need the `newenvironment=E2=80=99 construct.

My .02 cents, = /PA

El 27 ene 2024, a las 18:00, emacs-orgmode-request@gnu.org escribi=C3=B3:

Message: 2
Date: Fri, 26 Jan 2024 20:54:17 +0000
From: Leo Butler <Leo.Butler@umanitoba.ca>
To: Ihor Radchenko <yantar92@posteo.net>
Cc: Ihor Radchenko <yantar92@gmail.com>, Daniel Fleischer
<danflscr@gmail.com>, Org Mode Mailing List = <emacs-orgmode@gnu.org>
Subject: Re: [BUG] beamer = export
Message-ID: = <87wmrvlsso.fsf@t14.reltub.ca>
Content-Type: text/plain; charset=3D"iso-8859-1"

On Fri, Jan 26 2024, Ihor = Radchenko <yantar92@posteo.net> wrote:

Leo Butler <Leo.Butler@umanitoba.ca> 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-beam= er-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=3Dpdflatex)

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

The comment that you are citing shows how to define the = custom
environment = so that \againframe works correctly. See the attachment
`beamer-example-againframe.tex' = and pdf. You can see that \againframe
works with the custom environment.


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.

Yes, that might be true. But my feeling is that it would be = simpler and
more robust = to use the custom frame environment in most cases.


+;; 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.

There is a good reason to randomize (or at least make = customize-able)
the environment name: so that beamer code generated by = ox-beamer can be
safely inserted into org files and exported by ox-beamer. = With a fixed
name for the = environment, we will have just recreated the original
source of the bug report. As a = compromise, in the attached patch, I have
made the environment name customize-able.


;; 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"
+ =             &n= bsp;           &nbs= p;;; Define an alias for the beamer frame environment
+ =             &n= bsp;           "\\n= ewenvironment<>{"
+ =             &n= bsp;           org-= beamer--frame-environment
+ =             &n= bsp;           "}[1= ][]{\\begin{frame}[environment=3D"
+ =             &n= bsp;           org-= beamer--frame-environment
+ =             &n= bsp;           ",#1= ]}{\\end{frame}}")

Please use = `org-beamer-template' rather than modifying the class.
Modifying the class may confuse users.

Ok, I have done so.

The docstring of `org-latex-classes' says:

   The = HEADER-STRING is the header that will be inserted into the
   LaTeX file. =  It should contain the \documentclass macro, and
   anything else = that is needed for this setup.

=46rom that, I figured that would be = the correct place to put that
\newenvironment command. I have = moved it, as requested.

Please see the revised patch. I believe that I have taken = into account
your = suggestions.

Leo

= --Apple-Mail=_83C8067F-CE26-41FB-B2D7-93DB6069AA4F--