# Subscript/superscript without using math mode or TeX code box, in LyX?

Is it possible to use subscript and superscript in LyX without entering into math mode or inserting TeX code? For example, can I get H2O to be displayed properly without `\ce{H_{2}O}` or Tex code box with `\textsuperscript{th}` etc.?

• `H\textsubscript{2}O`, but I'm not sure it's easier than `\ce{H2O}` – egreg Dec 2 '15 at 17:06
• @egreg `H\textsubscript{2}O` gives "Undefined control sequence". (and I updated the question in the context of LyX) – Sparkler Dec 2 '15 at 17:09
• @Sparkler it would be defined with a current version of latex (or use fixltx2e.sty for older releases) – David Carlisle Dec 2 '15 at 17:12
• My answer to this would be "No", and that makes this a feature request on the LyX side, and not (La)TeX-related. – Werner Dec 2 '15 at 17:31
• @Sparkler: A wysiwyg wrapper... like ERT. – Werner Dec 2 '15 at 17:36

You can assign this operation to a key shortcut such as [Ctrl]+[,] using `script-insert subscript` (see also: lyx shortcut for superscript and subscript).