1

I have a long calculation in my document that starts and ends with several \align environments. But now, I want to make all these lines to appear as a comment since there is a possibility for them to be wrong. I know I can delete them, but I want to keep them for future reference and also I will use some parts of it in my new calculation (which I hope will be correct this time). I have tried to put % in front of the \begin{align} lines but it didn't work. I don't want to put the symbol % in front of all the lines one by one, so is there a short way of making a huge part of the code to appear as a comment in LaTeX?

sahin
  • 277
  • We've had questions on this before (and a dupe will doubtless appear), but if you really just want to comment lots of lines then your editor should be able to help. For example, I use TeXworks and it has a shortcut for 'comment this block' and 'uncomment this block'. – Joseph Wright May 05 '15 at 08:21
  • See http://tex.stackexchange.com/q/17816/15925 – Andrew Swann May 05 '15 at 08:21
  • I use TeXStudio. I have searched the site before asking the question but I somehow missed the question you mentioned @Andrew Swann, thank you. – sahin May 05 '15 at 08:24
  • I asked the same question to one of my friends and he just answered. I don't know whether it is only valid in TeXStudio or not but he told me to use Ctrl + t by selecting the whole block I want to turn into a comment and it worked for me. – sahin May 05 '15 at 08:33
  • 1
    For TeXstudio, commenting selected lines is done by Ctrl+T and uncommenting by Ctrl+U. These are default keyboard shortcuts and can obviously be changed. – alesc May 05 '15 at 08:34
  • Thank you @alesc, I may need to use the uncommenting funtion in the future as well. That was helpful. – sahin May 05 '15 at 08:37

0 Answers0