From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id wEgoLsOfamBQFAAAgWs5BA (envelope-from ) for ; Mon, 05 Apr 2021 07:27:31 +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 KKYJKMOfamAcKwAAbx9fmQ (envelope-from ) for ; Mon, 05 Apr 2021 05:27:31 +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 1E60C12C3D for ; Mon, 5 Apr 2021 07:27:31 +0200 (CEST) Received: from localhost ([::1]:42104 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lTHlp-0002Kq-KK for larch@yhetil.org; Mon, 05 Apr 2021 01:27:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43416) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lTHlH-0002Jh-KV for emacs-orgmode@gnu.org; Mon, 05 Apr 2021 01:26:56 -0400 Received: from mail-pj1-x1036.google.com ([2607:f8b0:4864:20::1036]:52033) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lTHlF-0003gq-DQ for emacs-orgmode@gnu.org; Mon, 05 Apr 2021 01:26:55 -0400 Received: by mail-pj1-x1036.google.com with SMTP id s21so5509800pjq.1 for ; Sun, 04 Apr 2021 22:26:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:subject:date:in-reply-to:message-id :mime-version; bh=q2nq0eeAWMuDWUXKqLowsNKKNC//0r4HVIOMNrUB0OU=; b=YEbLZ5DCZL6uZDG0349WMuNwrKouFwQLCsxvwLTQmFMUc59ULE3de4QDyogngM4nYM kZojhcRMN9NCBxbq9s2hqh6LyoOkqY3vIEmwvWEIjcSJCI7xFOetzcExtP6Lmec/UGpZ tvXs22JQbVB9PbztdaVQ7S6u4iPfqjvOnasLSm2cmuqQRFvcA136XoCZKD2DNmTDC/R1 tQCDEvkTUP+tkhm89eAjGmJtsK0OFOBmCv392thc16JeTu8bwACN3Mmm1UpSontej8wy 9892Dakn0lfSmofz370dHRKKRVJUeRtyuZ/1VDXIJx3MMCJ+9MV7LkltDXbVcnAf9oeX JPSQ== 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:subject:date :in-reply-to:message-id:mime-version; bh=q2nq0eeAWMuDWUXKqLowsNKKNC//0r4HVIOMNrUB0OU=; b=m5Vci3qJ/55MGbqRADF02E6ppOSmeO+ZZ5qRBYpFzVk1J1q1tF41FOKppVsVfAVGVx mesffgIZzhDEIBc2fhJrGR4GV+Xa2mDvLOxAvSDlzr28FoTBGMZoXDISgQG6/lRmHgWc i8KR/jvaLYNHNz2+fKZgBq1CwEWH74CjEM8z/bvxSnRSOh1/tJVtpS99CZuK4CxHQRnW ZbIUsAbfWWZ3Nv8D3h+wMt9iGAnuZoIj4flnPeBPYPLoQXgopt7h4DRqce2eztYgJTtj UN92oRsftvFu5vI9gvoZ8qVkZQoAeHp3TDIp1aJZMn0dZ8e0A6Hqc6QeI54b7gjeZ56m Db+g== X-Gm-Message-State: AOAM531Hkm/eYMRmwh6z3dCwGw8Y8VMom+CwqDFGYqrzruna95hivRb8 g4y2i19gPslr/h1ItAJVUvKtdifk6TU= X-Google-Smtp-Source: ABdhPJxgT2r0+dwWE/DsUOWoGCOXlvbLdHsZ9AOMnMV+Dr61WrZybN7+0OQlTDb7nnz2oKFowelq8w== X-Received: by 2002:a17:90b:1198:: with SMTP id gk24mr25128136pjb.84.1617600410587; Sun, 04 Apr 2021 22:26:50 -0700 (PDT) Received: from tim-desktop (106-69-151-19.dyn.iinet.net.au. [106.69.151.19]) by smtp.gmail.com with ESMTPSA id f23sm14491500pfa.85.2021.04.04.22.26.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Apr 2021 22:26:50 -0700 (PDT) References: <86im538yip.fsf@login.ifi.uio.no> <5d1bbedb-0332-d584-c6ef-9ca0d8351003@gmail.com> User-agent: mu4e 1.5.11; emacs 28.0.50 From: Tim Cross To: emacs-orgmode@gnu.org Subject: Re: First steps exporting to tex Date: Mon, 05 Apr 2021 15:05:25 +1000 In-reply-to: <5d1bbedb-0332-d584-c6ef-9ca0d8351003@gmail.com> Message-ID: <87v991z4h6.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::1036; envelope-from=theophilusx@gmail.com; helo=mail-pj1-x1036.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: , 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=1617600451; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=q2nq0eeAWMuDWUXKqLowsNKKNC//0r4HVIOMNrUB0OU=; b=Fhk5q0BugPSzvuFuJAYpE+lDypsPYBasq9vvxAD8l7Z6NOd/du5XWGynxHN8zAe+Q44ebt B1gZSIwQsIUxuhoEDA22dCFFSH3YkNAp3PXJlvf4AK7rHNBS2KKz6+9c2sFe6qhvY2nucu Xv3cW3F6ywpBqpi3DeOuKwNChNLO89mWB4ID4CRUIvJUL/gELVAcZwqekt4w1OzooGEZgV fnuvyQery+UOfx2ChN2VjyNffixi7loifye0UZ8MiqloGjtvvdwEGXhVZk34rF0pmgX78J EdWiJJYse42tX35ytjGnLy4t46K5UmmjKNSaf1OQ2n6qovS5M7gHdI8Gfx0IoQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1617600451; a=rsa-sha256; cv=none; b=NYipHEpGw1jbdiyysxmvFwQtBD2KXzP3kDiMmC1EvsG8r7gNhagIw6mi16rMwQcyq44PAW UvqqDHfmv6NmatN7c/03+raw+LEepL/yMzUQD5DQYKHi7Dqqecz826r65BJ+CodWEGqTiX P8QBy1+Xn4GTyRNwXuLG5lIftPE/H8ZgNOe8yAD4wRXmITHOECz3LxYBjE6olTiocOIvDj wV+Wo7i6rhhkqJwC2dlge3hAURwPA/oS2jEbQ5iXhdBsx63dzwfKG8hxoP8y+WXrXvtbZ2 nfuhlNeoMLu3hQUFMR/TOsVtjPXA7J9hEpSpFq0UV+dxMpxlOyAu6jCLMz75Mw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=YEbLZ5DC; 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.14 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=YEbLZ5DC; 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: 1E60C12C3D X-Spam-Score: -3.14 X-Migadu-Scanner: scn0.migadu.com X-TUID: F1ZmODzUJOXe > Hi Tim > I have been exporting from orgmode to PDF time ago, but very basic PDFs, playing with some basic options of orgmode. When I tried to produce a > meeting minute with a logo in the heading, I decided that I should learn better a way of exporting, because the minute meeting was a first > challenge, but many more would come. For example, for that task I started with this code, which I think it goes far beyond what the "LaTeX > Defaults" can offer (I must yet "play around" a lot with it): > #+BEGIN_SRC > #+options: toc:nil > #+options: num:1 > #+options: d:nil > #+export_file_name: BORRAR > #+options: broken-links:mark > #+LaTeX_header_extra: \usepackage{fancyhdr} > #+begin_export LaTeX > \thispagestyle{fancy} > \lhead{\includegraphics[width=4cm]{//192.168.1.2/f/LOGO-IMAGEN CORPORATIVA/IMAGEN CORPORATIVA 2018/DEFINITIVO > ANAGRAMAS/SELLO1_grueso.png}} > \rhead{Student Name: John Doe\\ > Student ID: 1234\\ > Course: IDB 601 (Fall 2020)} > #+end_export > #+END_SRC > The buffer I exported my meeting notes from has much more information which is not related with meetings nor with the logo. So I foresaw 3 things: > 1 A fast cluttering of the buffers with LaTeX headings would happen, as I will learn more about LaTeX and I will want to add more and more > packages. > 2 A need for flexibility to be able to export different kinds of documents from the same buffer, ideally achieved just by changing a line (or few lines) > in the buffer. Although, from my example, it seems that ~#+begin_export...~ contents can't be added in that way. > 3 A great potential if it were possible to use already existing, and well curated, LaTeX templates frictionless through orgmode. > I find quite useful to analyse the default generated TeX file though. > Best regards OK, now I understand your objectives a bit more there are a couple of things I would recommend. Org is already fully setup to provide a clean and consistent way to do much of what you are currently achieving with export latex blocks and which can avoid much of the clutter in your org files. The way you are customizing the latex etc is OK for 'one off' type hacks, but isn't the best solution for crating a standard format. Have a look at the documentation for org-latex-classes. In this variable, you can define your own 'pseudo' classes, which you can then use in your org file with a simple #+LATEX_CLASS: line. This will take care of all the preamble stuff, plus more (it uses other org variables, such as ones for listing default 'usepackage' lines and other preamble lines, so read the documentation carefully). So, you could add a 'meeting' class to that variable and when you need to do an org file for meetings, just add #+LATEX_CLASS; meeting at the top of your org file and your ready to go. This is what I did for my 'work' class, which produces documents that included my employers logo, branding colours, fonts, font sizes, heading formats etc. Now when I need to produce a work document, I just add the #+LATEX_CLASS: header and then just write a normal org file. I actually had a number of these custom 'class' definitions. Really nice thing is that if I find something needs to be tweaked or changed, I just have to fix the org-latex-classes and related definitions and know that if I re-export any of my org files that use them, they will all get the fix (no need to edit each individual org file to apply the fix). -- Tim Cross