From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id IO2bAb+162AHSQAAgWs5BA (envelope-from ) for ; Mon, 12 Jul 2021 05:23:43 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id IPAGOb6162DmMwAAB5/wlQ (envelope-from ) for ; Mon, 12 Jul 2021 03:23:42 +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 3838439B5 for ; Mon, 12 Jul 2021 05:23:42 +0200 (CEST) Received: from localhost ([::1]:43136 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m2mXk-00024W-7s for larch@yhetil.org; Sun, 11 Jul 2021 23:23:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50320) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m2mXD-000247-Pu for emacs-orgmode@gnu.org; Sun, 11 Jul 2021 23:23:07 -0400 Received: from mail-pj1-x1034.google.com ([2607:f8b0:4864:20::1034]:46660) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m2mXB-0007j1-UM for emacs-orgmode@gnu.org; Sun, 11 Jul 2021 23:23:07 -0400 Received: by mail-pj1-x1034.google.com with SMTP id b5-20020a17090a9905b029016fc06f6c5bso9712414pjp.5 for ; Sun, 11 Jul 2021 20:23:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:date:in-reply-to :message-id:mime-version:content-transfer-encoding; bh=EPJZibPEHcU5s5dEYNrcF5IRusGMrzlPmFpXkEK5Q34=; b=eZbspOoequC9O5oJ11y+l2Trttxpo9TNy2KR40L8TcTWrviqy3qezqE+9e1tmepF7b hZbTUamB5o+XDLf0hyrAuHSf/ETrF7aNHzJSQ1Hs7zO3Pc5RKI6QvpmW06mkWgVhttuf I4b9rBAHJFgJtsXWERNqn31NJMtij0CCD9LbtjGEnfvpJCUfy2Vraj8c+9eGTdzvVVPn Fq4heb09CN5sE6KnajO/aUXmSTKYHUX87BqOyQQ2Z1x4/jutnxZwhsw1XXgY4Slkj598 P1BDjzoLiSSzHLW7hDVNJ/T9/vTTTJQgyBXvmJAyR5dPtcjdnavw37xJEKKy8/PLDQ3J ANFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject:date :in-reply-to:message-id:mime-version:content-transfer-encoding; bh=EPJZibPEHcU5s5dEYNrcF5IRusGMrzlPmFpXkEK5Q34=; b=cPPJEaPEzPBNmA/gN8C2MHvVXWJYd6YrXbFEsB9EZyT5Cv3D0/GuN12g18pXK4cpBZ Hx20HDx4btKCiqvuOd6zW+bPOK8hMjoHoY+Mvrs28UzZ9M0gkcyymMGYlOBNkXusxD+g 6N7rXaT/QBOEe92t40Ou+DfYVDIWMj8Nl6CBXxmcT3pRSZL5jNUqVqAqomD9+qGZsqCV 2n0ZGrPJnRhpZEeUuk73BcGdJyPx2XD3743Xr9Uizseymd/CNIwoADN0vH9UtuLJYF7n Izeu2vYqQOSZDI06MXmdv6XOX9w++ljyMlZDmj9xNV9WSA1VYvc9rFTdO6xEGMnMHdid FUug== X-Gm-Message-State: AOAM530yPL85HbzEgrHVC8jt08yDzupSOp/2vVQAHDhly62WV6ge2Ues 3JO4Y3BbfDQ7NSW6Ql+/k7Kdu9lAMSg= X-Google-Smtp-Source: ABdhPJwNC629qH3MzVWBrQKcj6UTTLBcqNV5bLHX/6hJlAw0jyYaBqSjvGnhSTJNYQTibbdWbv2SlQ== X-Received: by 2002:a17:902:e8c2:b029:123:25ba:e443 with SMTP id v2-20020a170902e8c2b029012325bae443mr42262475plg.29.1626060183879; Sun, 11 Jul 2021 20:23:03 -0700 (PDT) Received: from tim-desktop (106-69-101-138.dyn.iinet.net.au. [106.69.101.138]) by smtp.gmail.com with ESMTPSA id w69sm12583020pfc.58.2021.07.11.20.23.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Jul 2021 20:23:03 -0700 (PDT) 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> <87y2aejcdl.fsf@posteo.net> User-agent: mu4e 1.5.13; emacs 28.0.50 From: Tim Cross To: Juan Manuel =?utf-8?Q?Mac=C3=ADas?= Subject: Re: org-mode export to (latex) PDF Date: Mon, 12 Jul 2021 13:09:08 +1000 In-reply-to: <87y2aejcdl.fsf@posteo.net> Message-ID: <87zgusmd0s.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::1034; envelope-from=theophilusx@gmail.com; helo=mail-pj1-x1034.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.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=1626060222; 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=EPJZibPEHcU5s5dEYNrcF5IRusGMrzlPmFpXkEK5Q34=; b=pDBGZXLZpxElklobPkSy6gOBszqhCNu7vnWtc8c4ECEcsh+G8Qwvp/Slrc/D7o1ShyMa2Z X36AG8RpE3inKCxNycYYjE2twnXJqv6R64Mr9Ica/Ye2xfv12pz8QRVp3iBjKsheaBcsdk SiJfYtJEPmvsyTTTmkdzc9zKp2ecwDfiXXrf8NvEe6ze/NQTq6a+B2LkI17Rm7u7PwTD0h 3vjMlbgj/VnJ8xd4SqcWjrHWeDLaNPLivDfgciwUp2RoeFOQIu8Tp17fGUME1MjW9NEeUq r6hfgqRRoxlcWlYly2bmdYYOsFln2hpBchuJiXmXRoWc5zxMa7Ky8ESm0pyNLg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1626060222; a=rsa-sha256; cv=none; b=H/sfn1n5S9NG6UhbnHCcHzxC9D2xYd6OuNDR1qnsBk2uzh/3ulwnbMDbv5ZJ8zg31D/IWC 0kaLPlPE2EkcYpYq0QW5YnuluO5sPTLo46FjffZHfBd77v33ypq2n0/i+aCNF/tWuUQm/e x7pazyX2uvdtIqVeapzxwZzE7PF3dZLtLsFwc8zckPgmU1/hJw/Q7Ow6wY7N3QDZ13MxEe AWMyLgRvMbKRqMFRZpzmdX1NMXU3syVW+O9dID87u/tzAuSE2rBV8DIkycjxYsMmDmqs01 g8u07+ixr/J4sCEdDGSrHAxSuH/7MIvGHuAM9kpW9XEvdHXTj5WSs++6PWcf5g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=eZbspOoe; dmarc=pass (policy=none) header.from=gmail.com; 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.10 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=eZbspOoe; dmarc=pass (policy=none) header.from=gmail.com; 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: 3838439B5 X-Spam-Score: -3.10 X-Migadu-Scanner: scn0.migadu.com X-TUID: e1DX+a78BxxV Juan Manuel Mac=C3=ADas writes: > 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-preambl= e-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) > Yes, I do pretty much the same. I have a number of personal *.sty files which contain a lot of additional setup information which would be difficult to include directly in org-latex-classes. I have also used the idea of latex blocks and tangling, especially when working out the details for a specific latex configuration. Once I have it working, unless this is strictly a 'one off', I will typically move that information into a *.sty file or similar. I also use a couple of templates via either company or yasnipet which I use for some org documents which have a 'standard' outline and header setup.=20 I find the combination of these techniques makes it easy to create new documents and maintain existing ones. I have a terrible memory for the low level configuration stuff, so the more I can rely on pre-defined configurations, the better. The nice thing about how I have things setup now is that it seems pretty robust. I rarely encounter any problems when updating org and am able to get 'up and running' on a new system fairly quickly. The biggest challenge I've had lately has been my move from my own standard configuration to using spacemacs. It has taken a bit of work to get spacemacs to work the way I want, but I have grown to love the modal editing of evil mode (probably because VI was my first editor). I'm now very happy with my configuration and workflow.=20 --=20 Tim Cross