4

I wanted to adapt the Kate LaTeX Syntax Highlighting file (in my case: /usr/share/kde4/apps/katepart/syntax/latex.xml), to have a different highlighting in Kile, as in the answer to disable syntax highlighting in kile. Before that, I made a copy of the original file.

But my intended change did not work and also the Syntax Highlighting in some LaTeX documents didn't work any more, after restarting Kile. Interestingly, some documents highlighted still in the original way, but those that were edited last, not.

Hence, I wanted to switch back to the original version and just moved the backup copy I had made to the original place. However, after restarting the computer, the Syntax Highlighting still does not work. When in Kile, I click "Tools" -> "Highlighting" -> "Markup", but there is no Latex to be selected. In Kate, I cannot select Latex either.

What did I do wrong?! Do I have to do something else to make Kate & Kile recognize the file?! It has the same permissions as the other files in the folder.

I tried to resolve my problem by downloading the latex.xml file from the Kate repository, but also this file does not change anything.

2

After some fiddling around, I found an easy solution: I updated the Kate syntax highlighting files via Kate's own configuration settings.

To do this, I selected

Settings -> Configure Kate -> Editor Component -> Open/Save -> Modes & Filetypes -> Download Highlighting Files -> Install

in Kate.

Since I had never updated any highlighting file before, many were pre-selected for updating, including the Latex highlighting file. After installing all updates, I restarted Kate and Kile, and the highlighting is as good as ever!

Just as a hint, if one of you also experiences strange behaviour in Kate and also finds the Settings a bit confusing, I can recommend the KDE "The Editor Component Configuration" website.

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.