slavonic / cu-tex

Church Slavonic support for TeX and derivatives
MIT License
4 stars 2 forks source link

Errors at gloss-churchslavonic.ldf #71

Open EliseyP opened 2 months ago

EliseyP commented 2 months ago

After TexLive update (onLinux Debian 12) I get errors on sample.tex compilation.

Log:

This is XeTeX, Version 3.141592653-2.6-0.999996 (TeX Live 2024) (preloaded format=xelatex 2024.7.23)  23 JUL 2024 13:17
entering extended mode
 restricted \write18 enabled.
 %&-line parsing enabled.
**sample.tex
(./sample.tex
LaTeX2e <2024-06-01> patch level 2
L3 programming layer <2024-05-27>

<skipped>

(/home/user/texlive/2024/texmf-dist/tex/latex/polyglossia/gloss-latex.ldf
File: gloss-latex.ldf polyglossia: module for default language
))
(/home/user/texlive/2024/texmf-dist/tex/latex/churchslavonic/gloss-churchslavon
ic.ldf
File: gloss-churchslavonic.ldf polyglossia: module for Church Slavonic

! Undefined control sequence.
l.14 \define@key
                {churchslavonic}{spelling}[modern]{%
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! LaTeX Error: Missing \begin{document}.

and several similar errors:

! Undefined control sequence.
l.29 \define@boolkey
                    {churchslavonic}[churchslavonic@]{babelshorthands}[false]{}

! Undefined control sequence.
l.31 \setkeys
             {churchslavonic}{spelling,numerals}

fmtutil-sys --byfmt xelatex - without errors.

typiconman commented 2 months ago

@pgmmpk please take a look at this.

Sovok-r commented 2 months ago

Это связано с обновлением пакета polyglossia до версии 2 и выше. Решил проблему откатом до найденной в архиве интернета старой версии polyglossia. Из приятного бонуса: знаки переноса стали аутентичными. Работаю в MikTex. This is due to updating the polyglossia package to version 2 and higher. I solved the problem by rolling back to the old version of polyglossia found in the Internet archive. As a pleasant bonus: the hyphenation signs have become authentic. Work in MikTex. https://web.archive.org/web/20220303223942/https://ctan.math.illinois.edu/install/macros/unicodetex/latex/polyglossia.tds.zip

typiconman commented 2 months ago

Понятно, спасибо. @pgmmpk можно ли привести наш пакет в соответствие с polyglossia 2?

EliseyP commented 2 months ago

На всякий случай - похоже, что для TexLive откат на старую версию polyglossia не всегда помогает. Вышеприведенный пример (sample.tex) компилируется, но более сложный выдает ошибки, например:

(/home/user/texlive/2024/texmf-dist/tex/latex/polyglossia/xgreek-fixes.def)
Package polyglossia Info: Option: Monotonic Greek.

! LaTeX Error: Variable \xpg@alias@keyvals@greek@mono undefined.
Sovok-r commented 2 months ago

This is XeTeX

попробуйте компилировать в lualatex

EliseyP commented 2 months ago

При использовании LuaLaTeX ошибки есть и при компиляции вышеуказанного примера (sample.tex). Возможно, это дистрибутивные проблемы (MikTeX/TexLive). Подождем обновления cu-tex.

This is LuaHBTeX, Version 1.18.0 (TeX Live 2024)  (format=lualatex 2024.7.23)  27 JUL 2024 08:40
 restricted system commands enabled.
**sample.tex
(./sample.tex
LaTeX2e <2024-06-01> patch level 2
L3 programming layer <2024-05-27>

<SKIPPED>

{/home/user/texlive/2024/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]
! error:  (linebreak): invalid node with type whatsit and subtype 16 found in di
scretionary
!  ==> Fatal error occurred, no output PDF file produced!
pgmmpk commented 2 months ago

Can not reproduce the reported error.

My setup: Ubuntu Oracular, the latest TeX Live:

$ apt upgrade texlive
texlive is already the newest version (2024.20240706-1).

XeTeX log compiling sample.tex: sample.log

LuaLatex crashes though, but this is likely not our problem.

pgmmpk commented 2 months ago

Beautiful result, btw sample.pdf

EliseyP commented 2 months ago

One small difference: pgmmpk's sample.log:27
Package: polyglossia 2024/03/07 v2.1

my sample.log:27
Package: polyglossia 2024/07/15 v2.2

Maybe you will get this problems in the future?

I install/update my TeXLive separatelly from distro (from iso), and update by tlmgr.

pgmmpk commented 2 months ago

Confirm that when using v2.2 polyglossia we het the reported error.

Here is what happened:

churchslavonic polyglossia extensions implicitly rely on the xkeyval package. This package was loaded by polyglossia. However, v2.2 of polyglossia no longer uses xkeyval, and switched to a modern equivalent -- l3keys. Without xkeyval package churchslavonic and it polyglossia extensions will fail.

To workaround the issue, just add

\usepackage{xkeyval}

somewhere before polyglossia and churchslavonic.

Hope this addresses the immediate issue.

For the next CTAN release we need to update churchslavonic and its polyglossia extension. We have 2 options there:

  1. Make sure that churchslavonic loads xkeyval, OR
  2. Rewrite to use l3keys
typiconman commented 2 months ago

Probably it's better to switch to l3keys, since it is a "modern equivalent"?

pgmmpk commented 2 months ago

The problem is that l3keys documentation is very hard to find... Practically, I'll have to grep CTAN packages (like polyglossia) to find usage examples :/ .

But yes, switching to l3keys seems like the right way, albeit harder.

We should fix this before the next texlive release.

<rant> TeX feels like a dying ecosystem. Releases are rare (yearly) and very manual. Distribution size is enormous (2G?). XeTeX and LuaTeX become less and less compatible. A lot of obsolete and broken packages in CTAN. Community is large, but seem to be split between few "gurus" that know everything, and "commoners" who just want to typeset their document. As gurus start to retire, I expect a lot of maintenance problems...

Personally, I am using weasyprint lately (html-to-pdf typesetter), instead of TeX monstrosity... </rant>

typiconman commented 2 months ago

Yes, supporting a separate package of fonts that is several years out of date is also quite annoying.

But TeX is still the main tool for many things, such as scholarly critical editions. Don't know about weasyprint ... does it have Slavonic support?

EliseyP commented 2 months ago

Отвлеченное наблюдение. М.б. попробовать обобщить опыт практического использования набора текстов с помощью данных шрифтов. Выделить критические элементы набора (например переносы, буквицы, приводка). И подобрать относительно универсальный способ получения PDF, адекватно отражающий типографские задачи для набора церковно-славянских текстов.

К примеру, для набора исходного текста я использую LibreOfice. В нем есть практически все необходимые элементы для типографики. В первом приближении использую конвертацию в PDF средством самого LibreOffice (доступно из командной строки). Однако полученный PDF далек от совершенства в плане разбивки абзацев. И для получения более качественной разбивки конвертирую ODT файл в TeX и далее компилирую в PDF. По пути можно уже доводить разбивку и прочие тонкости в TeX файле.

typiconman commented 2 months ago

Да, я думал записать серию видео на Ютубе о том, как работать с текстами, от установки шрифтов до верстки в Индизайне или TeX. Но все руки не доходят.

jspitz commented 1 month ago

The problem is that l3keys documentation is very hard to find... Practically, I'll have to grep CTAN packages (like polyglossia) to find usage examples :/ .

But yes, switching to l3keys seems like the right way, albeit harder.

It's not that hard, really. I have opened a pull request that gets churchslavonic back into polyglossia's infrastructure.