编辑

编辑

感谢@daleif 在评论中提供的评论,我能够从此页面下载并提取上下文安装这个问题

然后我提取了存档C:\context并运行了install.batsetpath.bat。 两者似乎都运行正常。 以下是 生成的一些最终输出install.bat

mtx-install     | tex/texmf            :    0 files with         0 bytes installed
mtx-install     | tex/texmf-context    :    0 files with         0 bytes installed
mtx-install     | tex/texmf-win64      :    0 files with         0 bytes installed
mtx-install     | 
mtx-install     | ConTeXt LMTX with LuaMetaTeX is still experimental and when you get a crash this
mtx-install     | can be due to a mismatch between Lua bytecode and the engine. In that case you can
mtx-install     | try the following:
mtx-install     | 
mtx-install     |   - wipe the texmf-cache directory
mtx-install     |   - run: mtxrun --generate
mtx-install     |   - run: context --make
mtx-install     | 
mtx-install     | When that doesn't solve the problem, ask on the mailing list ([email protected]).
mtx-install     | 
mtx-install     | update, done


Updating installer:

        1 file(s) copied.
        1 file(s) copied.
        1 file(s) copied.

When you want to use context, you need to initialize the tree with:

  C:\context\setpath.bat

You can associate this command with a shortcut to the cmd prompt. Alternatively
you can add

  C:\context\tex\texmf-win64\bin

to your PATH variable. If you run from an editor you can specify the full path
to mtxrun.exe:

  C:\context\tex\texmf-win64\bin\mtxrun.exe --autogenerate --script context --autopdf ...

The following settings were used:

  server   : lmtx.contextgarden.net,lmtx.pragma-ade.com,lmtx.pragma-ade.nl
  instance : install-lmtx
  extras   : 
  ownpath  : C:\context\
  platform : win64

我重新启动了 powershell,下载了你好世界 tex 文件并尝试进行如下编译:

context test.tex

但是 powershell 无法识别该命令,并且我得到了以下输出,我不得不强制退出,这表明context尚未添加为命令行可执行文件:

cmdlet Context at command pipeline position 1
Supply values for the following parameters:
Name:

我的安装出了什么问题吗?如何让上下文在我的 Windows 机器上工作?

编辑

回应@Ulrike Fischers 的评论:

C:\context > echo $env:path
C:\Users\921479\AppData\Local\Programs\Python\Python39\Scripts\;C:\Users\921479\AppData\Local\Programs\Python\Python39\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\ProgramData\chocolatey\bin;C:\Users\921479\AppData\Local\SumatraPDF;C:\Program Files\Git\cmd;C:\texlive\2021\bin\win32;C:\Program Files (x86)\PDFtk Server\bin\;C:\Program Files (x86)\Lua\5.1;C:\Program Files (x86)\Lua\5.1\clibs;C:\Program Files\Inkscape\bin;C:\Program Files\dotnet\;;C:\Program Files\WindowsPowerShell\Scripts;C:\Users\921479\AppData\Local\Microsoft\WindowsApps;C:\Users\921479\.dotnet\tools;C:\Program Files\Tracker Software\PDF Editor
C:\context > .\setpath.bat
C:\context > context

cmdlet Context at command pipeline position 1
Supply values for the following parameters:
Name:
C:\context > echo $env:path
C:\Users\921479\AppData\Local\Programs\Python\Python39\Scripts\;C:\Users\921479\AppData\Local\Programs\Python\Python39\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\ProgramData\chocolatey\bin;C:\Users\921479\AppData\Local\SumatraPDF;C:\Program Files\Git\cmd;C:\texlive\2021\bin\win32;C:\Program Files (x86)\PDFtk Server\bin\;C:\Program Files (x86)\Lua\5.1;C:\Program Files (x86)\Lua\5.1\clibs;C:\Program Files\Inkscape\bin;C:\Program Files\dotnet\;;C:\Program Files\WindowsPowerShell\Scripts;C:\Users\921479\AppData\Local\Microsoft\WindowsApps;C:\Users\921479\.dotnet\tools;C:\Program Files\Tracker Software\PDF Editor

相关内容