The following code results in the 'j' being too far away from the parenthesis:

\documentclass[a4paper, 12pt]{article}



\setmainfont{STIX Two Text}


\date{Typeset on \today}



$$ D_{v_p} = \p{ {\widehat e}_i }_{j} $$


Upon commenting the STIX-related code, the problem seems to disappear. Replacing it with \usepackage{unicode-math} produces the same artifact.

What is wrong?

  • What's your use case for wanting to using \left( and \right)? to encase \hat{e}_i (or \widehat{e}_i)? Put differently, why not write (\widehat{e}_i)_j or, if you prefer, {(\widehat{e}_i)}_j-- and obtain nicely spaced subscripts? – Mico Jan 30 at 12:00
  • @Mico, this does not seem like an extremely general solution. – Mike Land Jan 30 at 12:10
  • "Extremely general solutions" are usually not optimal solutions. Hence my question: What's your use case for deliberately generating parentheses that can be much too large for the job and can generate all kinds of odd, but utterly avoidable, follow-up problems? – Mico Jan 30 at 12:29
  • @Mico, I hoped there is a simpler way. – Mike Land Jan 30 at 12:59
  • @MikeLand You triggered a LuaTeX bug here, but that only applies to legacy math fonts, so it does not happen with unicode-math. So it's impossible to say why your attempt with unicode-math didn't work without seeing the code. Currently the unicode-math tag and title are a bit misleading since the question is mostly about what happens with legacy math. – Marcel Krüger Jan 30 at 13:39

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.