Difference between revisions of "LMTX"

From Wiki
Jump to navigation Jump to search
(Created page with "Since April 2019, there is a new implementation of ConTeXt, named '''ConTeXt LMTX'''. It is tuned for LuaMetaTeX, the lean and mean successor of LuaTeX TeX engine (see [ht...")
 
(dedicated LMTX page)
Line 1: Line 1:
Since April 2019, there is a new implementation of ConTeXt, named '''ConTeXt [[LMTX]]'''. It is tuned for LuaMetaTeX, the lean and mean successor of LuaTeX TeX engine (see [https://tug.org/TUGboat/tb40-1/tb124hagen-lmtx.pdf article]).
+
Since April 2019, there is a new implementation of ConTeXt, named '''ConTeXt [[LMTX]]'''. It is tuned for LuaMetaTeX, the lean and mean successor of the LuaTeX engine.
 +
 
 +
From Hans' introductory article in TUGBoat:
 +
: More than decade after introducing the ConTeXt version for LuaTeX, flagged [[MkIV]] (the version known as [[MkII]] ran under more traditional TeX engines), it is time for something new. As MkVI, MkIX and MkXI are already taken for special variants of MkIV files a new acronym was coined: LMTX. Such a sequence of letters must sound somewhat fancy but it actually has a meaning, or better: it has several. One is that it stands for LuaMetaTeX, an indication of an engine to be used. But one can also think of the components that make up ConTeXt code: Lua, MetaPost, TeX, and XML. But once it is clear to a user what (s)he is dealing with, it can also indicate a “Lean and Mean TeX eXperience”.
 +
 
 +
== The LuaMetaTeX engine ==
 +
 
 +
The big difference between LMTX and all previous versions of ConTeXt is that LMTX uses a compilation and scripting engine that is specifically developed with ConTeXt in mind: LuaMetaTeX (the executable is named `luametatex`). This new engine builds heavily on the LuaTeX engine, but it has been optimised heavily for ConTeXt use:
 +
 
 +
* There are no external dependencies except for thee core `libc` and `libm` runtimes
 +
* There is no PDF backend code, all PDF generation is handled by ConTeXt's Lua code
 +
* There is no `fontloader` lua interface library, (OpenType) font loading is handled by ConTeXt's Lua code
 +
* There are no `img` and `pdf` (poppler-based) lua interface libraries (the latter is replaced by the leaner dedicated library `epdf`)
 +
* Various extensions have been made to other lua interface libraries
 +
 
 +
When it comes to typesetting, `luametatex` is (at least for now) 100% compatible with LuaTeX > 1.0.
 +
 
 +
== The LMTX distribution ==
 +
 
 +
Some extra scripting extensions in the engine have made it much easier to produce a standalone distribution of ConTeXt that is not only compact, but also capable of partial updates. See [[Installation]] for the new installation and update process.
 +
 
 +
Of course the new distribution defaults to running LMTX. But it can still process input using LuaTeX ([[MkIV]]) as well. You can do this by running
 +
 
 +
<pre>
 +
  context --luatex
 +
</pre>
 +
This works because the distribution contains all of the [[MkIV]] source code as well as a `luatex` binary.
 +
 
 +
The new installation no longer contains the [[MkII]] source code or binaries, and is therefore unable to run it.
 +
 
 +
 
 +
= Further reading =
 +
* Hans' introductory [https://tug.org/TUGboat/tb40-1/tb124hagen-lmtx.pdf article] in TUGBoat 40:1.
 +
* The official page '''[http://www.pragma-ade.com/install.htm Installing CONTEXT LMTX ]''' is hosted by Pragma-Ade, which also provides
 +
** a 2 pages '''[http://lmtx.pragma-ade.nl/install-lmtx/installation.pdf installation guide]''',
 +
** a 1 page [http://distribution.contextgarden.net/current/context/experimental/doc/context/documents/general/leaflets/leaflet-context.pdf leaflet for ConTeXt LMTX]
 +
** a 1 page [http://distribution.contextgarden.net/current/context/experimental/doc/context/documents/general/leaflets/leaflet-luametatex.pdf leaflet for LuaMetaTeX].

Revision as of 12:26, 2 July 2020

Since April 2019, there is a new implementation of ConTeXt, named ConTeXt LMTX. It is tuned for LuaMetaTeX, the lean and mean successor of the LuaTeX engine.

From Hans' introductory article in TUGBoat:

More than decade after introducing the ConTeXt version for LuaTeX, flagged MkIV (the version known as MkII ran under more traditional TeX engines), it is time for something new. As MkVI, MkIX and MkXI are already taken for special variants of MkIV files a new acronym was coined: LMTX. Such a sequence of letters must sound somewhat fancy but it actually has a meaning, or better: it has several. One is that it stands for LuaMetaTeX, an indication of an engine to be used. But one can also think of the components that make up ConTeXt code: Lua, MetaPost, TeX, and XML. But once it is clear to a user what (s)he is dealing with, it can also indicate a “Lean and Mean TeX eXperience”.

The LuaMetaTeX engine

The big difference between LMTX and all previous versions of ConTeXt is that LMTX uses a compilation and scripting engine that is specifically developed with ConTeXt in mind: LuaMetaTeX (the executable is named luametatex). This new engine builds heavily on the LuaTeX engine, but it has been optimised heavily for ConTeXt use:

  • There are no external dependencies except for thee core libc and libm runtimes
  • There is no PDF backend code, all PDF generation is handled by ConTeXt's Lua code
  • There is no fontloader lua interface library, (OpenType) font loading is handled by ConTeXt's Lua code
  • There are no img and pdf (poppler-based) lua interface libraries (the latter is replaced by the leaner dedicated library epdf)
  • Various extensions have been made to other lua interface libraries

When it comes to typesetting, luametatex is (at least for now) 100% compatible with LuaTeX > 1.0.

The LMTX distribution

Some extra scripting extensions in the engine have made it much easier to produce a standalone distribution of ConTeXt that is not only compact, but also capable of partial updates. See Installation for the new installation and update process.

Of course the new distribution defaults to running LMTX. But it can still process input using LuaTeX (MkIV) as well. You can do this by running

  context --luatex

This works because the distribution contains all of the MkIV source code as well as a luatex binary.

The new installation no longer contains the MkII source code or binaries, and is therefore unable to run it.


Further reading