Using TeXstudio
's GUI, I would like to collapse the calls of \usepackage{}
similar to what can be done for a \paragraph{}
, a \section{}
etc. The fact that some code can be collapsed in the GUI is identified with a little arrow pointing downward (if expanded) or to the right (if collapsed) next to the first line of code that can be collapsed (see below).
I've tried using
\documentclass[a4paper,12pt]{article}
{ % this allows collapsing in the GUI (1/2)
\usepackage{color}
} % this allows collapsing in the GUI (2/2)
\begin{document}
text
\end{document}
which allows me to collapse the \usepackage{}
calls but doesn't compile.
In short: I want code that compiles and allows me to collapse the code like show in the picture below (as identified by the gray arrow in line 4
). So far, I can either get the code to compile (not using the {
}
around the \usepackage
) or I am able to collapse the calls in the GUI.
Does anyone have a solution or idea?
\usepackage
s in a separate file (say,mypackages.sty
) and then load them with\usepackage{mypackages}
.\usepackage
calls into a different file?