0

I usually write commutative diagram codes in tex studio in xy matrix.

I have asked Latex Code for two parallel arrows and alignment in commutative diagram and an answer which I like has code in tikz cd.

So, I copied and run it in tex studio. It is working fine but there is some color highlight on code which when pointed on it says unrecognized command.

enter image description here

Is that a problem? Is my Tex studio not updated correctly? Or should I just ignore it?

I do not have such problem with xymatirx for example.

Bernard
  • 271,350
  • 3
    Just ignore it. – Johannes_B Jul 01 '18 at 05:12
  • @Johannes_B CAn it be not settled? – Praphulla Koushik Jul 01 '18 at 05:15
  • It probably can, but i don't use texstudio. I don't know how. Your editor is just like a pair of sunglasses, changing the view on code. If the code itself is fine, you don't need to worry. – Johannes_B Jul 01 '18 at 05:24
  • Ok Ok :) @Johannes_B – Praphulla Koushik Jul 01 '18 at 05:25
  • Or ask the texstudio developers to support tikz-cd. You can do a lot of things in latex and editors cannot cover it all in the code parsers. I find this "not defined" very confusing, because it is not undefined seen from latex, it is undefined from the coloring parser in the editor. But users does not know the difference. The dev should make thst distinction more clear – daleif Jul 01 '18 at 07:31
  • I only get \ar marked with an orange background, which disappears if I use \arrow. – egreg Jul 01 '18 at 09:23
  • You probably have version 2.12.6 or earlier of TeXstudio, if you update to the latest version (2.12.8) it should work as described in egreg's answer. – Torbjørn T. Jul 01 '18 at 09:39

2 Answers2

3

tikz-cd.cwl has to be selected:

enter image description here

(If your version of texstudio does not have this option, update to >= 2.12.8, thanks to @TorbjørnT. for pointing this out!)

Same goes for the unrecognised math commands, but as your question only shows the code as image and does not include a MWE to copy and paste, I'm not trying to find out which .cwl is missing.

1

My TeXStudio 2.12.8 is pretty much in its initial state, I just changed the editor font, because I find it of a hindrance rather than a help, so I never use it for my work.

Anyway, this is what I get with it; you can see that just \ar is marked as unknown, but the preferable \arrow isn't.

enter image description here

egreg
  • 1,121,712