diff --git a/songbook_core/plastex_chord.py b/songbook_core/plastex_chord.py index 937e6ff0..6b213335 100644 --- a/songbook_core/plastex_chord.py +++ b/songbook_core/plastex_chord.py @@ -33,8 +33,11 @@ def wrap_displaymath(cls): """Wrapper to invoke() to update global variable IN_VERSE.""" global IN_VERSE if self.macroMode == Macro.MODE_BEGIN: + self.ownerDocument.context.push() + self.ownerDocument.context.catcode("\n", 13) IN_VERSE += 1 else: + self.ownerDocument.context.pop() IN_VERSE -= 1 super(WrappedClass, self).invoke(tex) return WrappedClass