1

Is there a way to change the color of the text between \iffalse.. and \fi, so to make it more (or less) visible? I mean something like the gray color which is given to comments when using %. Preferably, I am interested in making it in a different color rather than gray, for example red, since I wish to differentiate it from normal comments.

I am using TeXniccenter, so any suggestion which is valid only for this environment is also acceptable, but a general solution is better. Thanks!

  • 1
    I don't really see that a general solution is possible here, as you seem to be looking for syntax highlighting in your editor, and that is mostly editor-specific I guess. – Torbjørn T. Jul 27 '15 at 14:35
1

Well, changing the highlighting (adding new keywords to be highlighted and the special color) is more an answer you should ask the support of TeXnicCenter. As far as I know there is now no possibility to change this configuration by the user.

You want to mark the code between an starting line (\iffalse and \fi), the comment sign is added in each line where the color should be changed (starting with % until line end). You see the big difference?

But you can use a pretty printing of your code so that you and others can better see were an \iffalse starts and end:

\iffalse 
  code
  \iffalse
    code
    \iffalse
      code
      code
    \fi
    code
  \fi
  code
  code
\fi

In TeXnicCenter you can use menu point view->Indentation Guide to show indended lines in code:

enter image description here

| improve this answer | |

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.