From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,T_SCC_BODY_TEXT_LINE,URIBL_SBL_A autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 28528 invoked from network); 27 May 2023 09:45:34 -0000 Received: from zapf.ntg.nl (5.39.185.232) by inbox.vuxu.org with ESMTPUTF8; 27 May 2023 09:45:34 -0000 Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id A769D1C38C9; Sat, 27 May 2023 11:45:05 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.ntg.nl Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Qlhgi2kSGZiq; Sat, 27 May 2023 11:45:03 +0200 (CEST) Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 5CAAD1C3895; Sat, 27 May 2023 11:45:03 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 3DBBF1C3895 for ; Sat, 27 May 2023 11:45:01 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.ntg.nl Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HgJlYUtc3YZL for ; Sat, 27 May 2023 11:45:00 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=17.58.23.187; helo=mr85p00im-zteg06021601.me.com; envelope-from=peter.hopcroft@icloud.com; receiver= Received: from mr85p00im-zteg06021601.me.com (mr85p00im-zteg06021601.me.com [17.58.23.187]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id E40F11C3218 for ; Sat, 27 May 2023 11:44:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=1a1hai; t=1685180696; bh=n8+Uh9JbzaJo6+N0w1Z8cqKcNCq4wVhyJyryAfCV+vc=; h=Content-Type:Mime-Version:Subject:From:Date:Message-Id:To; b=R/6Mk02vBmTmZXOBqTqTbktoqbGbB7tJe5fiLJNhxtuSGguRDE1xGqFjSltC5a5bi WUD01HKP4VNZjIqYEJhIZ9Slh+DozxW4FdEnqnfckx33YvV1a/ARsSKBa2EmdD+WpP r2JHJWBW+FNM+hKtELNwgH/bStXxQq1lt747FxsdSU5DP386/d1JTQXhRn4bB5lwwV qMfaFC3/5aGV7kaR/DfJ8oEyKf9OHkjxGtbm+1flhvgsgraKMuxosvtjh8p+ncOT51 JJXo1yWhFYRK1HlNYrolsUn/e5xgElccoEWb7uakur0fJIWyjOvdvZJJZbvgX5/jXV jiQJ43cjJEULQ== Received: from smtpclient.apple (mr38p00im-dlb-asmtp-mailmevip.me.com [17.57.152.18]) by mr85p00im-zteg06021601.me.com (Postfix) with ESMTPSA id 8AA9C30584BA; Sat, 27 May 2023 09:44:54 +0000 (UTC) Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.500.231\)) In-Reply-To: <78c71878522e119db77b24cd93ab4782b6de2d82.camel@telus.net> Date: Sat, 27 May 2023 21:44:42 +1200 Message-Id: <9D3F0582-6E08-4684-8E10-2BB5A0C1B6D2@icloud.com> References: <78c71878522e119db77b24cd93ab4782b6de2d82.camel@telus.net> To: mailing list for ConTeXt users X-Mailer: Apple Mail (2.3731.500.231) X-Proofpoint-ORIG-GUID: jez_z1ywzD6Dqs2xh31Vx1wtmlvX8DAx X-Proofpoint-GUID: jez_z1ywzD6Dqs2xh31Vx1wtmlvX8DAx X-Proofpoint-Virus-Version: =?UTF-8?Q?vendor=3Dfsecure_engine=3D1.1.170-22c6f66c430a71ce266a39bfe25bc?= =?UTF-8?Q?2903e8d5c8f:6.0.425,18.0.816,17.11.62.513.0000000_definitions?= =?UTF-8?Q?=3D2022-01-18=5F01:2022-01-14=5F01,2022-01-18=5F01,2021-12-02?= =?UTF-8?Q?=5F01_signatures=3D0?= X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 clxscore=1015 mlxlogscore=999 mlxscore=0 spamscore=0 bulkscore=0 adultscore=0 phishscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2305270084 Subject: Re: [NTG-context] Can ConTeXt write its pdf to a different directory? X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.38 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: "peter.hopcroft--- via ntg-context" Reply-To: mailing list for ConTeXt users Cc: peter.hopcroft@icloud.com, Max Chernoff Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ntg-context-bounces@ntg.nl Sender: "ntg-context" Max, that answer seems like magic to me, in the sense of an advanced technology. Thank you. It's not quite working for me yet. I'll explore more tomorrow and learn about lua. Peter > On 27/05/2023, at 3:53 PM, Max Chernoff via ntg-context wrote: > > Hi Peter, > >> My .tex file is in a directory within my working directory. I would like >> ConTeXt to write its output in the same directory as my .tex file. But it >> writes to the working directory. >> >> This was asked 10 years ago: >> `tex.stackexchange.com/questions/67928/how-to-set-output-directory-in-context-command` >> >> The answer given then was to use: >> `context filename --result=output-directory/filename` >> >> But this doesn't work now. When I compile my .tex file, I get a message: >> `results are to be on the running path, not on 'output-directory', ignoring >> --result` > > This seems to work, although I'm not sure that I would call it a "good" > solution: > > \startluacode > local function absolute(path) > return file.collapsepath(dir.expandname(path)) > end > > local texfile = absolute(environment.filename) > local pdffile = file.addsuffix( > absolute(environment.inputfilebarename), > "pdf" > ) > > luatex.wrapup(function() > os.rename(pdffile, file.replacesuffix(texfile, "pdf")) > end) > \stopluacode > > \starttext > Hello! > \stoptext > > -- Max > ___________________________________________________________________________________ > If your question is of interest to others as well, please add an entry to the Wiki! > > maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > ___________________________________________________________________________________ ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___________________________________________________________________________________