When using the mhchem package, space is needed in authoring. For example , in \ce{NO + O}, the space before plus is needed so that the plus character is positioned correctly. Without that space, the plus character is positioned as a superscript for the preceding O. The issue is that a recent change (see # 2732 in the changelog) does not allow the space to be authored anymore. Currently, pressing the space keybar does not add the space in LaTeX and just exits the LaTeX mode.
Is there a workaround?
Here's a copy of the info for # 2732 in the changelog:
# 2732 Pressing the Space key in LaTeX mode now completes the LaTeX command and exits LaTeX mode, similar to pressing Enter. Previously, users typing LaTeX commands like \alpha would remain in LaTeX mode until pressing Enter, and incomplete commands would be lost when dismissing dialogs. Now pressing Space after a valid LaTeX command completes it and returns to math mode, making LaTeX input more intuitive and preventing data loss. Additionally, when typing LaTeX commands with mandatory arguments (like \frac{1}{2}), the command now auto-completes and exits LaTeX mode when the closing brace of the last mandatory argument is typed. The implementation uses the command registry to determine the exact number of mandatory arguments, ensuring correct behavior for all commands including those with nested arguments.
When using the mhchem package, space is needed in authoring. For example , in \ce{NO + O}, the space before plus is needed so that the plus character is positioned correctly. Without that space, the plus character is positioned as a superscript for the preceding O. The issue is that a recent change (see # 2732 in the changelog) does not allow the space to be authored anymore. Currently, pressing the space keybar does not add the space in LaTeX and just exits the LaTeX mode.
Is there a workaround?
Here's a copy of the info for # 2732 in the changelog:
# 2732 Pressing the Space key in LaTeX mode now completes the LaTeX command and exits LaTeX mode, similar to pressing Enter. Previously, users typing LaTeX commands like \alpha would remain in LaTeX mode until pressing Enter, and incomplete commands would be lost when dismissing dialogs. Now pressing Space after a valid LaTeX command completes it and returns to math mode, making LaTeX input more intuitive and preventing data loss. Additionally, when typing LaTeX commands with mandatory arguments (like \frac{1}{2}), the command now auto-completes and exits LaTeX mode when the closing brace of the last mandatory argument is typed. The implementation uses the command registry to determine the exact number of mandatory arguments, ensuring correct behavior for all commands including those with nested arguments.