1

Texstudio offers the handy option to wrap the code corresponding to whole sections, environments, etc.

Is there a way to the same with a documents' preamble?

I have tried embedding the whole preamble into curly braces { whole preamble }, stopping right before \begin{document}. That allows me to wrap the preamble, but it generates and error when compiling.

Also, I know I could export the preamble to another document and use \include or \input, but I am specifically looking for a solution that keeps the whole document unified, with the actual preamble at the top (but "wrappable" in the editor).

4

You can use

%BEGIN_FOLD

your preamble

%END_FOLD
  • @MartinVanderLinden You're welcome! – user36296 Sep 13 '18 at 20:53
  • May I know where I can find more of these tweaks in the manual? – Diaa Sep 14 '18 at 9:37
  • @Diaa I can't even find this one in the user guide. So I don't know if there are more of them. – user36296 Sep 14 '18 at 9:42
  • 1
    @Diaa I just asked our texstudio expert about this, please see tex.stackexchange.com/questions/450546/… for the reply. – user36296 Sep 15 '18 at 14:45
  • @samcarter many thanks for sharing this with me :) – Diaa Sep 15 '18 at 14:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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