当我尝试在我的上下文文件上运行 texexec 时,出现以下错误:
texexec va.ctx
/Users/davidsmith/context/tex/texmf-context/scripts/context/ruby/base/ctx.rb:120:in `manipulate': invalid byte sequence in US-ASCII (ArgumentError)
from /Users/davidsmith/context/tex/texmf-context/scripts/context/ruby/base/tex.rb:1729:in `processfile'
from /Users/davidsmith/context/tex/texmf-context/scripts/context/ruby/base/tex.rb:1081:in `block (2 levels) in processtex'
from /Users/davidsmith/context/tex/texmf-context/scripts/context/ruby/base/tex.rb:1071:in `timedrun'
from /Users/davidsmith/context/tex/texmf-context/scripts/context/ruby/base/tex.rb:1080:in `block in processtex'
from /Users/davidsmith/context/tex/texmf-context/scripts/context/ruby/base/tex.rb:1077:in `each'
from /Users/davidsmith/context/tex/texmf-context/scripts/context/ruby/base/tex.rb:1077:in `processtex'
from /Users/davidsmith/context/tex/texmf-context/scripts/context/ruby/texexec.rb:66:in `process'
from /Users/davidsmith/context/tex/texmf-context/scripts/context/ruby/texexec.rb:56:in `main'
from /Users/davidsmith/context/tex/texmf-context/scripts/context/ruby/base/switch.rb:135:in `execute'
from /Users/davidsmith/context/tex/texmf-context/scripts/context/ruby/texexec.rb:791:in `<main>'
以下是相关软件版本:
mtx-context | ConTeXt Process Management 0.61
mtx-context |
mtx-context | main context file: /Users/davidsmith/context/tex/texmf-context/tex/context/base/context.mkiv
mtx-context | current version: 2015.02.03 23:55
ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-darwin14]
我真的不知道如何解决这个问题。我尝试了 texlive 版本 (0.60) 和最新版本 (0.61)。
我尝试编译的文档是 UTF8 格式的,并且包含一些重音字符。
- 更新 -
任何带有重音字符的内容都会像这样失败。例如 -
\startmode[*mkii]
\enableregime[utf-8]
\setupcolors[state=start]
\stopmode
% Enable hyperlinks
\setupinteraction[state=start, color=middleblue]
\setuppapersize [letter][letter]
\setuplayout [width=middle, backspace=1.5in, cutspace=1.5in,
height=middle, topspace=0.75in, bottomspace=0.75in]
\starttext
á
\stoptext
答案1
文件类型.ctx
用于 XML 预处理文件texexec
。您必须将文件重命名为.tex
或调用context
而不是texexec
。