0

I am using a custom math font using the \setmathfont command from unicode-math. However the exponents don't render properly and are set too low. To adjust this I am using the following:

\AtBeginDocument{
 \setbox0=\hbox{
  \check@mathfonts{
   \fontdimen16\textfont2=2.5pt
   \fontdimen17\textfont2=2.5pt
   \fontdimen14\textfont2=4.5pt
   \fontdimen13\textfont2=4.5pt
  }
 }
}

However this is giving me a ton of errors such as Extra }, or forgotten $. and Improper \prevdepth. on my title page. Everything seem to render fine in the PDF but I got 6 additional annoying errors. Is there a way to fix these? I am using overleaf.

Thanks in advance.

3
  • 1
    My crystal ball says that you forgot the \makeatletter before the \AtBeginDocument. And next time show a small but complete example, then one doesn't have to guess. Mar 7, 2022 at 13:36
  • \makeatletter seems to have fixed it... Thanks a lot!! I am quite new to using TeX and I read elsewhere on this StackExchange the same complaint to include a whole compilable example and thought of sharing my whole Overleaf project instead? The preamble is really large and have many commercial font files included so I was hesitant to do so, and trying to replicate the error in a shorter format here felt futile for what I thought was an easy question. I'll try harder in the future. Thanks again!
    – qat
    Mar 7, 2022 at 13:47
  • No you should not share an overleaf project. Such links will be dead over time and make your question useless for other people. I at least won't follow such links. Provide a small and complete example here. Mar 7, 2022 at 15:11

0

You must log in to answer this question.

Browse other questions tagged .