2

This deals with the solution by egreg to fix the hole in the arrows, when we use lualatex and french spacings through polyglossia Polyglossia and hookrightarrow

You can see that, once that the arrow is introduced, there is no space before the semicolon as well as the guillemets, both before and after the arrow and that it goes on the next lines in the doc. How to get it back ?

\documentclass{article}
\usepackage{fontspec}
\usepackage{polyglossia}
\setmainlanguage{french}
\newcommand{\fff}{f; f ;«f» « f »; $\epsilon$;}
\ifluatex
\makeatletter
\let\latex@lhook\lhook
\renewrobustcmd{\lhook}{%
\mathrel{\mathpalette\do@lhook\relax}%
}
\newcommand{\do@lhook}[2]{%
\hbox{\directlua{polyglossia.desactivate_frpt()}$\m@th#1\latex@lhook$}%
}
\let\latex@rightarrow\rightarrow
\renewrobustcmd{\rightarrow}{%
\mathrel{\mathpalette\do@rightarrow\relax}%
}
\newcommand{\do@rightarrow}[2]{%
\hbox{\directlua{polyglossia.desactivate_frpt()}$\m@th#1\latex@rightarrow$}%
}
\makeatother
\fi
\begin{document}
\fff

\fff
AAA $\hookrightarrow$ \fff.\\
AAA \fff BBBB.
\showoutput
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.