From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id MKQdJ3QGxGMTugAAbAwnHQ (envelope-from ) for ; Sun, 15 Jan 2023 14:58:12 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id gCAbJnQGxGM6/gAAG6o9tA (envelope-from ) for ; Sun, 15 Jan 2023 14:58:12 +0100 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 20AD7294AF for ; Sun, 15 Jan 2023 14:58:12 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pH3W1-0005Vd-8L; Sun, 15 Jan 2023 08:57:41 -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 1pH3Vz-0005VO-Kp for emacs-orgmode@gnu.org; Sun, 15 Jan 2023 08:57:39 -0500 Received: from mx1.polytechnique.org ([129.104.30.34]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pH3Vt-00057h-Do for emacs-orgmode@gnu.org; Sun, 15 Jan 2023 08:57:38 -0500 Received: from TM.local (cbg35-2-78-242-14-140.fbx.proxad.net [78.242.14.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ssl.polytechnique.org (Postfix) with ESMTPSA id 05A6F56460D for ; Sun, 15 Jan 2023 14:57:28 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=polytechnique.org; s=svoboda; t=1673791049; bh=h8dDzEjD8NkI7KCtVHfEnzAjqYDAnFKFq/e9WfbvZOc=; h=From:To:Subject:In-Reply-To:References:Date:Message-ID; b=rAg+SlD8sOI6LY6TGtPX0aYeCfYUEnmRSoiwFAb/S2GHcaCHsXYIFlQ1p0cJmKbZP 5T0RaiZUPwMafq6r++nPwI2fYVqAWFEhpn2U+ljIBpjjCdN52BdWF+UyKnWrdDmhoX UFyowU9Sh9s1qA4gAwuVNLvoknYExLxgQCgDzQ3Q= From: Alan Schmitt To: emacs-orgmode Subject: Re: [BUG] CUSTOM_id ignored on blocks by ox-beamer In-Reply-To: References: <87lemhgwn7.fsf@localhost> Date: Sun, 15 Jan 2023 14:57:25 +0100 Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-AV-Checked: ClamAV using ClamSMTP at svoboda.polytechnique.org (Sun Jan 15 14:57:29 2023 +0100 (CET)) X-Org-Mail: alan.schmitt.1995@polytechnique.org Received-SPF: pass client-ip=129.104.30.34; envelope-from=SRS0=yJDi=5M=polytechnique.org=alan.schmitt@bounces.m4x.org; helo=mx1.polytechnique.org X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 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-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1673791092; a=rsa-sha256; cv=none; b=WSIRGjJ4WILTwysXXaOkxnmU4HoK2slUdf3rlpCL8i1xDaL6Pg1t2cUisvD2teCVb3zeYh 7Jp08samsheOETXnoGaHp3NjnqhH4Hy2bdwv5/LeYefvXJHmMwM+t0TilZvBOluuA6RsMK UlKTZ5yLRbt3tNg6dX9mhvNkBPu3F+EXBd+nItJp007zxf2mTUMjtud2STEM86GIxOuZsF lG/mur7+4EXaq0d1rWfgDA4wPu03nT/nuv8zQ2mHgL4U/2A2udm8Kw6Iwo405KeZJ04GYs w7zyWSrXBYYu4Q4lk5aDpbRHcb17Ydcx85R/Ieot/lQOw9FTzLxW68hLVgA3iA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=polytechnique.org header.s=svoboda header.b=rAg+SlD8; 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=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1673791092; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=o7N6uStOThN8TBZSEOu2w4/NVAHxNuPH5p66YOjWoDk=; b=BgJi1aQGP1phVp+/lOS9IjEMPlrUhWWkEHG2hVfye7t1Gyt5u9r91X7G8lZ6Pp/7+Ue4Fc KThY8moI1XFiSPoNHIDplKqThri+rhr+MJX8BuXQqvXLKkVAtCgddMW6zpnJYw85mGR1Tg YghIlFx4wYub9+fop3kibHZdG985HQAU8bN57g6qOJSqw7JDhmo+UGMroBO9oAk27T5MHG x+6P85ZRhdCy6ddRsh7C+n3VKP4eTudylVpvpHs1FcyBlhBpx/4eu3GdTed9V+HZnFjJje vZz1c9gyQ9L6em7HJRpIysG11YSvc+pUkRxiq3nQ2W+3rzW49UJuQGLDT40OSw== X-Migadu-Spam-Score: -6.42 X-Spam-Score: -6.42 X-Migadu-Queue-Id: 20AD7294AF X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=polytechnique.org header.s=svoboda header.b=rAg+SlD8; 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=none X-TUID: mTu2N31UEFb/ --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello, Please let me know if there is something I should do to help integrate this patch. Best, Alan On 2023-01-08 17:25, Alan Schmitt writes: > Hello, > > On 2023-01-05 09:26, Ihor Radchenko writes: > >> If you look inside `org-beamer--format-block', it uses >> `org-beamer-environments-default' and `org-beamer-environments-extra' to >> format the blocks. See docstring for the latter for details. >> >> The code responsible for LaTeX block generation is >> >> (when (nth 2 env-format) ; when we non-column block >> (concat >> (org-fill-template ...) ; opening \begin lines >> contents ; block body >> ... ; block closing \end lines >> ) >> >> org-fill-template is using the template from the >> `org-beamer-environments-*' replacing %-chars as described in the >> docstring. >> >> In order to handle CUSTOM_ID property, you can >> (1) Introduce a new %-substitude to be handled in org-fill-template >> call. It will insert block ID. (for example, using >> `org-beamer--get-label') >> (2) modify `org-beamer-environments-default' to insert label >> appropriately. >> >> Patches welcome! > > Thank you for the detailed instructions. Here is my attempt at this. > I=E2=80=99ve tested it and it works. > >>>From 1747786c7106d0d90d9e8752e361552afacb2d4d Mon Sep 17 00:00:00 2001 > From: Alan Schmitt > Date: Sun, 8 Jan 2023 17:20:31 +0100 > Subject: [PATCH] Add labels to latex export of beamer blocks > > A new option %l is available to be used in `org-beamer-environments-*' > to insert the label of the current block, obtained using > `org-babel--get-label' > --- > lisp/ox-beamer.el | 9 +++++---- > 1 file changed, 5 insertions(+), 4 deletions(-) > > diff --git a/lisp/ox-beamer.el b/lisp/ox-beamer.el > index 689bf1559..3518a0f50 100644 > --- a/lisp/ox-beamer.el > +++ b/lisp/ox-beamer.el > @@ -178,10 +178,10 @@ through `org-beamer-environments-extra' variable.") > ("quotation" "q" "\\begin{quotation}%a %% %h" "\\end{quotati= on}") > ("quote" "Q" "\\begin{quote}%a %% %h" "\\end{quote}") > ("structureenv" "s" "\\begin{structureenv}%a %% %h" "\\end{structu= reenv}") > - ("theorem" "t" "\\begin{theorem}%a[%h]" "\\end{theorem= }") > - ("definition" "d" "\\begin{definition}%a[%h]" "\\end{definit= ion}") > - ("example" "e" "\\begin{example}%a[%h]" "\\end{example= }") > - ("exampleblock" "E" "\\begin{exampleblock}%a{%h}" "\\end{example= block}") > + ("theorem" "t" "\\begin{theorem}%a[%h]%l" "\\end{theor= em}") > + ("definition" "d" "\\begin{definition}%a[%h]%l" "\\end{defin= ition}") > + ("example" "e" "\\begin{example}%a[%h]%l" "\\end{examp= le}") > + ("exampleblock" "E" "\\begin{exampleblock}%a{%h}%l" "\\end{examp= leblock}") > ("proof" "p" "\\begin{proof}%a[%h]" "\\end{proof}") > ("beamercolorbox" "o" "\\begin{beamercolorbox}%o{%h}" "\\end{beamerc= olorbox}")) > "Environments triggered by properties in Beamer export. > @@ -578,6 +578,7 @@ used as a communication channel." > (cons "O" (or raw-options "")) > (cons "h" title) > (cons "r" raw-title) > + (cons "l" (format "\\label{%s}" (org-beamer--get-label h= eadline info))) > (cons "H" (if (equal raw-title "") "" > (format "{%s}" raw-title))) > (cons "U" (if (equal raw-title "") "" > --=20 > 2.39.0 > > > Best, > > Alan --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQFTBAEBCAA9FiEE6lXof/BsSVW56ZmGBA0KO07S5ccFAmPEBkYfHGFsYW4uc2No bWl0dEBwb2x5dGVjaG5pcXVlLm9yZwAKCRAEDQo7TtLlx6f7B/9sxnCHhh9kvhnc srqV0E9tYjWqO3y4o9HzkOoLycYM1zocjByzLUL0UsOcwhT64Xp+4P+99mev6iw1 dhv2EP0OfFJMVYm07KyQNMIjJpucQUwces5G5AeoOC4WLox6bbVhszd4/CZ5v/ib i0dpn5/hL7YpIGTR4ZDtOaqrEnZ67XNZ8MF5PqZ5gJTyQgMz9fWcBqYyzltNnuEb CapxaZ6+mJrIBzdFVlnHZE5Nvp/GOyeVAzIYErSs8Ku2M6sKgVpQVwV4pURnDETV pVQKLpORqnsYZh7FjQNn5TILrK8jzwyss9pnDaXtbljbJQmWH6MOEPIl+QdvKHq4 GNCgYVJ7 =j/bw -----END PGP SIGNATURE----- --=-=-=--