From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id sP6nK2UkK2OGMwEAbAwnHQ (envelope-from ) for ; Wed, 21 Sep 2022 16:49:09 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 8O+FK2UkK2O1aAAAauVa8A (envelope-from ) for ; Wed, 21 Sep 2022 16:49:09 +0200 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 3D41B2B8BB for ; Wed, 21 Sep 2022 16:49:09 +0200 (CEST) Received: from localhost ([::1]:35004 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ob12C-0001It-CH for larch@yhetil.org; Wed, 21 Sep 2022 10:49:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39800) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ob0wC-0006WB-4Q for emacs-orgmode@gnu.org; Wed, 21 Sep 2022 10:42:56 -0400 Received: from ciao.gmane.io ([116.202.254.214]:57438) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ob0wA-00034S-O8 for emacs-orgmode@gnu.org; Wed, 21 Sep 2022 10:42:55 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1ob0w8-0003Be-EK for emacs-orgmode@gnu.org; Wed, 21 Sep 2022 16:42:52 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org From: Max Nikulin Subject: Re: [Patch] Pre-/postpend arbitrary LaTeX code to a section Date: Wed, 21 Sep 2022 21:42:46 +0700 Message-ID: References: <87o7vcsw8m.fsf@posteo.net> <87czbqyy5i.fsf@localhost> <87sfkmdkxa.fsf@posteo.net> <878rmdxg17.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Content-Language: en-US In-Reply-To: <878rmdxg17.fsf@localhost> Received-SPF: pass client-ip=116.202.254.214; envelope-from=geo-emacs-orgmode@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -8 X-Spam_score: -0.9 X-Spam_bar: / X-Spam_report: (-0.9 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FORGED_MUA_MOZILLA=2.309, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NICE_REPLY_A=-3.702, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1663771749; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=VZxqpnYnFPY4Y3SGcPtb7Nf8RMkdMKldWmv2XQzX9Go=; b=aIYao/xaQpcPIiggV84rCLHV/tz9sMAIz78YLua3zzu8kapKlruCes4ecr0+j7IqYq1qYo Yax+OGMislEWTiBF8S92FeUJicyS1kdY9Oo9UzemmH0R78fTW8Szyl1Fd/Fg6uZnUgslxi DPUKgRNaWJS0+jvdvdpNzD+JTShOVF82Qk6clgj3k8Z4/LQXPXvdiXfQfYnB/e9F0y2SH/ pKzCYM6Hl7PJYlaD69ZqaAdkoNgkyz2+0EcG6Gxbip0Xfay9ri+qtIEGNRmqYswa6hqIV/ xOm/82HD7Vpg5GDnxx5I8oX3HftEBT3DtlucZCZAR6e3n44XgfGpfVgDwm0SIQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1663771749; a=rsa-sha256; cv=none; b=cJhib8gPGSy5Phwk/H90JzwsYmS3CKd03E1rajsjiZ13ATFW3JQjk+2IvaUlO6Oj06n3dK X/N6EJl0Vpww+Ib6pL/5Vdry5DWK+AxG2C83Nkk42QFI2HVfND7thHiJGab8bmya9ofw5H 1tEAFZApyRa1HcTxGI8YwrqKQijjc8ypXXC7P8QWPv9WjFD5fdQaNNY7fLvnD0SCtnDLom 8ZuFbFKhgQ8TCX5Ub2jKr5htR4IYnD33aJvI/Pber7aT5j7y9Wf9rFe6sY5vTymtY5HMxa j59yjRgxIuea6/g+Dx+F/NUroVvMyvIWPg1cRjrQ7l644p+hf5L1WSs26SGqMA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); 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" X-Migadu-Spam-Score: 2.36 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); 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" X-Migadu-Queue-Id: 3D41B2B8BB X-Spam-Score: 2.36 X-Migadu-Scanner: scn0.migadu.com X-TUID: mrfYyP68Ezwr On 21/09/2022 15:55, Ihor Radchenko wrote: > > There is nothing wrong about this, but I feel that this kind of approach > is encouraging to shoot your own leg a bit too much. I am afraid, it is unavoidable facet of flexibility. Anyway arbitrary LaTeX command may be inserted using export snippet or block. > Also, :presec/:postsec property names are > confusing --- it is unclear if they are specific to LaTeX. (when about, > say, Beamer) An example of use case for beamer: M. ‘quintus’ Gülker. Beamer export: Executing LaTeX between two frames. Tue, 21 Jun 2022 10:01:03 +0200. https//list.orgmode.org/87mte6tphc.fsf@guelker.eu > * Section > :PROPERTIES: > :attr_latex: :prepend "section" \setcounter{secnumdepth}{0} > :attr_latex+: :prepend "section" \addtocontents{toc}{\protect\setcounter{tocdepth}{0}\ignorespaces} > :attr_latex+: :append "section" \setcounter{secnumdepth}{2} > :attr_latex+: :append "section" \addtocontents{toc}{\protect\setcounter{tocdepth}{2}\ignorespaces} > :END: > > I suggest to use more canonical attr_latex that explicitly limits the > export backend. The only objection is that for ox-html users may expect any attr_html key-value pairs directly become attributes of the HTML element rather than control of output at higher level.