0

I definitely don't understand what is happening here: (now as a complete example).

\documentclass {scrbook}
\def\DocLng{english}   % centralised location for customisation
\def\DocLngVar{british}

\usepackage {polyglossia} \setdefaultlanguage[variant=\DocLngVar]{\DocLng}

\begin {document} End of story. \end {document}

This produces a warning: Package polyglossia warning: Unknown English variant 'british' on ...

What? It knows the variant is british, but does not know it?

Setting instead \setdefaultlanguage[variant=british]{\DocLng} does not produce a warning. Thus british is not equal to british?

By the way, I know I can use Babel; on the other hand I'd like to know what is wrong here. Thanks.

wasadu
  • 51
  • 4
    You should always show complete example not snippets. That makes it much easier to test and reproduce your issue. Values are not always expanded. It depends on the concrete implementation if you can hide such things in macros or not. – Ulrike Fischer Feb 15 '22 at 11:37
  • 1
    Macros are not generally expanded when passed as values to keys. This is a case in which they indeed aren't. You see british in the warning, because TeX will expand when issuing the warning. – egreg Feb 18 '22 at 16:21

0 Answers0