Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Estonia babel won't compile due to missing headtoname #294

Closed
leomayer opened this issue Apr 22, 2024 · 2 comments
Closed

Estonia babel won't compile due to missing headtoname #294

leomayer opened this issue Apr 22, 2024 · 2 comments
Labels
🐞 bug Something isn't working

Comments

@leomayer
Copy link

I tried to compile

\documentclass[a4paper,11pt,estonian]{article}
%\documentclass[a4paper,11pt,british]{article}
\usepackage[margin=2.5cm]{geometry} % for margins on a A4paper
\usepackage[tracking=true,factor=1100,stretch=10,shrink=10,final]{microtype} % have some better layout of individual chars
\usepackage[shorthands=off]{babel}
\directlua{luaotfload.add_fallback("fntFallback",{
    "DejaVu Sans:mode=harf",
    "NotoColorEmoji:mode=harf"})}
\babelfont{rm}%
[RawFeature={fallback=fntFallback},SmallCapsFont={TeX Gyre Termes},SmallCapsFeatures={Letters=SmallCaps}% fonts for small caps
]{Liberation Sans}% Ligatures=TeX ist set automatically (used to have the automatics ligatures of TeX)
\usepackage{hyphenat} % allows hyphenation of compound words like 'Test- und Produktivszenarien' (see source code)

\def\linkText#1{\xscan#1\relax}% calls xscan which looks ahead one token, #1
\def\xscan{\afterassignment\xxscan\let\token= }% assign single token to \token and call \xxscan
\def\xxscan{%
    \ifx\token\relax\else%test for end-of-line or end of group and switch to ttfamily
    \ifcat\token\space%
    \token% token is catcode 10
    \spaceskip=.5em% remove glue from space for fixed-width space
    \xspaceskip=.5em% remove glue from space for fixed-width space
    \else%
    \token\hskip 0pt plus 1sp minus 1sp % add glue to any non-catcode 10 (space)
    \fi
    \spaceskip=0pt% reset space skip
    \expandafter\xscan% feed next token to \xscan, which is effectively a recursive call
    \fi} 


\usepackage[pdfa, unicode]{hyperref}
\begin{document}
\section{test}
Kant ipsum test 1 (\hyperlink{l4194-c8833}{\linkText{AA 27-10-2023}}). 

\begin{itemize}
\item 
{\hypertarget{l4194-c8833}{}}XX - 
{\selectlanguage{naustrian}Test für Österreich}
(27-10-2023): 

\end{itemize}
\end{document}

(see as Stackblitz). As Ulrike Fischer analyzed the compilation fails due to missing content in the definiton of headtoname.

Changing it to \def\headtoname{Kell}% solves the issue - although I'm not pretty sure if this translation is accurate. At least this works.

@u-fischer
Copy link
Member

A shorter example is

\documentclass{article}
\usepackage[estonian]{babel}
%\addto\captionsestonian{\def\headtoname{Kell}}
\begin{document}

\selectlanguage{naustrian}Test 

\end{document}

which errors at the second compilation.

@jbezos jbezos added the 🐞 bug Something isn't working label Apr 22, 2024
@jbezos
Copy link
Contributor

jbezos commented Apr 22, 2024

A wrong test. I’ll fix it in the next release.

@jbezos jbezos closed this as completed in d4d5582 Apr 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants