From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id eFbEDcc+xWJKDgEAbAwnHQ (envelope-from ) for ; Wed, 06 Jul 2022 09:50:31 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id KN/mDMc+xWJkbgAAG6o9tA (envelope-from ) for ; Wed, 06 Jul 2022 09:50:31 +0200 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 56FC91B973 for ; Wed, 6 Jul 2022 09:50:30 +0200 (CEST) Received: from localhost ([::1]:55614 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o8zno-0005II-IK for larch@yhetil.org; Wed, 06 Jul 2022 03:50:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41654) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o8zmf-0005Gc-FG for emacs-orgmode@gnu.org; Wed, 06 Jul 2022 03:49:17 -0400 Received: from w4.tutanota.de ([81.3.6.165]:41018) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o8zmT-0008E7-FI for emacs-orgmode@gnu.org; Wed, 06 Jul 2022 03:49:17 -0400 Received: from w3.tutanota.de (unknown [192.168.1.164]) by w4.tutanota.de (Postfix) with ESMTP id CD4ED106015C; Wed, 6 Jul 2022 07:49:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1657093740; s=s1; d=vergauwen.me; h=From:From:To:To:Subject:Subject:Content-Description:Content-ID:Content-Type:Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:In-Reply-To:In-Reply-To:MIME-Version:MIME-Version:Message-ID:Message-ID:Reply-To:References:References:Sender; bh=VS4+AxofpzT8q09Lqi1DQjml8nt0suE9Iw/ttMNjsdk=; b=VMW7EOfx4Os0UCS2aaSZMIGWPwWz1fbV1TCW6HgNZ6wsy8Yc9qvh2JadUeCVBlGA b2tQI2A2H2PPbmz2KySSwTnW4LJfOWkFoskBd3HXUtGsbBUYgZfgkhAT69vD/T4Atx4 mDeE27DaP8D4osIpg4EGN0ACG1SbMspjAOKPeYn1Ko/A/DBqasvVe/IoGvJGe61Z8Zd UEBIDFHjBSKGhbm9084/K9qxqPqiBA+bCBAzgGsqr88ZUtwtixX3C6covM28yjKcNwg FslHf4TzjCqwGF6IQ+YgpoCpK0/m5/EvnCBJTFV9o5cD+q/0txwkm2vuTkusp2Y5xlC jXZPKG3uEQ== Date: Wed, 6 Jul 2022 09:49:00 +0200 (CEST) To: Pedro Andres Aranda Gutierrez Cc: Org Mode List , yantar92@gmail.com Message-ID: In-Reply-To: References: Subject: Re: Re: [PATCH] ob-latex: Added support for including files with a relative path MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_1251888_2026670681.1657093740575" Received-SPF: pass client-ip=81.3.6.165; envelope-from=emacs@vergauwen.me; helo=w4.tutanota.de 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, HTML_MESSAGE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_HELO_TEMPERROR=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 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" Reply-to: emacs@vergauwen.me From: emacs--- via "General discussions about Org-mode." X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1657093830; h=from:from:sender:sender:reply-to: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=VS4+AxofpzT8q09Lqi1DQjml8nt0suE9Iw/ttMNjsdk=; b=WnzB9AHMnSepZUjGyn5qj5x1iyAPgQk5dcX3gUxm8Ywh/sGD1pkaz1Nqig/lArFZcpAAV1 YgjaHarrAccmUw6KNghCIAArKCyqFTrRXwqcoBdv7x3Wg0/SXb+BAIYCXDdaER36mR/xVp p0jRcRiLs0/OJE4nOLxrnjQJCvV8ltAxcVTteH5Qew5fT2DWik5BdzYxjL2pyGHqfrvJ+6 QKZPUUwn3iZSu35fZFa5eH/wjj09g/8fFw8ws8eUl8QfBeCa5yDI4V+P4mMWzpCy/V/L9i pAgELpuQFdCgUiQyJG5V13j2xrfN5hgYsMUe0u6XG9jA1mNyUz4XaLLSVgsLSg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1657093830; a=rsa-sha256; cv=none; b=Eoi2TZQUHDn8Ij0CISv/iz9XRR72uzfgVfERCNhdBJw3y9h+qd71KzqNXoFw9Q0hyq/vB5 ImsaSkW0+ouckNPeE3DFtJ2fHzhUICWQMo0WLX8BLkdhj3Ns8dw28Y/j0Ag9/p1nVnWait KHnGk/BDfVmg/oRkVIYzBYwGXDBpzH0xzFTRbyvxi0I1ALydKQcueHN2E+SAvmF/JF2aKB tbTnaEq5Q6b48cMtmHZW+Bax+ABJeuiyPXk8vqNTGjLmTZNfkYeq53YTH8C9pzDgcle54g ngoexV0H5s28PZIeeeRp96qxbOyN6A/Y9ByVO22uJPSyDdhoYGwbA6oW5y+lWg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=vergauwen.me header.s=s1 header.b=VMW7EOfx; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -4.25 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=vergauwen.me header.s=s1 header.b=VMW7EOfx; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 56FC91B973 X-Spam-Score: -4.25 X-Migadu-Scanner: scn0.migadu.com X-TUID: tcsw9rDj/hLC ------=_Part_1251888_2026670681.1657093740575 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable > >>> Hi, adding an "input" type of header is one option. What about adding= a > >>> call to resolve relative file names instead, thus solving maybe other > >>> needs in addition? > >>> > >> That was my second approach. I was concerned that forcing all imports = with > >> an absolute path could break existing exports? Correct me if I'm wrong= .=20 > >> Using the :header syntax external files can be loaded in via the old w= ay, > >> whereas using :inputs all relative paths are resolved.=20 > >> The downside of course is that we clutter the export settings with a n= ew=20 > >> parameter.=20 > > > >Rather than changing paths to absolute, we can simply play with the > >working directly for latex process and set it to the directory of the > >.org file (unless :dir argument is passed to the latex source block). > >This is probably the most expected behavior. > > > >Best, > >Ihor > > Just my .01 cents... > > For Latex stuff I'm using just > > #+HEADER: \input{preamble}=20 > > and have my preamble.tex in the working directory. (For Beamer stuff it g= oes in a LATEX_HEADER). > > Changing that to > > #+HEADER :inputs '("preamble") > > well, would be a matter of taste.=20 > Ox-beamer (ox-latex) executes all latex commands at the current directory o= f=C2=A0 your org file, whereas ob-latex uses a temporary file to do its thing.=C2= =A0 (with-temp-file FILE &rest BODY) I think this is mostly done to prent metafiles from cluttering your current= =C2=A0 directory.=C2=A0 Different export types, or different user included packages, generate diffe= rent metafiles. This makes an automated cleanup process afterwards a bit more complicated I think, if not impossible.=C2=A0 The temporary file makes it hard to add files to the working directory.=C2= =A0 ------=_Part_1251888_2026670681.1657093740575 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

<= div>>>> Hi, adding an "input" type of header is one option. What a= bout adding a
>>> call to resolve relative file name= s instead, thus solving maybe other
>>> needs in add= ition?
>>>
>> That was my second= approach. I was concerned that forcing all imports with
>= > an absolute path could break existing exports? Correct me if I'm wrong= .
>> Using the :header syntax external files can be lo= aded in via the old way,
>> whereas using :inputs all r= elative paths are resolved.
>> The downside of course = is that we clutter the export settings with a new
>> p= arameter.
>
>Rather than changing paths = to absolute, we can simply play with the
>working directly= for latex process and set it to the directory of the
>.or= g file (unless :dir argument is passed to the latex source block).
>This is probably the most expected behavior.
>
>Best,
>Ihor

= Just my .01 cents...

For Latex stuff I'm using= just

#+HEADER: \input{preamble}

and have my preamble.tex in the working directory. (For Be= amer stuff it goes in a LATEX_HEADER).

Changin= g that to

#+HEADER :inputs '("preamble")

well, would be a matter of taste.
<= /blockquote>
Ox-beamer (ox-latex) executes all latex comma= nds at the current directory of 
your org f= ile, whereas ob-latex uses a temporary file to do its thing. 
(with-temp-file FILE &rest BODY)
I think this is mostly done to prent metafiles from cluttering yo= ur current 
directory. 

Different export types, or differe= nt user included packages, generate different
m= etafiles. This makes an automated cleanup process afterwards a bit more
=
complicated I think, if not impossible. 

The temporary file makes = it hard to add files to the working directory. 






<= /div>

------=_Part_1251888_2026670681.1657093740575--