F25/TexLive2016 没有为俄语预加载连字模式

F25/TexLive2016 没有为俄语预加载连字模式

抱歉,我问了一个在这里出现过多次的问题。我读了所有相关的帖子,但都没有任何帮助。

我的操作系统是 Fedora 25、TexLive 2016。代码(ruhyphen.tex)是:

\documentclass{article}
\usepackage{hyphsubst}
\usepackage[T1,T2A]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english,russian]{babel}

\begin{document}
Привет
\end{document}

latex 命令的输出是:

This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016) (preloaded format=latex)
 restricted \write18 enabled.
entering extended mode
(./ruhyphen.tex
LaTeX2e <2016/03/31>
Babel <3.9r> and hyphenation patterns for 3 language(s) loaded.
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo))
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/hyphsubst.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/infwarerr.sty))
(/usr/share/texlive/texmf-dist/tex/latex/base/fontenc.sty
(/usr/share/texlive/texmf-dist/tex/latex/base/t1enc.def)
(/usr/share/texlive/texmf-dist/tex/latex/cyrillic/t2aenc.def)
(/usr/share/texlive/texmf-dist/tex/latex/cyrillic/t2acmr.fd))
(/usr/share/texlive/texmf-dist/tex/latex/base/inputenc.sty
(/usr/share/texlive/texmf-dist/tex/latex/base/utf8.def
(/usr/share/texlive/texmf-dist/tex/latex/base/t1enc.dfu)
(/usr/share/texlive/texmf-dist/tex/latex/base/ot1enc.dfu)
(/usr/share/texlive/texmf-dist/tex/latex/base/omsenc.dfu)
(/usr/share/texlive/texmf-dist/tex/latex/base/t2aenc.dfu)))
(/usr/share/texlive/texmf-dist/tex/generic/babel/babel.sty
(/usr/share/texlive/texmf-dist/tex/generic/babel-english/english.ldf
(/usr/share/texlive/texmf-dist/tex/generic/babel/babel.def))
(/usr/share/texlive/texmf-dist/tex/generic/babel-russian/russianb.ldf

Package babel Warning: No hyphenation patterns were preloaded for
(babel)                the language `Russian' into the format.
(babel)                Please, configure your TeX system to add them and
(babel)                rebuild the format. Now I will use the patterns
(babel)                preloaded for english instead on input line 26.

)) (./ruhyphen.aux) [1] (./ruhyphen.aux) )
Output written on ruhyphen.dvi (1 page, 232 bytes).
Transcript written on ruhyphen.log.

安装的软件包:

texlive-babel-russian-svn39784-22.fc25.1.noarch
texlive-hyphen-russian-svn40340-22.fc25.1.noarch
texlive-lshort-russian-doc-svn18906.0-22.fc25.1.noarch
texlive-ruhyphen-svn21081.1.6-22.fc25.1.noarch

安装完这些后,我运行 fmtutil-sys --all。输出表明连字符文件已被处理:

...
Preloading the plain format: codes, registers, parameters, fonts, more fonts,
macros, math definitions, output routines, hyphenation
(/usr/share/texlive/texmf-dist/tex/generic/hyphen/hyphen.tex
...
(/usr/share/texlive/texmf-dist/tex/generic/hyphen/hyphen.tex)
(/usr/share/texlive/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyph-ru.tex
UTF-8 Russian hyphenation patterns
(/usr/share/texlive/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyph-ru.tex))
...

在线程中未预加载连字模式Lerenn 写道,Fedora 的问题可能是 /usr/share/texlive/texmf-dist/tex/generic/hyph-utf8/loadhyph 目录不标准,并且包括

\usepackage{hyphsubst}

解决了他的问题。对我来说,这并没有改变任何事情。

欢迎提供任何帮助。谢谢,Igor

答案1

感谢 David 的评论,问题已解决。在 F25 中,有 2 个 language.dat 文件:

/etc/texlive/tex/generic/config/language.dat

/usr/share/texlive/texmf-dist/tex/generic/config/language.dat

前者不包含俄语线路。后者包含:

russian loadhyph-ru.tex

按照 /etc/.../language.dat 文件中的英语模式,我在其中添加了以下几行

russian ruhyphen.tex
=userussian

之后,我运行“fmtutil-sys --all”。这成功了!babel 告诉我,已为 12 种语言加载了连字模式,并且没有对俄语发出抱怨。所以这一定是 F25 texlive 打包中的一个错误。安装俄语组件应该会更新 /etc/.../language.dat 文件,但事实并非如此。该文件的标题显示“请勿手动编辑,该文件由 tlmgr 生成”。但 tlmgr 被排除在 F25 texlive 包之外,并且在任何存储库中都不可用。原因是 Fedora 不希望在官方包管理器 dnf 之外维护任何包(这是合理的)。如果他们能正确打包就好了……无论如何,这个问题可以解决了。非常感谢大家。

相关内容