Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

up vote 6 down vote accepted

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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