Backport of #8989 and #9137 squashed.

Make Latex completion work in strings.
@tkelman merge this when you find the timing is right.