1

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.?

  • 1
    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
  • 2
    @Sparkler: A wysiwyg wrapper... like ERT. – Werner Dec 2 '15 at 17:36
6

Type 'H', then Insert > Formatting > Subscript, then press the right arrow (this gets you out of the subscript), then type '0'.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.