Hi Hans, hi Wolfgang,

Thank you both — this makes the distinction much clearer.

I had indeed mixed two different mechanisms: suffix resolution when files are loaded from within ConTeXt, and the handling of the main input file given to the |context|command.

So, if I understand correctly, commands such as |\component|or |\usemodule|can look for the appropriate recognized suffixes when none is supplied, whereas

|context first-document|

does not automatically resolve to |first-document.mkxl|; without an extension, |.tex|is assumed.

In that case, the sentence in section 2

|The extension .mkxl is not needed to be typed.|

should indeed be corrected.

Perhaps something along these lines would be clearer:

|Save the file as first-document.mkxl. To process it, type: context first-document.mkxl When the main input file uses an extension other than .tex, the extension has to be specified explicitly.|

The automatic suffix lookup used by |\component|, |\usemodule|, etc. could then be explained separately, when project structure and file organization are introduced.

That separation would also be useful pedagogically, since in larger projects the distinction between the main document, components, environments, modules and other support files becomes quite important.

Best//JP


Le 04/10/2026 à 14:07, Wolfgang Schuster a écrit :
Am 04.10.2026 um 13:44 schrieb Hans Hagen via ntg-context:
On 10/4/2026 1:19 PM, Jean-Pierre Delange via ntg-context wrote:
Hi Wolfgang,

thank you for these useful clarifications.

I agree that, for an introductory manual, the extension should ideally be meaningful and immediately understandable.

At the same time, in more complex ConTeXt projects, it is very useful to distinguish file extensions clearly, because this makes it much easier to identify the role of a file at a glance.

For example, |.mkxl|is already widely used within the ConTeXt tree for implementation files, modules, environments, and other support or configuration material. In a larger project, keeping such files visually distinct from the main document sources can be very helpful.

So I think there is some merit in separating the extension used for internal or project-structure files from the extension used for ordinary user documents.

In that respect, |.lmtx|could be a more explicit and readable choice for user documents, while |.mkxl|would remain useful for the existing ConTeXt/LMTX implementation and configuration files.

This would also make the structure of larger projects easier to read and maintain.

as long as you keep in mind that when you don't use an extension what you load a file, the system checks for various suffixes (which is why ww can have files like foo.mkiv and foo.mkxl alongside)
The file extension are only tested with \component, \usemodule etc.

The manual has also the following sentence in section 2 which is false because only .tex is added when an extension is missing.


If you want to process a ConTeXt input file, you should type at the command line prompt:

    context first-document.mkxl

The extension .mkxl is not needed to be typed. [...]


Wolfgang

___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!

maillist : [email protected] / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : [email protected] / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

Reply via email to