I am new user of auctex/reftex and the reftex-toc-function is brilliant. However, on my small screen a lot of space is wasted when I have a document with only chapters, or even sections. (I put the toc on the left side of my 11-inch screen.)

Parts are indented with one leading space, chapters with three, sections with five. Is it possible to remove/hide the extraneous indentation when it is not needed?


TABLE-OF-CONTENTS on ~/test.tex
SPC=view TAB=goto RET=goto+hide [q]uit [r]escan [l]abels [f]ollow [x]r [?]Help
 Part I Part level
    1 Chapter level
      1.1 Section Level

Document with no parts or chapters:

      1 This document has only sections
      2 Like this
      3 And this

1 Answer 1


The indentation is set by variable reftex-level-indent. Its default value is 2, that is why indentation is 1,3,5 etc.

-- User Option: reftex-level-indent

Number of spaces to be used for indentation per section level.

You may simply set it to 0.

This way, all levels are indented at 1, I don't know how to get rid of the remaining initial space.

  • Great! But this removes the subsequent indentation? Well. I guess setting it to 1 is a good compromise. Would be nice to get rid of the initial space though.
    – trmdttr
    Commented Aug 19, 2016 at 13:30

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.