Equation labels in the .tex document are \label{eq:3}, e.g., which is (7) on the output pdf-document (say); \eqref{eq:3} references this equation.

Typing <C-x-o> at point (| in the following block), Vim offers both references for completion in this dropdown:

       eq:1      Equation (1) [p.2]
       eq:3      Equation (7) [p.3]

What are possible settings to achieve similar integrated completion experience in Emacs?

  • 1
    Look into reftex which is builtin and does this sort of thing. Commented Jan 27 at 10:54
  • Hmm: reftex works, but offers only the labels as eq:1, but not the equation numbers (1). What am I missing here? Commented Jan 27 at 11:20
  • It offers the labels and context which, IMO, is easier to understand than the rendered equation number (which may change has you add more equations). Sorry if that is not what you wanted. Commented Jan 27 at 13:42

2 Answers 2


This is a capability of the LSP server. With TexLab, it can look like this: enter image description here

You need to install a LSP server and activate it within Emacs, I did M-x eglot RET and took texlab.

  • Wow, excellent, exactly what I wanted to have, thank you. Commented Jan 28 at 8:57
  • 1
    @AloisPichler - You're welcome. The usual practice is to mark the answer as accepted in order to make the question disappear from the unanswered questions bucket. Commented Jan 28 at 12:09
  • 1
    Yes, if the answer is satisfactory, the best way to thank the person who answered it is to accept the answer. That also helps future visitors (maybe even you) determine that a question they might have has already a satisfactory answer. Accepting it is the more important task for you (only you can do it), but you (and anybody else) can also vote up the answer if you (they) think it is helpful.
    – NickD
    Commented Feb 2 at 19:44

The following solution is perhaps less elegant than that in the LSP-based answer, but I figured it wouldn't hurt to share. It looks like this:

my cool picture

You can search by label or equation number (as it appears in the PDF), with a live preview.

If you're interested, this setup is achieved by installing the packages czm-preview, czm-tex-fold, czm-tex-ref, czm-tex-compile and their common dependency czm-tex-util (or see my config for an overkill "one-step" setup).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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