Does anyone know how to make a subscript on the left hand side in LyX in a formula?


In LaTeX, without using any additional package, you could use

${}_x F_x$

to write xFx. Using this as the baseline approach, inside a math formula, insert a subscript to "nothing", followed by the "middle symbol", followed by another subscript.

enter image description here

| improve this answer | |
  • This is not very good, since if you have something before the first "_{x}", e.g. A _{x}F_{x} then it would be typeset as if you have a subscript for A – Ur Ya'ar May 22 '18 at 11:54
  • @UrYa'ar: There are ways around that. Do you have any suggestions? Perhaps not using LyX? ;) – Werner May 22 '18 at 19:22
  • 1
    One way it to put a {} before. Another is to implement \prescript in a macro, I gave a detailed answer below. – Ur Ya'ar Jul 12 '18 at 8:32

The mathtools package defines \prescripts which is supposed to give the right spacing for left super/sub-scripts.The syntax of the command is \prescript{<sup>}{<sub>}{<arg>}. To implement it in LyX one should define a macro as follows: enter image description here To get it, on the "TeX" box you write the following string (don't copy-paste as it won't work. While typing the script LyX will change e.g. \{ into the correct form of {})

 \prescript\{\#1 \{\#2 \{\#3

and in order for it to preview nicely, write in the "LyX" box

^\#1 _\#2 \#3

of course you can skip either the sup or sub script argument, but you still need to have an empty '{}' for it, e.g

enter image description here

Note that if you get a compilation error you need to tell LyX to load mathtools via Document->Settings->Math options.

| improve this answer | |

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.