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 WN+oJOImK2OBDwEAbAwnHQ (envelope-from ) for ; Wed, 21 Sep 2022 16:59:46 +0200 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 SFOqI+ImK2PIZAEAG6o9tA (envelope-from ) for ; Wed, 21 Sep 2022 16:59:46 +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 0D3E322547 for ; Wed, 21 Sep 2022 16:59:45 +0200 (CEST) Received: from localhost ([::1]:37940 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ob1CS-00053h-Fc for larch@yhetil.org; Wed, 21 Sep 2022 10:59:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38768) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ob0CH-0006o0-M8 for emacs-orgmode@gnu.org; Wed, 21 Sep 2022 09:55:30 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]:35763) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ob0CF-0002og-I9 for emacs-orgmode@gnu.org; Wed, 21 Sep 2022 09:55:29 -0400 Received: by mail-wm1-x32e.google.com with SMTP id r133-20020a1c448b000000b003b494ffc00bso8595322wma.0 for ; Wed, 21 Sep 2022 06:55:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date; bh=BKqQFsuSXHRrZhkSFHHAt+ubcSt2Bn0TcywE81vH3iw=; b=GOZmpUDiaFvRP2EVYWRVsNhmGuzyf4ftKWQ9S4/OBOm4nZXGue5RH1Y1Je4/wW+pia qdvdykWaihkZrCov5jqrisRlCcN+oR6kxSzU528vGpiIpHyCxLafcuEU6df3TSMBAZZU RWLYbMlJQgslOOmYSmomkyet4+8DZtVE+6YKhja8IsZnw58Pbtyrn7qlHRoAUAnIABmg dmkAOAbNwittQwWdbFuaqFgxElEaUM0p37Uig5WHwsrNyqW/E4NWj9+QThI2QvGb4a/F s8AnsVe34LenuDuXzv3Vj+X+/z5ycF+9kdJ4jyP4zBTIxFsxze9k1dW6g7r5mFdyqm9B gTGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date; bh=BKqQFsuSXHRrZhkSFHHAt+ubcSt2Bn0TcywE81vH3iw=; b=3hu6ugoh1had6Eh7PD8C6bVpw1Jn/R3y02UNfSFN63XDo8UNttAgM90kjbRFxcr/8B +6NOPpWa3BLZodSbd/jqev/Dw90BQGLvpC91pG1njX+EiBdtRCzX75SB3bZ1XrDEzzCg Y1aovrKe/uEppFGn0oQOvXrDVCkzUUs3Xj0KvLoyr9i+bNjw2rI4VP099/JqWaYKADl4 0ieSwtQqNeqLAwbdiOWArunQ8Fe8NaYZAFh5wBIsnEmcIsp5uL5NuTZpmfwhAQCOIlZ0 +nVTU50tCpOJmR4uaRpJdLHBNHGRDdJw/a9pv2Yw9W4dmBh6mUktCuo2dOXOMA9yffgi Y9vg== X-Gm-Message-State: ACrzQf0zsrWjy1VohOl+tyyz7xES2M6gDw2cWDkmjhLHLWz1PG+D5Ji8 NV2O+y68m6gBWSoPF4stXRV0yD9BLcog8Q== X-Google-Smtp-Source: AMsMyM6nvHsiXk4nj5Fzqxhe/llEUBrc2mIC2huFoj0rFDlim9PrSFWH2n/hazlZdEZ/kJOYM9nNPA== X-Received: by 2002:a05:600c:4e91:b0:3b4:bcbd:b641 with SMTP id f17-20020a05600c4e9100b003b4bcbdb641mr6145451wmq.59.1663768524536; Wed, 21 Sep 2022 06:55:24 -0700 (PDT) Received: from Home-Mac ([31.210.181.163]) by smtp.gmail.com with ESMTPSA id bd21-20020a05600c1f1500b003a6a3595edasm2958845wmb.27.2022.09.21.06.55.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Sep 2022 06:55:23 -0700 (PDT) From: Daniel Fleischer To: Ihor Radchenko Cc: Juan Manuel =?utf-8?Q?Mac=C3=ADas?= , orgmode Subject: Re: [Patch] Pre-/postpend arbitrary LaTeX code to a section In-Reply-To: <878rmdxg17.fsf@localhost> (Ihor Radchenko's message of "Wed, 21 Sep 2022 16:55:48 +0800") References: <87o7vcsw8m.fsf@posteo.net> <87czbqyy5i.fsf@localhost> <87sfkmdkxa.fsf@posteo.net> <878rmdxg17.fsf@localhost> Date: Wed, 21 Sep 2022 16:55:20 +0300 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (darwin) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=danflscr@gmail.com; helo=mail-wm1-x32e.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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" 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=1663772386; 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=BKqQFsuSXHRrZhkSFHHAt+ubcSt2Bn0TcywE81vH3iw=; b=Lt8oDuD0TVv7lhiZDdEp0jSBTBL303OztmpcsfXGpVwMZX3x/MxQvCnuZsw8EKwLMJVYvp rB4yMR9qKHTd/Mtjje2ZZh0hzgBvPSHMjVgJuiUoiL8/44ctBTB07Yiy68Gt3C01IpkTCe R3bVqo2JEv23TvqWlCIEpPNQQf+zjYHlcVWlFnVl2NYTxVvHgTpSX9xVVtCsuz1toy39Vu 3mRgci1LV7+Pl+gHj4KdYbj3OTdbxFPYKOGhxB6kLWajxM/hbzUYMMf0e2pT/Ntt+xAE9S OuGLQphx6l9o/ZvBsajlx2QzJ6OC3Gj0yaiB42IoRS4KxUxP3onLROSMqzIRLA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1663772386; a=rsa-sha256; cv=none; b=thddj2KVIyUbSdh60B3io+1VyxcU4MLaBfpthork9JmxDS/nUQVPofP41YqK6v72GRyCo5 NtAIClGhLzfEFSSLBUJVRpNas+VQHAx1B5BNw5FzmPc/v5xD9KZDijAl8haIAvFBO08hlV LqUKtsUuKoA0FitNf2zoI9iQuJeGmBaxVttTrZGSzSi/tPr9gcUGvUxtblOvFMpxXDGcjr 8tCukE4TzWDQsyL0F90ijlVt7jfL/4r2DZwUy5AJM/G4naeJq5TSjMnCLj/75BDM+RM2q6 geXQGCSGnBmFPwuF9uOVZ+OypzLrTUTp1G0Ob3O07s53SwDU0S1XQHunMw8X3w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=GOZmpUDi; 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" X-Migadu-Spam-Score: -3.84 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=GOZmpUDi; 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" X-Migadu-Queue-Id: 0D3E322547 X-Spam-Score: -3.84 X-Migadu-Scanner: scn1.migadu.com X-TUID: GONjZlUZWU7p Ihor Radchenko [2022-09-21 Wed 16:55] wrote: > More concretely, I mean something like > > * 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. I don't understand the usecase, that's why I wasn't really following. If you write \vspace{10cm} before some headline, it's going to do the right thing even if it "belongs" to a previous headline. If org-latex-classes is not a good enough solution I also think it should be a general export feature, not specific to latex. In that case you need a general syntax, e.g. properties like "export_prefix", "export_postfix" and the code should be as simple as possible, i.e. copying the text one line before/after the headline. -- Daniel Fleischer