{"title":"ConTeXt in TeX Live 2023","authors":"H. Hagen","doi":"10.47397/tb/44-1/tb136hagen-texlive","DOIUrl":null,"url":null,"abstract":"Starting with TEX Live 2023 the default ConTEXt distribution is LMTX, a follow up on MkIV, running on top of the LuaMetaTEX engine instead of LuaTEX. Already for a long time the MkII version used with pdfTEX, X E TEX and Aleph has been frozen and most users moved on from MkIV to LMTX (a more distinctive tag for what internally is version MkXL). In principle one can argue that we now have three versions of ConTEXt and there can be the impression that they are very different. However, although MkXL can do more than MkIV which can do more than MkII, the user interface hasn’t changed that much and old functionality is available in newer versions. Of course some old features make no sense in newer variants, like eight-bit font encodings in an OpenType font realm and input encodings when one uses UTF, although we still support input encodings a.k.a. regimes. When we started using the Mk* suffixes the main reason was that we had to distinguish files and the official TEX distribution doesn’t permit duplicate file names. Using a distinctive suffix also makes it possible to treat files differently. Table 1 shows major aspects of the different ConTEXt versions. The ‘template’ files listed in the table are a mix of TEX and Lua and originate in the early days of MkIV; basically, they are a wink to active server pages. With ‘arguments’, we refer to files that accept named macro arguments which means that they need to be preprocessed. That started as a proof of concept but some core files are defined that way. Users will normally just use a .tex file. The Lua files in the code base have the suffix lua, or when meant for LuaMetaTEX that uses a newer Lua engine they can have the suffix lmt. There can also be lfg (font goodies) and llg (language goodies) plus byte-compiled files with various suffixes but these are normally not seen by users. We leave it at that. So, while TEX Live 2022 installed MkII and MkIV, TEX Live 2023 installs MkIV and LMTX. Therefore the most significant upgrade is in the engine that is used by default: LuaMetaTEX instead of LuaTEX. The MkII files are no longer installed so we don’t need pdfTEX. So how did we end up here? Initially the idea was that, because LuaTEX is basically frozen, LuaMetaTEX would be the engine that we conduct experiments with and from which occasionally we could backport code to LuaTEX. However it soon became clear that this would not work out well so backporting is off the table now. Just for the record: the project started years ago so we’re not talking about something experimental here. There have been articles in TUGboat about what we’ve been doing over the years. One of the first decisions I made when starting with LuaMetaTEX was to remove the built-in backend, which then meant also removing the bitmap image inclusion code. That made us get rid of dependencies on external libraries. In fact, a proof-ofconcept experimental variant didn’t use the built-in backend at all. The font loading code could be removed as well because that was not used in MkIV either. In MkIV we also don’t use the kpse library for managing files so that code could be dropped from the engine tool; it can be loaded as so-called optional library if needed but I’ll not discuss that here. If you look at what happens with the LuaTEX code base, you’ll notice that updating libraries happens frequently and that is not a burden that we want to impose on users, especially because it also can involve updating build-related files. Another advantage of not using them is that the code base remains small. A direct consequence of all this was that the build process became much more efficient and less complex. A fast compilation (seconds instead of minutes) meant that more drastic experiments became possible, like most recently an upgrade of the math subsystem. All this, combined with an overhaul of","PeriodicalId":93390,"journal":{"name":"TUGboat (Providence, R.I.)","volume":"16 1","pages":""},"PeriodicalIF":0.0000,"publicationDate":"2023-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"TUGboat (Providence, R.I.)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.47397/tb/44-1/tb136hagen-texlive","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0
Abstract
Starting with TEX Live 2023 the default ConTEXt distribution is LMTX, a follow up on MkIV, running on top of the LuaMetaTEX engine instead of LuaTEX. Already for a long time the MkII version used with pdfTEX, X E TEX and Aleph has been frozen and most users moved on from MkIV to LMTX (a more distinctive tag for what internally is version MkXL). In principle one can argue that we now have three versions of ConTEXt and there can be the impression that they are very different. However, although MkXL can do more than MkIV which can do more than MkII, the user interface hasn’t changed that much and old functionality is available in newer versions. Of course some old features make no sense in newer variants, like eight-bit font encodings in an OpenType font realm and input encodings when one uses UTF, although we still support input encodings a.k.a. regimes. When we started using the Mk* suffixes the main reason was that we had to distinguish files and the official TEX distribution doesn’t permit duplicate file names. Using a distinctive suffix also makes it possible to treat files differently. Table 1 shows major aspects of the different ConTEXt versions. The ‘template’ files listed in the table are a mix of TEX and Lua and originate in the early days of MkIV; basically, they are a wink to active server pages. With ‘arguments’, we refer to files that accept named macro arguments which means that they need to be preprocessed. That started as a proof of concept but some core files are defined that way. Users will normally just use a .tex file. The Lua files in the code base have the suffix lua, or when meant for LuaMetaTEX that uses a newer Lua engine they can have the suffix lmt. There can also be lfg (font goodies) and llg (language goodies) plus byte-compiled files with various suffixes but these are normally not seen by users. We leave it at that. So, while TEX Live 2022 installed MkII and MkIV, TEX Live 2023 installs MkIV and LMTX. Therefore the most significant upgrade is in the engine that is used by default: LuaMetaTEX instead of LuaTEX. The MkII files are no longer installed so we don’t need pdfTEX. So how did we end up here? Initially the idea was that, because LuaTEX is basically frozen, LuaMetaTEX would be the engine that we conduct experiments with and from which occasionally we could backport code to LuaTEX. However it soon became clear that this would not work out well so backporting is off the table now. Just for the record: the project started years ago so we’re not talking about something experimental here. There have been articles in TUGboat about what we’ve been doing over the years. One of the first decisions I made when starting with LuaMetaTEX was to remove the built-in backend, which then meant also removing the bitmap image inclusion code. That made us get rid of dependencies on external libraries. In fact, a proof-ofconcept experimental variant didn’t use the built-in backend at all. The font loading code could be removed as well because that was not used in MkIV either. In MkIV we also don’t use the kpse library for managing files so that code could be dropped from the engine tool; it can be loaded as so-called optional library if needed but I’ll not discuss that here. If you look at what happens with the LuaTEX code base, you’ll notice that updating libraries happens frequently and that is not a burden that we want to impose on users, especially because it also can involve updating build-related files. Another advantage of not using them is that the code base remains small. A direct consequence of all this was that the build process became much more efficient and less complex. A fast compilation (seconds instead of minutes) meant that more drastic experiments became possible, like most recently an upgrade of the math subsystem. All this, combined with an overhaul of
从TEX Live 2023开始,默认的ConTEXt发行版是LMTX,它是MkIV的后续版本,运行在LuaMetaTEX引擎之上,而不是LuaTEX。已经有很长一段时间,与pdfTEX, X E TEX和Aleph一起使用的MkII版本已经冻结,大多数用户从MkIV转向LMTX(内部版本MkXL的一个更独特的标签)。原则上,人们可以说,我们现在有三个版本的上下文,可能给人的印象是它们非常不同。然而,尽管MkXL可以做的比MkIV多,而MkIV比MkII做的多,但用户界面并没有改变那么多,旧的功能在新版本中可用。当然,一些旧的特性在新的变体中没有意义,比如OpenType字体领域中的8位字体编码和使用UTF时的输入编码,尽管我们仍然支持输入编码,也就是体制。当我们开始使用Mk*后缀时,主要原因是我们必须区分文件,而官方TEX发行版不允许重复文件名。使用独特的后缀还可以对文件进行不同的处理。表1显示了不同ConTEXt版本的主要方面。表中列出的“模板”文件是TEX和Lua的混合,起源于MkIV的早期;基本上,它们是对活动服务器页面的一个提示。使用' arguments ',我们引用接受命名宏参数的文件,这意味着它们需要预处理。这开始是作为一个概念证明,但一些核心文件是这样定义的。用户通常只使用.tex文件。代码库中的Lua文件具有Lua后缀,或者当用于使用较新的Lua引擎的LuaMetaTEX时,它们可以具有后缀lmt。还可以有lfg(字体)和llg(语言)以及具有各种后缀的字节编译文件,但这些文件通常不会被用户看到。我们就到此为止。因此,TEX Live 2022安装了MkII和MkIV, TEX Live 2023安装了MkIV和LMTX。因此,最重要的升级是在默认使用的引擎:LuaMetaTEX而不是LuaTEX。MkII文件不再安装,所以我们不需要pdfTEX。那我们是怎么走到这一步的?最初的想法是,因为LuaTEX基本上是冻结的,所以LuaMetaTEX将成为我们进行实验的引擎,并且偶尔我们可以从中将代码反向移植到LuaTEX。然而很快我们便发现这并不可行,所以现在便不再考虑后移植了。声明一下:这个项目几年前就开始了,所以我们在这里讨论的不是实验性的东西。在《拖船》上有很多关于我们多年来所做的事情的文章。当我开始使用LuaMetaTEX时,我所做的第一个决定是移除内置后端,这也意味着移除位图图像包含代码。这使我们摆脱了对外部库的依赖。事实上,一个概念验证的实验版本根本没有使用内置后端。字体加载代码也可以删除,因为在MkIV中也没有使用。在MkIV中,我们也不使用kpse库来管理文件,这样代码就可以从引擎工具中删除;如果需要,它可以作为所谓的可选库加载,但我不会在这里讨论这个。如果您查看LuaTEX代码库发生了什么,您会注意到库的更新频繁发生,这并不是我们想要强加给用户的负担,特别是因为它还可能涉及更新与构建相关的文件。不使用它们的另一个优点是代码库仍然很小。所有这一切的直接结果是构建过程变得更加高效和不那么复杂。快速编译(秒而不是分钟)意味着更激烈的实验成为可能,比如最近对数学子系统的升级。所有这一切,再加上对