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 u+sJNn1AaGABGAEAgWs5BA (envelope-from ) for ; Sat, 03 Apr 2021 12:16:29 +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 ULHjLn1AaGDSBQAAbx9fmQ (envelope-from ) for ; Sat, 03 Apr 2021 10:16:29 +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 E6A2117C75 for ; Sat, 3 Apr 2021 12:16:28 +0200 (CEST) Received: from localhost ([::1]:36632 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lSdKM-0001MY-TX for larch@yhetil.org; Sat, 03 Apr 2021 06:16:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39686) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lSdJh-0001L6-ED for emacs-orgmode@gnu.org; Sat, 03 Apr 2021 06:15:45 -0400 Received: from mail-out04.uio.no ([2001:700:100:8210::76]:41331) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lSdJe-0000i5-Fc for emacs-orgmode@gnu.org; Sat, 03 Apr 2021 06:15:44 -0400 Received: from mail-mx12.uio.no ([129.240.10.84]) by mail-out04.uio.no with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1lSdJY-003jvQ-EM; Sat, 03 Apr 2021 12:15:36 +0200 Received: from cm-84.209.16.135.getinternet.no ([84.209.16.135] helo=sputnik.shmi.ifi.uio.no) by mail-mx12.uio.no with esmtpsa (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) user msteffen (Exim 4.93.0.4) (envelope-from ) id 1lSdJX-000EoF-NY; Sat, 03 Apr 2021 12:15:36 +0200 From: Martin Steffen To: Ypo Subject: Re: First steps exporting to tex Organization: IFI UiO Norway References: Date: Sat, 03 Apr 2021 12:15:26 +0200 In-Reply-To: (Ypo's message of "Sat, 3 Apr 2021 11:31:27 +0200") Message-ID: <86im538yip.fsf@login.ifi.uio.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-UiO-SPF-Received: Received-SPF: neutral (mail-mx12.uio.no: 84.209.16.135 is neither permitted nor denied by domain of ifi.uio.no) client-ip=84.209.16.135; envelope-from=msteffen@ifi.uio.no; helo=sputnik.shmi.ifi.uio.no; X-UiO-Spam-info: not spam, SpamAssassin (score=-5.0, required=5.0, autolearn=disabled, AWL=0.033, UIO_MAIL_IS_INTERNAL=-5) X-UiO-Scanned: 3B5B829040DDB3FEA6AAFB60949F2FEA4BE406C3 X-UiOonly: 9F9600AF913C6A93A918DC4D0853741753913325 Received-SPF: pass client-ip=2001:700:100:8210::76; envelope-from=msteffen@ifi.uio.no; helo=mail-out04.uio.no X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-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: emacs-orgmode@gnu.org 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=1617444989; 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; bh=KmDPjlAQibNauoAeDeAeo9KF4WazJukm26qXNBKKQFI=; b=Zc7NCLth+CF/r43YCIiiZGTqTSt+RphIDS5PU4xypX7OxR+xhu1poodKeRrQklyr4b4Lld AXuIqnSScoIYf/naOOUPiA0JIQPbalqYLGL8xEyWXHlsQczAWqSMWyW1ht1nhiG3PIxqcS Ujq46H3WCWIWrN6fBrR49PgZkilfGXiffhmur48Ku3VohyRif7zNWc+VTIhu78dUDtzisu WoRH0uQ3nlqpdNqxL2Sq3VJDhgjvqu1ZKndBMDb2OtLZ2B2J6s4w7GMrOnqdSZ5EK9ZYQR 1r03ci8kqxoq86LJI+Xwl46078PG80wNOWedZGurcnIxSwIKgxX6AVoSZNPunA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1617444989; a=rsa-sha256; cv=none; b=juIyVLE/Fr5RFZ4bEEph9gWI2ZwNk8Iy3HVgNlsftVeoC+h28CJ50dPlu1A4/CY5x/W3K7 PqJVhhn51yke4YwnqkLaJfOdCFO6s6+qMhhXSGcZ5oslAqajCLqg0+uxg+ojudAcM1nzOK 0AkNw5E1GHHyTxEh9sSWqY83iXtNoa9HD8YVbDSxkOOSyGlEpn6a9OfsmOFEBhuQvW11xB NHsgyr/aIAh8huG7veRA83SxaEcjDoUQ7P0QXQC6edaeZIoHxLOq/PvtxnDRn1K7tQv4Se NbGO1Gykv/yIZmcGuKIg1tdvFr7KsWVsMDRs0GOEUpKYzMcvTNEM17vOYwizyQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; 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: -2.43 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; 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: E6A2117C75 X-Spam-Score: -2.43 X-Migadu-Scanner: scn0.migadu.com X-TUID: h/ED6dYRddrt >>>>> "Ypo" =3D=3D Ypo writes: Ypo> Good morning Ypo> After reading your interesting advices, I've decided to start Ypo> my path through LaTeX. I have been some hours trying to start, Ypo> with little result, but I hope that once established a Ypo> *workflow* the results will come and the new invested time will Ypo> be directed just to get better and better results. Ypo> My doubts: Ypo> a. As first step for my workflow, it seems convenient to use a Ypo> "template" with the LaTeX preambles. So maybe the many existing Ypo> LaTeX templates can be used quickly with orgmode. I found Ypo> several options and opinions. Which one is the best way? I say my advice as a "LaTeX-first" person (i.e., I was familiar with LaTeX before org was around. When I discovered org, which I found useful in many ways, so I tried to familiarize myself also to find out how I could make it useful in tandem with latex. So, for me, stuff that works well in LaTeX, I did not port for myself to org, things where org helps me to make better use of latex, I tried to figure out. For you, being familiar with org, but not (yet) with latex, you may follow different patterns. For the "preamble" of a latex document, the general setup that comes _before_ \begin{document} and before any output is generated, I use native latex using instructions like #+latex_header: \input{switches} #+latex_header: \input{preamble} #+latex_header: \input{style/style-common} #+latex_header: \input{macros} I often separate the preamble from macros. preamble.tex is (for me) the file which contains loading of packages and classes (usepackage etc, and corresponding adapations or settings for that package). macros.tex is things I define using \newcommand (or \def or \newenvironment or similar) As far controlling input is concerned, I also rely on latex-specific setting (outside org, also outside emacs), things like environment settings like $TEXINPUT, a path-specification, where one can control where LaTeX finds (additional) stylefiles, outside of the standard ``load-path''. Thus, I often try to avoid to use hardcoded things, like >>> \input{~//export//template.tex} I would use \input{template} (".tex" is not needed) and I make sure, the templatex.tex file is included in the $TEXINPUTS-path. Typically, the current directory "./" should be included by default (and stuff from the latex-installation is also routinely found) BTW: also when working with pics (with includegraphs), there is a variable (inside latex) that controls where to find figures. So, what I typically would to is things like \usepackage{graphicx} \graphicspath{{./figures/}}=20=20=20 That specifies that the pics for \includegrapic are found in a direcory figures, and then I would use \includegraphics[width=3D4cm]{jpgfigure} not jpgfigure.jpg; \includegraphics can figure it out, if it's a PDF or a jpg; it would also chose ps, if you don't use pdflatex, but latex (I still prefer the xdvi-viewer as faster and more fluent to navigate, I never like any PDF viewer when doing latex, only at the end, I generate the PDF). One can of course ``inline'' all that inside org (like doing a \newcommand inside ``org'', it's just I prefer to keep all the stuff in one (or more) latex files; for those parts I rely on latex (since org does not bring much additional value to the table for the premable stuff, at least for me) Martin Ypo> 1 #+SETUPFILE: template.setup -> doesn't seem the ideal way, Ypo> because the template.setup file must be modified adding Ypo> #+latex_class to each of the lines. 2 template.tex -> this Ypo> could be added to the SETUPFILE: #+LATEX_HEADER: Ypo> \input{template.tex}. But it seems to have no effect on the PDF Ypo> output. BTW, I can't use emacs HOME path (~/) in the input Ypo> header, like \input{~//export//template.tex}. This is my Ypo> template.tex file content: \usepackage{fancyhdr} Ypo> \thispagestyle{fancy} Ypo> \lhead{\includegraphics[width=3D4cm]{jpg.jpg}} \rhead{Student Ypo> Name: Name\\ Student ID: 1234\\ Course: IDB 601 (Fall 2020)} 3 Ypo> Another friend told me that .sty templates were the best way. Ypo> 4 I see some people that create customized LaTeX classes and Ypo> add the desired class to the orgmode buffer. 5 Also we can see Ypo> this intricate transformation of a LaTeX template into Ypo> orgmode. How to Migrate LaTeX Template into org-mode 6 ... Ypo> b. I think that in a good integration, every character shown Ypo> on orgmode should be exported into the PDF output. For example Ypo> "CENTRE LINE SYMBOL": =E2=84=84 How can this integration be done? Ypo> I have more doubts, but I will keep reading and trying to Ypo> solve them Ypo> Best regards