2

I'm trying to type the following latex in nvim:

f_{high}=\{1209,1336,1477,1633\}Hz.

For some reason, nvim is rendering this as:

fₕᵢgₕ= \{ 1209, 1336, 1477, 1633\}\si{Hz}

How do I fix this?

  • Could you clarify which aspect you're not expecting? If you don't like the human-readability aspect caused by conceal, then this is a duplicate of the question linked by Hotschke. If it's the unsubscripted g, then perhaps this should stay open. – ZeroKnight Apr 8 at 21:24
  • It's the multiple letters that havent been subscripted properly. This renders it virtually unreadable. – Persistence Apr 9 at 12:59
4

The problem is that the subscript for g doesn't exist, and those for h and i look "off."

As noted, you can either

  • turn off the conceal feature altogether (set conceallevel=0)
  • turn off conceal in tex files just for these kinds of things (let g:tex_conceal = 'abdmg')—see :help g:tex_conceal
| improve this answer | |
1

Do you by any chance have the plugin KeitaNakamura/tex-conceal.vim installed? Try putting the following in .vimrc:

set conceallevel=0
let g:tex_conceal='abdgm'

I hope this solves your problem.

| improve this answer | |
  • 2
    I think even with just the default latex ftplugin this can happen. – D. Ben Knoble Apr 5 at 19:03
  • As is, this will disable conceal globally, which is probably not desirable. Going this way, a better approach would be to create either a filetype autocommand or filetype plugin (e.g. ~/.vim/ftplugin/tex.vim) and use setlocal conceallevel=0 instead. – ZeroKnight Apr 8 at 21:22

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