ConTeXt 单位模块失败

ConTeXt 单位模块失败

我定期更新 ConTeXt。不幸的是,单位模块不起作用。

\usemodule[units]

\starttext
50 \Milli \Meter.
\stoptext

日志档案 :

resolvers       | formats | executing runner 'run luametatex format': /home/aviroum/context/tex/texmf-linux-64/bin/luametatex --jobname="./test-units.tex" --fmt=/home/aviroum/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt --lua=/home/aviroum/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui  --c:currentrun=1 --c:fulljobname="./test-units.tex" --c:input="./test-units.tex" --c:kindofrun=1 --c:maxnofruns=9 --c:synctex --c:texmfbinpath="/home/aviroum/context/tex/texmf-linux-64/bin"
system          > 

system          > ConTeXt  ver: 2022.07.27 17:56 LMTX  fmt: 2022.7.29  int: english/english
system          > 
system          > 'cont-new.mkxl' loaded
open source     > level 1, order 1, name '/home/aviroum/context/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'
system          > beware: some patches loaded from cont-new.mkiv
close source    > level 1, order 1, name '/home/aviroum/context/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'
system          > files > jobname './test-units', input './test-units.tex', result './test-units'
fonts           > latin modern fonts are not preloaded
languages       > language 'en' is active
system          > synctex functionality is enabled, expect 5-10 pct runtime overhead!
open source     > level 1, order 2, name './test-units.tex'
modules         > 'units' is loaded
open source     > level 2, order 3, name '/home/aviroum/context/tex/texmf-context/tex/context/modules/mkiv/m-units.mkiv'
close source    > level 2, order 3, name '/home/aviroum/context/tex/texmf-context/tex/context/modules/mkiv/m-units.mkiv'
fonts           > preloading latin modern fonts (second stage)
fonts           > 'fallback modern-designsize rm 12pt' is loaded
tex error       > tex error on line 20 in file ./test-units.tex: Undefined control sequence \undefined 

<line 3.20> 
    50 \Milli
     \Meter.

10     
11     
12     %%%%%%%%%%%%%%%%%%%%%
13     %%%%%%%%%%%%%%%%%%%%%
14     \starttext
15     %%%%%%%%%%%%%%%%%%%%%
16     %%%%%%%%%%%%%%%%%%%%%
17     
18     
19     
20 >>  50 \Milli \Meter.
21     
22     
23     \stoptext
24     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
25     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
The control sequence at the end of the top line of your error message was never
\def'ed. You can just continue as I'll forget about whatever was undefined.
mtx-context     | fatal error: return code: 1

答案1

这是m-units.mkiv开始的方式:

%D \module
%D   [       file=m-units,
%D        version=1997.03.19,
%D          title=\CONTEXT\ Extra Modules,
%D       subtitle=Scientific Units,
%D         author={Hans Hagen \& Ton Otten},
%D           date=\currentdate,
%D      copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.

\ifcase\contextlmtxmode\else\endinput\fi

%D Best use the built in unit handle!

意思是该模块拒绝在LMTX下输入。

最好听取它的建议,但你可以强制它加载:

\chardef\contextlmtxmode=0
\usemodule[units]
\chardef\contextlmtxmode=1

\starttext
50 \Milli \Meter.
\stoptext

相关内容