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 ms0.migadu.com with LMTPS id CcvPOfc+VWLtcgEAgWs5BA (envelope-from ) for ; Tue, 12 Apr 2022 10:57:27 +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 IBhCNfc+VWLaNAEAauVa8A (envelope-from ) for ; Tue, 12 Apr 2022 10:57:27 +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 3990B2B93F for ; Tue, 12 Apr 2022 10:57:27 +0200 (CEST) Received: from localhost ([::1]:33514 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1neCL0-0005xw-2q for larch@yhetil.org; Tue, 12 Apr 2022 04:57:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46418) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1neCJm-0005tg-8D for emacs-orgmode@gnu.org; Tue, 12 Apr 2022 04:56:10 -0400 Received: from mout02.posteo.de ([185.67.36.66]:35305) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1neCJi-0006Z4-Rn for emacs-orgmode@gnu.org; Tue, 12 Apr 2022 04:56:09 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 15ABD24010A for ; Tue, 12 Apr 2022 10:56:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1649753763; bh=AxWGAA8tFzi6nuJ//bN+IGmxBqckoFQZ+2HgjsycxSk=; h=From:To:Cc:Subject:Date:From; b=kED0Tsu2967mc+14mUhd1JNC/KA+U/+bOClBrTnOGhNjZ1AKGmX8zPZx28Ex0Wk0S jWkUtcDcgjmsfh7uDhxfUTgQRntLzn4+78VgurHSOjDJSxVPHZyifm5d1aAXXq3V7/ BwNwbecTWQsZuLrGxdTRqvts4JKoBOW9iPDiq3SnEGNZwtmVjvj9awR35Y5u+yyOBK /0vaKyO7DiZd8mfjrXOHGWJsk1Ge5qrtlMhI+KmKETMp7CLvo+Fheyjj8uDh7+tyZv n0PuJVJ4pcHGJ20bErdxhG38cr0uOJHvKqryB8YJlS3BUs3C5opgrjbd44nQc2pD6r EMrWI4BoIugJw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Kd01t1D26z9rxY; Tue, 12 Apr 2022 10:56:02 +0200 (CEST) From: =?utf-8?Q?Juan_Manuel_Mac=C3=ADas?= To: William Denton Subject: Re: #+latex_header blocks, or, managing lots of LaTeX headers References: Date: Tue, 12 Apr 2022 08:55:59 +0000 In-Reply-To: (William Denton's message of "Mon, 11 Apr 2022 20:46:36 -0400 (EDT)") Message-ID: <878rsar880.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.67.36.66; envelope-from=maciaschain@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, 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: , Cc: orgmode 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=1649753847; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=FdKmhH4pPauoOXy5bgwJfT77KCaxyLGfUUSFRNawkf4=; b=BoHQGZxDSd0wtk9Usrxs84AiNPrivSFlJMjRmFaCp57xDoS7RD5IwaViBDPX5+CL6V2erN VEvo9Iz1s2RH+3tHk5IRipwAG3MuplKNRr+r8aBatNVCr/gTHQD561fDaxwhMceB+YxEua ssR2dpZ5g5ka3sEr2/TAiJBwtOf1bmFiZC3b4cKdtmqRjQzpcjoCc4oHiX8aUsn4zRfCaD Joaa+kVhh+Mbn4AEz/0H9yH4tnRN8iFi7AxMgS20ktSNC1lg4jasfB7jZDxPMXrShMRolE kePi1OnDmVoNT/duOCRNe5bwUrvfmcnxdwvoZSKtlW3rhuYLWZzHj+4FNi6JUw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1649753847; a=rsa-sha256; cv=none; b=I5bljnoOIVkbEbZDr1kD6r8dp7ezKSp39VBkLrzhYuO6FDqJrs/fmnfoH8yaYgVKbbVimW A5ieDV9k0dki0bBxnQ0Nlxc7bG2Pj5K7Q15dBLwHXYkfYTs1DwkMcwC4oUEbOMpJX18XCs obuTUfEOJcM7mWWMJvxmvmj8z9a/ped9zoRr4Shu1ajLg8Y2KGKCPYUesI6mkeQ8zH+5lN fRg19ra1Llh+rF+bzoYhAzSJ+VXxZpfalsDb1oTfCLZmb/3J7E/L5IlGQFDoxmK21nG+NY 31Cmr4XmJbXXdrS3AWUQS4vaSmm8F90HLyXTiwBBQ2leCLFKYzLWZ0jPhW8bTw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=kED0Tsu2; dmarc=pass (policy=none) header.from=posteo.net; 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: -4.56 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=kED0Tsu2; dmarc=pass (policy=none) header.from=posteo.net; 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: 3990B2B93F X-Spam-Score: -4.56 X-Migadu-Scanner: scn0.migadu.com X-TUID: Iyf9WNfAZqMT Hi William, William Denton writes: > What sorts of practices do people have for managing lots of LaTeX > headers? Juan Manuel Mac=C3=ADas, you mentioned something like > this---literate programming in Org to export LaTeX source---may I ask > how you do it? When it comes to a large project, for example the typesetting of a book, I usually generate all the configuration for LaTeX in a *.tex document or a *.sty document from Org, using literate programming[1]. I include there a= ll the LaTeX packages I use, their configuration, my own LaTeX or Lua code (because I use LuaTeX to compile), etc. Here is a screenshot of a part of the configuration I wrote for the Hispanic Dictionary of the Classical Tradition: https://i.imgur.com/fwonZtT.png I also have an 'empty' class added to the org-latex-classes list, and then load my LaTeX configuration via \input. When it comes to large books I also use org-publish, which makes it easier for me to work with complex projects and multi-part/chapter books. Another possibility, to avoid adding many lines with 'LaTeX_Header:', is to use blocks and the noweb keyword. For example: you can create a non-exportable node in your document, and put all the necessary configuration there. You include all the LaTeX preamble in a block: * Configuration :noexport: #+NAME: preamble #+begin_src latex :exports none a lot of LaTeX code #+end_src And in another block you add this: #+begin_src latex :noweb yes :results raw ,#+LaTeX_HEADER: <> #+end_src (in this thread you can find an org document attached with this procedure: https://list.orgmode.org/87sfwvlp56.fsf@posteo.net/) ---------------------------- [1] In fact, Org is much more powerful and simpler for doing these things than the docstript suite itself that is 'officially' used in the (La)TeX ecosystem to generate packages code and documentation: https://ctan.org/pkg/docstrip?lang=3Den Best regards, Juan Manuel=20