1

Now I'm seriously puzzled. Here's the MWE (using xelatex).

\documentclass{article}

\usepackage{xparse}
\NewDocumentCommand{\li}{v}{\texttt{#1}}

\usepackage{fontspec}
\usepackage{xunicode}
\usepackage{xltxtra}
\usepackage{ucharclasses}
  \setTransitionsFor{GreekAndCoptic}{\begingroup\fontspec[Scale=.85]{DejaVu Sans}}{\endgroup}
  \setTransitionsFor{CombiningDiacriticalMarksforSymbols}{\begingroup\fontspec{DejaVu Sans}}{\endgroup}

\begin{document}
  \li+κ⃗+
\end{document}

I believe the title says it all. I'm getting:

! Extra }, or forgotten \endgroup.
<recently read> \egroup 

l.16   \li+κ⃗+

? 

Things work fine if I write either κ⃗, i.e. without the call to \li, or if I write \li+k⃗+, i.e. without the greek κ but with a roman k instead.

It's not that it's blocking me or anything (I switched to k instead of κ for my variable), but I'm just very, very curious as to why this is happening!

  • Do you have any problems if you change the definition of \li to not use verbose arguments? – Sean Allred May 5 '14 at 13:50
  • Nothing really to do with xparse: if you try your setup with just κ⃗ in the input stream you'll see there is a warning in the log that a group has not been closed. – Joseph Wright May 5 '14 at 13:55
  • Correct. I just hadn't noticed the error until I wrapped the thing in xparse. That still leaves open the question of why the \begingroup and \endgroup commands are not well-parenthesized. – Jonathan Protzenko May 5 '14 at 14:59

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.