format_sci should be responsible for adding \ensuremath, not .inline.hook.tex

same logic is used by #629