# How can I fold sections containing include commands in TeXMaker?

I have used Emacs to edit my .tex files and I got used to the fold/unfold option. I am back to TeXMaker for some time and I would like to also fold/unfold sections, subsections and so on. This can be accomplished for the sections using the '-' appearing in the side bar when the pointer is in the line of the \section command. But this does not work with the subsection or (most importantly) with the sections containing an \include command.

Do you have a solution for that? How can I fold/unfold any sections or subsections in TeXMaker?

Bonus: Does a shortcut exist for that?

• i'm not a texmaker user, so i can't address the folding issue. but i think you'd be better off using \input instead of \include. \include is usually used at the chapter level or above, since it always starts a new page. – barbara beeton Dec 3 '13 at 21:56
• @barbarabeeton Actually the use of \include I have does not start a new page... I only use it to include .tex files containing tikz pictures created with matlab2tikz. – Ludovic C. Dec 3 '13 at 22:00
• okay. i made an assumption that the \include you mentioned was the "standard" one, but clearly it's not. thanks for the clarification. – barbara beeton Dec 3 '13 at 22:03
• You don't have code folding feature for \include it's only available for \part, \chapter, \section,.., \begin{foo} \end{foo}. Place a feature request with clear demo at issue tracker. Off-topic: Use \usetikzlibrary{external} and \tikzsetnextfilename{figure-name} as shown in howtotex.com/tips-tricks/… to speedup tikzpic compilation for second run and navigate via Structure Menu left pane of editor or fold at \begin{figure}. – texenthusiast Dec 4 '13 at 14:52
• @texenthusiast Ok! Thanks for the links. I will post a feature request as soon as possible and learn how to speed up tikz pictures compilation (which can sometimes b really painful!) – Ludovic C. Dec 4 '13 at 14:56

In Texmaker, there is no code folding feature for \include it's only available for \part, \chapter, \section,.., \begin{foo} \end{foo}. Place a feature request with clear demo at issue tracker.
Note: Use \usetikzlibrary{external} and \tikzsetnextfilename{figure-name} as shown in http://www.howtotex.com/tips-tricks/faster-latex-part-ii-external-tikz-library/ to speedup tikz pictures compilation for second run and navigate via Structure Menu left pane of editor or fold at \begin{figure}.