I want to hide a very long LaTeX input text in one passage. If I use % for every line I need too much time to hide all the lines. Is there a command that can hide the text in one single passage?

  • I think you are looking for package comment?
    – Johannes_B
    Commented May 17, 2015 at 12:50

1 Answer 1


Some editors have a shortcut for inserting a % in every line of a marked text part. Apart from specific packages you could just define a simple command that throws away its argument (doesn't use it for something), like the following:


You can then insert it at the beginning of your text passage and add the closing bracket at the end.

   Text ...
  • Perfect! There are some possibilities that the latex input become gray also? Like when I use % ?
    – Andrea Leo
    Commented May 17, 2015 at 13:25
  • 1
    Since this is an editor specific highlighting feature: no. At least not if you are using this solution. If you use the shortcut (Ctrl+T in TeXmaker & TeXstudio) then every line will be gray with a leading % sign. Commented May 17, 2015 at 14:08
  • Teah! '' Ctrl+T '' is the solution. Thank you :*
    – Andrea Leo
    Commented May 17, 2015 at 18:59
  • FIY Ctrl+U should uncomment a marked part Commented May 17, 2015 at 19:11

You must log in to answer this question.

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