9

I'm trying to typeset multiline numbered examples with John Frampton's expex package (version 4.1). Since I'm using XeLaTeX (TeXLive 2012), I've picked unicode-math to typeset maths. The following MWE illustrates the problem, which is that the first and second lines of the multiline example are no longer separated properly:

\documentclass{article}

\usepackage{fontspec}
\usepackage{unicode-math}
\usepackage{expex}

\setmathfont{Latin Modern Math}

\begin{document}

\ex 
\begingl
\gla See on lühike tekst {eesti keeles}.//
\glb This is short text {in Estonian}//
\glft `This is a short text in Estonian.'//
\endgl
\xe

\end{document}

The only warning I get is the innocuous xparse/redefine-command warning, and once I remove unicode-math, the output looks as desired. What's going on here and is there a solution? I should probably add that the same behaviour is observed when I compile with LuaLaTeX.

7

The unicode-math package defines a \gla command for a (quite rare) character.

You can do it with the following trick:

\documentclass{article}

\usepackage{fontspec}
\usepackage{unicode-math}
\setmathfont{Latin Modern Math}

\usepackage{expex}
\let\expexgla\gla
\AtBeginDocument{\let\gla\expexgla}

\begin{document}

\ex
\begingl
\gla See on lühike tekst {eesti keeles}.//
\glb This is short text {in Estonian}//
\glft `This is a short text in Estonian.'//
\endgl
\xe

\end{document}

The definitions of unicode-math happen at begin document, so you need to redefine \gla to the saved version after that.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.