第一行中 --translate-file 的解析是否默认被禁用?

第一行中 --translate-file 的解析是否默认被禁用?

我在 MikTeX 和 TeXlive 文档中都找不到任何信息。据我所知,现代 TeX 发行版默认禁用第一行的解析(使用 --translate-file 等);我说得对吗?

答案1

据我所知,除“Knuth TeX”之外,其他都已启用。

如果我尝试latex这个示例输入文件

%& pdflatex --translate-file=cp1250t1.tcx
\typeout{\the\pdfoutput}

我进入终端

This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012)
 restricted \write18 enabled.
 (/usr/local/texlive/2012/texmf/web2c/cp1250t1.tcx)
entering extended mode
(./firstline.tex
LaTeX2e <2011/06/27>
Babel <v3.8m> and hyphenation patterns for english, dumylang, nohyphenation, ge
rman-x-2012-05-30, ngerman-x-2012-05-30, afrikaans, ancientgreek, ibycus, arabi
c, armenian, basque, bulgarian, catalan, pinyin, coptic, croatian, czech, danis
h, dutch, ukenglish, usenglishmax, esperanto, estonian, ethiopic, farsi, finnis
h, french, friulan, galician, german, ngerman, swissgerman, monogreek, greek, h
ungarian, icelandic, assamese, bengali, gujarati, hindi, kannada, malayalam, ma
rathi, oriya, panjabi, tamil, telugu, indonesian, interlingua, irish, italian, 
kurmanji, latin, latvian, lithuanian, mongolian, mongolianlmc, bokmal, nynorsk,
 polish, portuguese, romanian, romansh, russian, sanskrit, serbian, serbianc, s
lovak, slovenian, spanish, swedish, turkish, turkmen, ukrainian, uppersorbian, 
welsh, loaded.
1
)

显示.tcx文件已加载并且 PDF 输出已启用,即使调用了latex

但是,如果我省略格式,则不会加载该选项。

在我的主texmf.cnf文件中,设置是

% Allow TeX, and MF to parse the first line of an input file for
% the %&format construct.
parse_first_line = t

% But don't parse the first line if invoked as "tex", since we want that
% to remain Knuth-compatible.  The src_specials and
% file_line_error_style settings, as well as the options -enctex,
% -mltex, -8bit, etc., also affect this, but they are all off by default.
parse_first_line.tex = f
parse_first_line.initex = f

相关内容