MiKTeX / miktex

the MiKTeX source code
https://miktex.org
Other
781 stars 93 forks source link

No hyphenation patterns were loaded for polyglossia #1348

Open zhmylove opened 1 year ago

zhmylove commented 1 year ago

TL; DR

Solution is in the first comment.


Description Hyphenation doesn't work. All languages on the Language tab in the MiKTeX console are checked.

Debian 12.0, MiKTeX built from source of tag 23.4 and the same issue exists for MiKTeX build off branch main:

korg@ya:~/src/miktex$ git status
HEAD detached at 23.4
nothing to commit, working tree clean
korg@ya:~$ miktex --version
One MiKTeX Utility 1.7 (MiKTeX 23.4)
...
korg@ya:/tmp$ initexmf --report
ReportDate: 2023-06-28 22:13:45
CurrentVersion: 23.4
SetupDate: not yet
SetupVersion: 2.9
Configuration: Regular
GitInfo: 176302357 / 2023-04-15 13:14:34
OS: Linux 6.1.0-7-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.20-1 (2023-03-19) x86_64
SharedSetup: no
LinkTargetDirectory: /home/korg/bin
PathOkay: yes
LastUpdateCheck: 2023-06-28 21:54:27
LastUpdate: not yet
LastUpdateDb: 2023-06-28 21:54:27
SystemAdmin: no
RootPrivileges: no
AdminMode: no
Root0: /home/korg/.miktex/texmfs/config
Root1: /home/korg/.miktex/texmfs/data
Root2: /home/korg/.miktex/texmfs/install
UserInstall: /home/korg/.miktex/texmfs/install
UserConfig: /home/korg/.miktex/texmfs/config
UserData: /home/korg/.miktex/texmfs/data

Notes on MiKTeX compilation

Used these commands to compile:

 2170  mkdir miktex-build && cd miktex-build
 2171  cmake -DCMAKE_INSTALL_PREFIX=$HOME/miktex ../miktex
 2172  make -j 24
 2173  echo $?
 2174  make install
 2175  echo $?
 2176  mpm --update-db
 2177  initexmf --set-config-value [MPM]AutoInstall=1
 2178  initexmf --update-fndb
 2179  initexmf --mklinks
 2180  mpm --verbose --package-level=basic --upgrade
 2181  initexmf --mkmaps
 2182  echo $?
 2183  initexmf --update-fndb

Reproduction steps

Create sample document:

korg@ya:/tmp$ iconv -f utf8 a.tex
%!TeX encoding = UTF-8 Unicode
\documentclass[12pt]{book}

\usepackage{polyglossia}
\usepackage{fontspec}
\setdefaultlanguage{russian}

\setmainfont{FreeSerif}
\newfontfamily{\cyrillicfont}{FreeSerif}

\begin{document}
Все счастливые семьи похожи друг на друга, каждая несчастливая семья несчастлива по-своему.

Все смешалось в доме Облонских. Жена узнала, что муж был в связи с бывшею в их доме
француженкою-гувернанткой, и объявила мужу, что не может жить с ним в одном доме. Положение это
продолжалось уже третий день и мучительно чувствовалось и самими супругами, и всеми членами семьи, и
домочадцами. Все члены семьи и домочадцы чувствовали, что нет смысла в их сожительстве и что на
каждом постоялом дворе случайно сошедшиеся люди более связаны между собой, чем они, члены семьи и
домочадцы Облонских. Жена не выходила из своих комнат, мужа третий день не было дома. Дети бегали по
всему дому, как потерянные; англичанка поссорилась с экономкой и написала записку приятельнице,
прося приискать ей новое место; повар ушел вчера со двора, во время самого обеда; черная кухарка и
кучер просили расчета.
\end{document}

Build with XeLaTeX:

korg@ya:/tmp$ initexmf --dump=xelatex
korg@ya:/tmp$ echo $?
0
korg@ya:/tmp$ xelatex a.tex 2>&1 |grep -C1 Warning:

Package polyglossia Warning: No hyphenation patterns were loaded for `russian'
(polyglossia)                I will use \language=\l@nohyphenation instead on i

No hyphenation will be in resulting a.pdf: image

zhmylove commented 1 year ago

It looks like re-enabling (untick and tick back) of the language, re-installation (remove and install via miktex-console) of hyph-utf8 and initexmf --mklangs solves the issue. But I still cannot figure out, why --mklangs was removed from the help and manual page of initexmf.

edocevoli commented 1 year ago

initexmf is a deprecated utility. It still works. But the recommended method is: miktex languages configure

stale[bot] commented 9 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

zhmylove commented 9 months ago

@edocevoli is it possible to elaborate on doc update?