From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id MC+fH3hbaGAzUQEAgWs5BA (envelope-from ) for ; Sat, 03 Apr 2021 14:11:36 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id qI8DGnhbaGAEYQAAB5/wlQ (envelope-from ) for ; Sat, 03 Apr 2021 12:11:36 +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 B4ECA277D5 for ; Sat, 3 Apr 2021 14:11:35 +0200 (CEST) Received: from localhost ([::1]:60400 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lSf7l-0003wz-9M for larch@yhetil.org; Sat, 03 Apr 2021 08:11:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56478) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lSf6x-0003wq-W3 for emacs-orgmode@gnu.org; Sat, 03 Apr 2021 08:10:44 -0400 Received: from mout01.posteo.de ([185.67.36.65]:54457) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lSf6t-000389-1d for emacs-orgmode@gnu.org; Sat, 03 Apr 2021 08:10:43 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 0C8B4160060 for ; Sat, 3 Apr 2021 14:10:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1617451835; bh=iokse5LkFpwmBxhtZTUBRzDNh3hvkvHF8zUZJBeV3Dk=; h=From:To:Cc:Subject:Date:From; b=F4dQu5Qo90k9C0V89nbShkPnfByyorAXRYsfhmj+0URZZlarm29vilBxKgMdbSpHR eTCx4vvocsw+rmJvCNXUR0kjXr26zzpegDGyQVdqp/ZywbR+6N+L7dHxk8NEEGCRIT 3MKs1cDrULjZiK7dfQSjsslnmXh1NlYvyzxMi8CoDsPg68DJ3/uzeKx4rEyfyaju8F bjbbZ/HBM1bHZwJXwHDG/YV3gPAErDio+ikAHBqSxgnPthWEGGNfPx94vEo5hvzUwn SBmof6qD5Jv7UXBOhUQ5jUUezlZdERlKOiW5zWbr2Cwtn7SKNRDckaHjIVUAxxpgn6 eZyEndyd/kX5g== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4FCG2w65yzz6tm9; Sat, 3 Apr 2021 14:10:32 +0200 (CEST) From: =?utf-8?Q?Juan_Manuel_Mac=C3=ADas?= To: Ypo Subject: Re: First steps exporting to tex References: Date: Sat, 03 Apr 2021 14:10:30 +0200 In-Reply-To: (Ypo's message of "Sat, 3 Apr 2021 11:31:27 +0200") Message-ID: <87sg47bmbt.fsf@posteo.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=maciaschain@posteo.net; helo=mout01.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_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=1617451895; 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=7D8M5Rad1jiNCGAlJetKvgPiXAVZuP0LWm6nUr2GNME=; b=ctBidYlavahxcwV+Qm1DXVPslbZsk9o6XgtXwtzMXupzi8/WJBfW5+7wi68aR3ngjqno0o sXzMFUoL6tDtXVdgyxNnxXVCbwy31iVX+Zs1h15e+RaWtKgJUJWvlpLARAVqS7sTpJPe/L R8fRX1rVycXzi+pynzQSPN5yybzhdyVNbBqUIaoy8WyrFiFAHC90SKisNuXp/r8wN1V3tc DekgI4axfel5ag7y77NNv0Wz3+65cRpgJEiC7hsYXy4OegjH8CmhoA77FfATepLhjSPdUT ITztjNX1/DjIgeyhtoKn+tsCX9iK8aiUsPXBLes+lBy8k3qX2aGHucBLNqXZcg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1617451895; a=rsa-sha256; cv=none; b=ukUHcUp32g0Y1qfN9kU1jnAt7RVRNfVtE9Oy8NNjs1xDYATR5ZL1302wmdy5CGzk8qZjm3 6Dv2lAXT3S23fNPxLdLFgPvNXttqhj0j+co8iG3uA7mVbA7ERbvTRmRExOVPQpICBpFEXI X+1sEGieu2LdWSk5hVT9CZL4CJjX/QM9M7f0MvvH8sQA+pLydtoDdfYgAaYvHixv3bOlkf aWGLkM1N/G9D3rDq3ODV4kT7CDPnrbpemM+oQyg0QCMGqnWQENXSrqqHB5Jc4jJRZY4y8l tvF8edlaUiYoHY61JsResFN9hWRIT7RNVf803mVGX2o+BWZAkfVVBPFwiqK3cA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=F4dQu5Qo; 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-Spam-Score: -3.13 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=F4dQu5Qo; 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: B4ECA277D5 X-Spam-Score: -3.13 X-Migadu-Scanner: scn0.migadu.com X-TUID: 0ATVUff0yf0o Hi Ypo, I think that, as a starting point, the concepts that belong to Org and those that belong to LaTeX should be separated. Ypo writes: > [...] > 2 template.tex -> this could be added to the SETUPFILE: > #+LATEX_HEADER: \input{template.tex}. But it seems to have no effect > on the PDF output. BTW, I can't use emacs HOME path (~/) in the > input header, like \input{~//export//template.tex}. The keyword #+LaTeX_Header pass literal LaTeX commands in a single line to thepreamble. The LaTeX \input{...} command should follow the path of the file you want include, but I see that you are indicating the path with a double //. The correct way is \input{~/export/template.tex} > 3 Another friend told me that .sty templates were the best way. A *.sty file is what is known in LaTeX jargon as a "package", and it would come to be the equivalent of what is a *.el file in Emacs, /mutatis mutandis/. In a sty file you can put whatever you want, but a different syntax must be used and these files are subject to a series of good practices. Therefore, a sty file is more indicated to introduce 'heavy' code that you want reuse in other documents (defined commands and macros, etc.). In short, what comes to be a package ;-) At the user level, and unless you want to write your own package (see: https://www.overleaf.com/learn/latex/Writing_your_own_package), it is almost never necessary. > 4 I see some people that create customized LaTeX classes and add the > desired class to the orgmode buffer. Great care must be taken here. One thing is a LaTeX class, which is something laborious and complex to write, and another thing what Org understands for a LaTeX class :-) Classen and the class concept are a essential component for LaTeX, as a class is the first thing you must declare in a preamble with the command \documentclass{}. There are the standard classes (article, book and others) and other ones, more specialized. A class changes globally the behavior of the document and all LaTeX commands as \section, \subsection and many more, and add its own commands. A 'LaTeX class' for Org is a light translation of the above. It is actually "what type of LaTeX document you want to get". You can easily define your own LaTeX 'classes' for Org documents. For example: I have an 'empty class', to be able to add the entire preamble, without Org charging me anything before the \begin{document} (add-to-list 'org-latex-classes '("empty" "[NO-DEFAULT-PACKAGES] [PACKAGES] [EXTRA]" ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}") ("\\paragraph{%s}" . "\\paragraph*{%s}") ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))) And I have in my ~/.emacs: (setq org-latex-default-class "empty") (setq org-latex-default-packages-alist nil) (setq org-latex-packages-alist nil) (setq org-latex-hyperref-template nil) My advice, as has already been commented here, is that you get familiar with LaTeX for a while, and then see how you can fit LaTeX in your Org workflow, if that's more productive for you. Best regards, Juan Manuel