Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) by h1439878.stratoserver.net (8.14.4/8.14.4/Debian-2ubuntu2.1) with ESMTP id t6JAQSUl031259 for ; Sun, 19 Jul 2015 12:26:29 +0200 Received: from relay.uni-heidelberg.de ([129.206.100.212]) by mx-ha.gmx.net (mxgmx011) with ESMTPS (Nemesis) id 0MWxRU-1ZUx902zu0-00VyMd for ; Sun, 19 Jul 2015 12:26:22 +0200 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [129.206.100.94]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id t6JAOtPS007940 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 19 Jul 2015 12:24:55 +0200 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [127.0.0.1]) by listserv.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id t6INhJV4000531; Sun, 19 Jul 2015 12:24:55 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 12369474 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Sun, 19 Jul 2015 12:24:55 +0200 Received: from relay2.uni-heidelberg.de (relay2.uni-heidelberg.de [129.206.210.211]) by listserv.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id t6JAOtm9020435 for ; Sun, 19 Jul 2015 12:24:55 +0200 Received: from mx02.posteo.de (mx02.posteo.de [89.146.194.165]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id t6JAOnB6020867 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 19 Jul 2015 12:24:51 +0200 Received: from dovecot04.posteo.de (unknown [185.67.36.27]) by mx02.posteo.de (Postfix) with ESMTPS id 160E425AF529 for ; Sun, 19 Jul 2015 12:24:49 +0200 (CEST) Received: from mail.posteo.de (localhost [127.0.0.1]) by dovecot04.posteo.de (Postfix) with ESMTPSA id 3mZ2PD3fqNzFpW3 for ; Sun, 19 Jul 2015 12:24:48 +0200 (CEST) References: <559AE0A8.3080907@morningstar2.co.uk> <55A3E1DD.8050707@posteo.net> <55A3E5E6.2060405@morningstar2.co.uk> <55A4137A.7030807@posteo.net> <55A415FF.8030305@nag.co.uk> <55A801A8.5090702@posteo.net> <55A809C4.70009@nag.co.uk> <55AA1554.3050509@posteo.net> <55AA24D9.1050904@latex-project.org> <55AA29B9.9050104@posteo.net> <55AA5596.4090007@telecom-bretagne.eu> <55AA755E.5000609@posteo.net> <55AB5AF6.2030301@nag.co.uk> User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <55AB7AF0.2070602@posteo.net> Date: Sun, 19 Jul 2015 12:24:48 +0200 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Stephan Hennig Subject: Re: LuaTeX support in the LaTeX kernel To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE In-Reply-To: <55AB5AF6.2030301@nag.co.uk> Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: Envelope-To: X-GMX-Antispam: 0 (Mail was not recognized as spam); Detail=V3; X-GMX-Antivirus: 0 (no virus found) X-UI-Filterresults: notjunk:1;V01:K0:m+omjHuxb5c=:wkXYDe/pLdrnbZjqoSccb9JIcE GeW1u5gSBMUjal8piklO0M0l88fxKVxsbExTr36F4OHf0D6Qu4XJSUjjB7NUi9MFv2WoI2sHB ab2xxsLuVkp4p+MDoAHNOqF8gsaaijzB3fmxgflcVCt2KFsuuUk+vMpl0y6ngrFjOTYx4G3JQ rTnLbHL4pSNeiGVR4xsuUwJhgv3wrRWcylksPnYtkAXgRLURs03MBz4fF34/XBg5Z4cHO8nhk dFfVGevst70QaIpeu5/sTMEnrRI/9gpYi+I/+mk3AuyAbBlEXEkdyJ1ok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QDOzB4ds6OLfQztP6g1sQGkZ+vkA2v3UOs6+fC7W6L z4fjcNaqyah4uFvZZl5+xf/Htibp1KJ7kCyJWb5dzTd+TMVWW9/FlYDXknqHzp1jSCo2a4Lf5 VufcsUA2J7vtJln9pHs+FYE9ehXi1i4xiaUndOoSgWSvxnJQat X-UI-Loop:V01:BmYWMBerefM=:/yT7Ol+e9PpYMOyJKXlD26SYgbwkvGD9eEcqjyxC8OY= X-UI-Out-Filterresults: notjunk:1;V01:K0:5hgatdqgkpE=:OcjUXC6e6nrZWlnLMjxEpx FxrXS3ioxIo1dQxm1xhHksWyWb3fmc73FO5YGnT2tqxTGFSl0sUSjFqwvWkOVEgYV12Ch0XUV nhstfO1bcX/ryLge9UAuIot3FP7HgcRA0uRM4EnlRzo3hB/iQbbpsjRsd5LxTpC6fi/5BoDHb ctWB/XdjFnams6fj+AHdWl/fK94uGW5dvSQ/hwhBCCG9Ubh6vLLnJTDzFzfAy5uFgqyqm6yu8 Oqta6dhRUKbA7WBUGUrDYIXv0Vpl/EhMoOY/pkhU3s2CnR0lWCBkel9VpiCfpMOGdpsDtvGoF wRaWodzJp4YxgUZhNiX8x458iWbnb0vT2tYrTbN3GlxfZxtcl6XDYbJhhyBS8sZlrB+0p018U BnwLoQDA0RaVwwzJdtZ+gDDeI7A++V2ZjlTCS4DyIVDoByQwlcBlGL1uYcxNURH0aA6B8jb60 aUB92LKyk/Rj4iifBgveasljjllQmOCds4K823WBFexhPNvvLO85 X-Scanned-By: MIMEDefang 2.71 on 85.214.41.38 Status: R X-Status: X-Keywords: X-UID: 7801 Am 19.07.2015 um 10:08 schrieb David Carlisle: > On 18/07/2015 16:48, Stephan Hennig wrote: >> What's needed is a defined programming API. >> With two implementations (luatexbase and ltlatex) that is more or less >> already there. > > > So is there anything in the current ltluatex that you object to? > It would appear not. The ltluatex code implements the existing > luatexbase API sufficiently well that many (all?) existing packages > including spelling work unchanged (see pkgtest on github) and also > works from plain tex as well as latex (see plaintest). Sorry, I haven't kept-up with ltlatex since a884. Nothing to object at that time. Regarding my two feature requests: 1. The first one is against the current luatexbase package and irrelevant for ltlatex, I think. You can't currently write a /self-contained/ Lua module that requires, e.g., the mcb.lua module. As soon as luatexbase or luatexbase-mcb are already loaded at the TeX level, callback registering breaks. \begin{filecontents*}{self-contained.lua} if not (luatexbase and luatexbase.require_module) then require('modutils') end luatexbase.require_module('mcb') luatexbase.add_to_callback('pre_linebreak_filter', function (head) return head-- do nothing end, 'foo') \end{filecontents*} \documentclass{article} % Loading the luatexbase or luatexbase-mcb package % at the LaTeX level breaks callback registering. %\usepackage{luatexbase} \directlua{ dofile('self-contained.lua') } \begin{document} text \end{document} Of course, one can work-around that by testing for features before requiring mcb.lua, but placing the guard in mcb.lua would be nice. 2. When registering a callback, there's no way to know what happens before or after your code /in the same callback/. That is, the list you're dealing with may already have been modified or may be subject to further modification in the same callback. For debugging purposes, it's sometimes desirable to see the original list passed to or returned from a callback. Package luatexbase already provides a priority system, but that doesn't help much, because you can't rely on staying at the requested priority. Speaking about debugging, that is, printing or drawing a node list, these operations are usually non-invasive, i.e., they don't modify a node list. The callbacks provided by LuaTeX could be wrapped in two additional callbacks, each. A function registering any of the proposed new callbacks gets a copy of the original list as argument so that it cannot modify the original list. That way, one can be sure to see what's originally passed to or returned from a callback. It's easy to model this around a basic format-dependant callback allocation implementation. So this is more of an idea than a request for a kernel implementation (that a Lua package author targeting multiple formats won't use directly). Best regards, Stephan Hennig