From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id ECYIF5DyDmb51AAAqHPOHw:P1 (envelope-from ) for ; Thu, 04 Apr 2024 20:33:52 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id ECYIF5DyDmb51AAAqHPOHw (envelope-from ) for ; Thu, 04 Apr 2024 20:33:52 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=berkeley.edu header.s=google header.b=QnjxlP5S; 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=reject) header.from=berkeley.edu ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1712255632; 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=G/4GkWMcjKQSgO4UZtr4bsBMLjknJ4tBq8CEPCZWRWY=; b=ElJ/MMiG+vxrjf+Q8IMXMom7HEFTXX8UbePpkw9fLkSLuacZkrPVxlJXht90N1j4J6JsAI pYN+6GjLLWizMrcrpD8D9L26r/YhWDRJaA1MKV1HgVloUvt6qG5LSqM5HjeVbobKoYiulz 8kjLg3BBa2Ioiz9pqjeMyMPlCyyKSe5l9wfRf23S+NEhodsxT8mjmBXp5zjMW0hQ7vtS1e mU4DxzHvDP7uhq3PswfnwT53dv4Pe7aNz8384oYKNGaTMVMOGcHF7NZU+XrZQ0ClOe8df5 fKcaerWO0SOBuaHEzTipZNPyukCpep/9e+boi5EWOT5nuP5gCzmEIqYqgzWAfw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1712255632; a=rsa-sha256; cv=none; b=e+MUB2SKXdmEeCR/kqKFkLbv1SLRRZb8DKa/uB2P3TvCMDmY9zKW3ckEZc1uE4CDDkcqEZ i8IbZZytl1QrBZsX2HYhWmlB8bby12Oe+4ZtitsRvW4wq7lBpGOR5erosXcRebgNOcZK39 b65qqGmqXjbOvjXruTVc2P9NQqC41MTjZOmpA5w83S7zz9RKTLq1YrpZ+Fgwt0BY0hRWgO +KdN8EV0wnaLiormDmtEavLXG/kOK7x0XpQhkNvEPEPYViQiHyjBZ3PR5+zxivg5kWkZWc dBCWq9lBc25ZxHsSrQek6t2GxiBRqOfcm0XBkcj8MqxBGczbfzPpkfTEJ/qyZg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=berkeley.edu header.s=google header.b=QnjxlP5S; 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=reject) header.from=berkeley.edu 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 200DF63D87 for ; Thu, 4 Apr 2024 20:33:51 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rsRtQ-0005FW-Vs; Thu, 04 Apr 2024 14:32:57 -0400 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 1rsRtP-0005FM-Qc for emacs-orgmode@gnu.org; Thu, 04 Apr 2024 14:32:56 -0400 Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rsRtM-0005zr-Mv for emacs-orgmode@gnu.org; Thu, 04 Apr 2024 14:32:55 -0400 Received: by mail-pf1-x432.google.com with SMTP id d2e1a72fcca58-6ecec796323so950041b3a.3 for ; Thu, 04 Apr 2024 11:32:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=berkeley.edu; s=google; t=1712255569; x=1712860369; 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=G/4GkWMcjKQSgO4UZtr4bsBMLjknJ4tBq8CEPCZWRWY=; b=QnjxlP5SrFQl0MrUJ4OJjHiTl2FXuwZkhZPhXQwlYD7tkFZem/MX5g/IpCRfS+Av/F yg3WCNtOnrgfMxT7E1Cf7aNVj4BlR4OhKr0XMVKXQHbft95zpFCW2GhYnzrluftJEmX2 SYwwdjS1j+J3Cl1Kb/839stGZcWwtdUTDS0tTSBHSAheDUqXXCzotoeWiV2riaR0g1L1 iCZ+D5Ja8LIvCHlmrXymyfi3ucRd3EfftvJdzhYUU8f7wByBNOb3dNTUH8th8vJnEUR3 8XdYCaNBfbq/9bPeypD05Zv6gX2s1pInChBCUq5r1o3ZD+stYD++beyy1I/AStvvDlt4 uyYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712255569; x=1712860369; 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=G/4GkWMcjKQSgO4UZtr4bsBMLjknJ4tBq8CEPCZWRWY=; b=Oq8dRg4e5PkKieDO/egs/K9bsEw/Jx3Ynd3hzxZEsZ6IP8uvjnJBp/1MF88BE5TvK/ C9WCneXXXgRLBp0qRX2f/m172Zp7JxLQaH0q+rjBqEMDmA87551b1iZ7J66bAk4+GV21 tbV0fApmbjx1dY+pwVRwCnubKq52MWWGUodpztOCHzeaC9y46lMYuXnAydUMTVGIk5Zi 8Lz9Paetc+LHVRZ/cntXlnOfxjGAMSrJxb/BcuYpztrcX7SSseUgpXjU2MMmY4CZL1KM if039pmbsv0sP4WeMkhycoehg/z53YFK/tmLIkY7FB8mafp2qdVUu9rdA9xrrogepJUG iQpw== X-Gm-Message-State: AOJu0YzHUf7BwerIJ0zy3cGx6AttpILu0wxuSFVRbHyAQw+WxOeza3qT UyQobjlcQaq6OxAKo1pr4G0XPRGarSKh8NJUEtNjONhLDneQbmo5HRvkyQK6njptuUgJ/nlM/JO SXw== X-Google-Smtp-Source: AGHT+IFAL6gHClctvc0YK2Hqrb4plau6OKrzt1mxjyfYk2eaMufVWSJHNX5AsU15Hd/cEonQ+pyVMw== X-Received: by 2002:a05:6a00:3991:b0:6ea:c4e5:a252 with SMTP id fi17-20020a056a00399100b006eac4e5a252mr4026701pfb.5.1712255569051; Thu, 04 Apr 2024 11:32:49 -0700 (PDT) Received: from smtpclient.apple (157-131-170-17.fiber.dynamic.sonic.net. [157.131.170.17]) by smtp.gmail.com with ESMTPSA id j65-20020a638b44000000b005dc5129ba9dsm13815871pge.72.2024.04.04.11.32.46 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 04 Apr 2024 11:32:46 -0700 (PDT) From: Richard Stanton Message-Id: <9111AA5D-0CD2-4317-9FE2-CDEDA2561477@berkeley.edu> Content-Type: multipart/alternative; boundary="Apple-Mail=_D81E7767-4205-4976-849D-B0A608102B48" Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.8\)) Subject: Re: How to export a single subtree but include document preamble? Date: Thu, 4 Apr 2024 11:32:45 -0700 In-Reply-To: <8A1DD68F-1F73-458A-B4AB-4479BDA76882@berkeley.edu> Cc: srandby@gmail.com To: emacs-orgmode@gnu.org References: <8A1DD68F-1F73-458A-B4AB-4479BDA76882@berkeley.edu> X-Mailer: Apple Mail (2.3696.120.41.1.8) Received-SPF: pass client-ip=2607:f8b0:4864:20::432; envelope-from=rhstanton@berkeley.edu; helo=mail-pf1-x432.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, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=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-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -4.95 X-Spam-Score: -4.95 X-Migadu-Queue-Id: 200DF63D87 X-Migadu-Scanner: mx13.migadu.com X-TUID: hnUIskGcRV4u --Apple-Mail=_D81E7767-4205-4976-849D-B0A608102B48 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 On Apr 4, 2024, at 11:11 AM, Richard Stanton = wrote: >=20 >> I don't know if this does what you want, but I use a =E2=80=98PROPERTIE= S=E2=80=99 drawer right below the subtree's headline and in that drawer, = I put the following code: >>=20 >> :EXPORT_LATEX_HEADER_EXTRA: \input{latex-preamble.tex} >>=20 >> Scott Randby >=20 > Thanks for the suggestion!=20 >=20 > It would still be nice (i.e., you wouldn=E2=80=99t have to do this for = every section you ever want to export) to have a way of specifying a = line that gets executed for EVERY (say) LaTeX export. Or else an option = to do something like include everything in the file before the first = section header. That capability does (if you=E2=80=99re careful) seem to exist. In my = case, I just had to replace #+include: setup.org with=20 #+setupfile: setup.org and now exporting includes the macro definitions in setup.org = even when I=E2=80=99m only exporting a subtree.= --Apple-Mail=_D81E7767-4205-4976-849D-B0A608102B48 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 On = Apr 4, 2024, at 11:11 AM, Richard Stanton <rhstanton@berkeley.edu> wrote:

I don't know if this = does what you want, but I use a =E2=80=98PROPERTIES=E2=80=99 drawer = right below the subtree's headline and in that drawer, I put the = following code:

:EXPORT_LATEX_HEADER_EXTRA: = \input{latex-preamble.tex}

Scott Randby

Thanks for the suggestion!

It would still be nice (i.e., you wouldn=E2=80=99= t have to do this for every section you ever want to export) to have a = way of specifying a line that gets executed for EVERY (say) LaTeX = export. Or else an option to do something like include everything in the = file before the first section header.

That = capability does (if you=E2=80=99re careful) seem to exist. In my case, I = just had to replace

#+include: setup.org

with 

#+setupfile: setup.org

and = now exporting includes the macro definitions in setup.org even when I=E2=80=99= m only exporting a subtree.
= --Apple-Mail=_D81E7767-4205-4976-849D-B0A608102B48--