Closed skurzinz closed 4 months ago
There is no officially supported way currently. In fact, \languageshorthands
is defined in babelsh.def
, so it is probably just a matter of sitting down and trying to get it to work in the context of polyglossia
.
It is possible to do it generally with some more clumsy definition, e.g. for the above:
% !TeX TS-program = xelatex
\documentclass{article}
\usepackage{polyglossia}
\setmainlanguage{english}
\setotherlanguage{german}
\makeatletter
\addto\blockextras@english{\german@shorthands}
\addto\inlineextras@english{\german@shorthands}
\addto\noextras@english{\nogerman@shorthands}
\makeatother
\begin{document}
Test test"=test
\end{document}
The next release will introduce a dedicated macro \inheritbabelshorthands{<source language>}{<target language>}
for the purpose described here.
FWIW I have also added a companion command \usebabelshorthands{<language>}
that allows to activate the shorthands of a loaded language inline (or deactivate shorthands via \usebabelshorthands{none}
). This more or less mimics what \languageshorthands
does in babel
.
Edit: \startbabelshorthands
has been renamed to \usebabelshorthands
Babel offers a nifty feature that allows one to use shorthands defined for other languages, such as
\addto\extrasenglish{\languageshorthands{ngerman}}%a babel feature as described in babel.pdf page 14.
Is it possible to provide something similar to polyglossia?