rrthomas/hpmor

nested emphs broken

entorb opened this issue · 6 comments

Test:
\emph{emph1 emph1 \emph{emph2 \emph{emph3} emph2} emph1}
Expectation:
emph1 emph1 emph2 emph3 emph2 emph1

Restult:
emph1 emph1 emph2 emph3 emph2 emph1

Oh dear, I wonder if this is why they weren't nested before.

OK, I can reproduce this.

(Sorry, closed by mistake. I will work on this when I get the time.)

I have narrowed down the cause to the font commands: if I comment out the \setmainfont command in hp-format.tex, then nested \emph works as expected. Still not sure why this should be, though…will continue to investigate.

Aha: https://tex.stackexchange.com/questions/178815/alegreya-prevents-nested-emph-commands-to-behave-as-expected

I don't have time right now but there's an explanation and fix here, and I'll apply it later.

The hack on Stack Exchange didn't work, but updating the fonts did!

Thank you very much!