From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id GMW3ENrb6WA1GwAAgWs5BA (envelope-from ) for ; Sat, 10 Jul 2021 19:41:46 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 6LpVDNrb6WAZaAAAbx9fmQ (envelope-from ) for ; Sat, 10 Jul 2021 17:41:46 +0000 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 6A90E1B352 for ; Sat, 10 Jul 2021 19:41:45 +0200 (CEST) Received: from localhost ([::1]:35692 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m2Gz1-0008Jp-Tq for larch@yhetil.org; Sat, 10 Jul 2021 13:41:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44914) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m2Gy5-0008Ih-LT for emacs-orgmode@gnu.org; Sat, 10 Jul 2021 13:40:46 -0400 Received: from mout02.posteo.de ([185.67.36.66]:52223) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m2Gy2-00038v-Uj for emacs-orgmode@gnu.org; Sat, 10 Jul 2021 13:40:45 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 83674240101 for ; Sat, 10 Jul 2021 19:40:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1625938840; bh=92b4raKsS5fjU2Nrwnl09Cp4nW34QsdxOsxAxEq8tWg=; h=From:To:Cc:Subject:Date:From; b=Zwz03J1l+llr2G6AmpepQm5aa0Xa5Fya8wFBymuLdjYRweSNXNtdD7VIycwLSd0UG 2KBpq6+0m3ahgCRN6ADjFleALkp3Dri59V3MyxzT+RFrIcFc9ylX8JnpSpP6xoQBDd SaStpHKNtBWqdguxdexWMeo6Jkw1f/sNuEv+Xo4hvhWAD74QKvZH76UbZVmoqINKtn 3eGOkICvn/ZI5Vhbw8yBZZavsVF7VoI8lven+N80Y26Ek7WJj1lfXgUOvToGqdwxml eXvDdskFcDjpIg80nqaDrXcmGwBmOHcPpZ3ygeu2S8wXAoBTFFhQBiluAqBS1yhaoF Ru6xc69012JnA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4GMckb6pW7z6tmJ; Sat, 10 Jul 2021 19:40:39 +0200 (CEST) From: =?utf-8?Q?Juan_Manuel_Mac=C3=ADas?= To: Tim Cross Subject: Re: org-mode export to (latex) PDF References: <5A0DCCA5-7B49-46CC-BD49-B5F0D46DA5B8@traduction-libre.org> <87pmvq8ef2.fsf@posteo.net> <12C6E907-1ACB-4CB2-997D-20FEA64F8879@traduction-libre.org> <87lf6e8c9p.fsf@posteo.net> <87zguutcl8.fsf@gmail.com> Date: Sat, 10 Jul 2021 17:40:38 +0000 In-Reply-To: <87zguutcl8.fsf@gmail.com> (Tim Cross's message of "Sun, 11 Jul 2021 00:59:19 +1000") Message-ID: <87y2aejcdl.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.66; envelope-from=maciaschain@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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.23 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1625938905; 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=92b4raKsS5fjU2Nrwnl09Cp4nW34QsdxOsxAxEq8tWg=; b=XgOMAfw0c35mwEBUyR5H2GCwZ0H2rxbe8AkdsgpzW4jNRWaFnWlrojvdgw/vwlu8YQW4qt 14+0ICJO4PW2Jn9ZvVsosrPrE4RbzdZNNr1jIrarPz4qvRXcodVl2bwhqqfnFD4ELfKiO/ SJBola2vPu3GjDHJe/QaqlsIJWZGTTUZVTFF/XrjM20sK2aOLYk5JMsnh/9x7l5idbgEAP UwTC2n8/1EtjkBlIk1M31xSsuDV7rXUuH8GPmK8TsHoijbAuhpzZjsnpLhGtL/VfRIybmD lii3bTZ9+QsMGzoMWmEZeRgekHftC1uO4LE/H60eysdlSger0xsyYeBJpmteYg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1625938905; a=rsa-sha256; cv=none; b=D+/xbTbM+DJDLpzR3CBQOAC/j8z3C2baG/Pa8RKdBFhKUwjCsjWD44GKy8Sq296LynviK7 IRiF9rhuZt2wsZ7tu21WMVaEFh8YwVPIuYYvBUIMn6wN7Yc5+TokiUF/Is8HVrlLqxVw9t zjidRi76ksD/UHTvvgyg4H0TbyUU2dWdupFSyeHbgm6wbIGbp19QSrzFgC58mWFH8NdZ5q NwTwLBwALM9YZ/dhDXNFqrFijjp4qsT5Ga0kgaGfXE9Y2hcC3PGWM8OxfneG5gMP7vBr6z NaLQl7XILANijpxefdkJMbzonBYwaZFFJYwaFcFTjZzhIdTi685u6ipKyNwkWA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=Zwz03J1l; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -3.11 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=Zwz03J1l; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 6A90E1B352 X-Spam-Score: -3.11 X-Migadu-Scanner: scn1.migadu.com X-TUID: e5u9Hg/9mGCs Tim Cross writes: > Just FYI for those who don't know, you can use the org-latex-classes > variable to define your own pseudo document classes, possibly using the > DEFAULT_PACKAGES, PACKAGES, EXTRA_PACKAGES macros and other latex > settings. So for example, you can add the babel or other packages you > want and either make that the 'default' class or specify which class you > want with the #+LATEX_CLASS header. I use this quite a bit because then > I don't have to remember which LATEX_HEADER lines to include in the > document, the specific option settings etc. I don't need support for > multilingual documents, but I do have a number of 'special' documents > (such as one with colours, logos and specific fonts for an employer to > match their 'style guide'. I also have ones for generating project > documents, letters, meeting minutes etc. They all use various different > Latex extensions (particularly ones which don't mix well and cannot be > included with other packages). I agree. `Org-latex-classes' is a very good option for create LaTeX templates, and I have a few classes defined as well. The problem is when you need really long and complex preambles (it is not a problem that most users may have, though). In a recent project (a book) my preamble had about 2000 lines (including macros and environments defined by me, some functions in Lua for LuaTeX, etc.). With long or complex preambles it's a bit awkward to do it in Elisp and org-latex-classes. In that case, I usually write the preamble to an Org document and generate a *.tex file using org-babel-tangle. Then I include that file at the very beginning of my document with an \input macro. On the LaTeX side, there is also the option to create your own sty file: https://tex.stackexchange.com/questions/77/how-to-make-a-standard-preamble-into-a-package As an alternative to #+LaTeX_Header you can also include the preamble in the Org document itself using a LaTeX block: #+NAME: preamble #+begin_src latex :exports none ... a lot of latex code #+end_src and then, in another block with the keyword `:noweb': #+begin_src latex :noweb yes :results raw ,#+LaTeX_Header: <> #+end_src (This useful trick came from Charles Berry in this thread: https://orgmode.org/list/225A3D45-0F47-4FFE-8BBA-F023CB8C9A6C@health.ucsd.edu/#r) Best regards, Juan Manuel