josephwright / csquotes

Con­text sen­si­tive quo­ta­tion fa­cil­i­ties
LaTeX Project Public License v1.3c
28 stars 18 forks source link

Xkeyval error with russian support #43

Closed sturkopf123 closed 4 years ago

sturkopf123 commented 4 years ago

When using csquotes with polyglossia and trying to add russian as supported language like the follwoing:

\usepackage{polyglossia}
\newfontfamily\cyrillicfont[Script=Cyrillic]{CMU Serif} 
\newfontfamily\cyrillicfontsf[Script=Cyrillic]{CMU Sans Serif} 
\newfontfamily\cyrillicfonttt[Script=Cyrillic]{CMU Typewriter Text} 
\setdefaultlanguage{german}
\usepackage[autostyle=true, russian=guillments]{csquotes}
\setotherlanguages{russian, french, english}

You get the follwoing error.

Package xkeyval: russian' undefined in familiescsq'.

Dsitro: TeX Live 2019 Csquotes locale rev: 53041 (5.2j) polyglossia locale rev: 53592 (1.47)

If needed the full error message can be added, but its long...

moewew commented 4 years ago

According to Table 2 in the documentation

https://github.com/josephwright/csquotes/blob/da22a99e7c65895ee5fcd4541961fdc7b20632c5/csquotes.tex#L637-L666

Russian doesn't have a style variant. It only comes with one predefined style. It doesn't make sense to have a russian option when it can't select different variants, so it doesn't exist.

csquotes' Russian style works fine without any russian option (but of course the package only offers you that one style for Russian by default, if you want something else, you can define it with \DeclareQuoteStyle)

\documentclass{article}
\usepackage{polyglossia}
\newfontfamily\cyrillicfont[Script=Cyrillic]{CMU Serif} 
\newfontfamily\cyrillicfontsf[Script=Cyrillic]{CMU Sans Serif} 
\newfontfamily\cyrillicfonttt[Script=Cyrillic]{CMU Typewriter Text} 

\usepackage[autostyle=true]{csquotes}

\setdefaultlanguage{german}
\setotherlanguages{russian, french, english}

\begin{document}
Lorem \enquote{ipsum \enquote{dolor} sit} amet

\textrussian{Lorem \enquote{ipsum \enquote{dolor} sit} amet}

\textfrench{Lorem \enquote{ipsum \enquote{dolor} sit} amet}

\textenglish{Lorem \enquote{ipsum \enquote{dolor} sit} amet}
\end{document}
sturkopf123 commented 4 years ago

Thank you very much!