Are there any LaTeX editors for Linux (or any other platform, for that matter) that are able to collapse or otherwise remove footnotes and footnote citations from the text? I often have long footnotes or references with prenotes, which are very ugly and cumbersome when trying to write an essay. LaTeX is supposed to be about focussing on content rather than formatting, but with footnotes, this principle is reversed: footnotes obstruct the content of my writing because they are supposed to be out of the way.

An obvious solution would be to have an option to hide/show particular arguments (i.e. \footnote{}) from the text editor. Has anyone implemented something like this? If not, I'm surprised given how obviously useful it is.

This question is similar, but there is no solution to it.

This question proposes separating footnotes from the main text using comments so that it is clear where the main text is interrupted and resumes, but this is a rather inelegant solution.

  • 4
    Emacs with AucTeX seems to be able to do this: gnu.org/software/auctex/manual/auctex/Folding.html (I've never used this feature, so I can't really write a complete answer at the moment, hence posting as a comment. If anyone else wants to write an AucTeX-based answer, please do.) Sep 7, 2015 at 10:30
  • This looks like exactly what I need, thanks!
    – DavidR
    Sep 7, 2015 at 10:36
  • 1
    In Kile, you can fold anything by putting % BEGIN at the start and % END at the end. But that is not automatic.(But you could script it or use a shortcut. In theory you could configure completion somehow, I think, but this feature doesn't work properly and is actually less functional now than it used to be.)
    – cfr
    Sep 7, 2015 at 11:07
  • @cfr do you think it would be possible to have it automatically insert these tags before and after? Kile seems like a simpler set up than emacs/aucstex, so that would be great. Could a script potentially do that? I'd be willing to put some time into it, but it would be nice to know my rough chances of success (from someone who know more than me about it) before doing so!
    – DavidR
    Sep 7, 2015 at 11:13
  • @DavidRowthorn I'm not really sure. I keep meaning to figure out if I could configure Kile better and never quite getting around to it because it works 'well enough' most of the time. You can certainly set up a 'snippet' and associate a keyboard short cut with it. I have done this (not for footnotes) and this is pretty easy and works well. I use it for inserting curly quotation marks which I can't easily type. This works a bit like TeXShop's macros, if you have ever used those. (Obviously a very unhelpful comment if not but that's the only other editor I've really used.)
    – cfr
    Sep 7, 2015 at 11:20

2 Answers 2


As Torbjørn T. noted in comments, of course AUCTeX is able to collapse any macro, whatever the length of its arguments (actually fold is the term used in Emacs/AUCTeX' jargon). Just type C-C C-o C-f (to activate TeX-fold-mode, you have to do this just once. Manual explains how to activate this mode by default when opening a file) and C-c C-o C-b to completely fold current file (C-LETTER represents in Emacs' terminology the shortcut Control-LETTER). Here is an example:

enter image description here

See also the following example taken from https://gnu.org/software/auctex/screenshots.html Note \section{...} replace by section title at the beginning and \item replaced by * in enumerate environment.

enter image description here

  • Having now familiarised myself with Emacs, I can safely say that it does exactly what I intended in the question. I would like to add to this answer this website that details a way of automatically folding footnotes (otherwise a command has to be issued in Emacs to fold all footnotes).
    – DavidR
    Sep 15, 2015 at 14:57

In TeXstudio you can collapse any arguments of macros that need more than two lines. Furthermore you can collapse complete sections and environment content for example:

collapsed code


Text in

My Text%
is nice!

I like to set footnotes in an own (indented) line; in that case the preceding line must end with % to prevent a space between the word and the footnote number.

  • So the footnote can be reduced to a single line in other words? Definitely better than a long interruption, although not sure it's as good as the AUCTex solution.
    – DavidR
    Sep 9, 2015 at 8:41
  • Jep, the footnote (like any other argument of any other macro) can be collapsed to a single line.
    – Tobi
    Sep 9, 2015 at 10:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .