Closed beingalink closed 9 years ago
Do you have any lines in your TeX file > 512 bytes? chktex
doesn't handle these properly and causes it to report bad line and column numbers. chktex
will actually tell you this directly if you run chktex filename.tex
at a terminal.
I'm not able to reproduce the problem -- can you send me a gist with a sample TeX document that causes you the problem?
Wow, you're quick. :) And you're right, I just used chktex in the terminal with this file and got: "chktex: WARNING -- ChkTeX does not handle lines over 1024 bytes correctly. Some errors and line numbers may be wrong in this file." So it's indeed not a bug in linter-chktex but a limitation of chktex. Which is quite sad since it means you cannot use it with unicode/utf-8. I'm using xelatex for that reason. Guess I'll have to wait for someone improving chktex. Thanks for your help!
On a second thought, perhaps I misunderstood it. Does it mean that I just need to add line breaks?
Line breaks will fix it. There's an option under Edit->Reflow Selection that will do this automatically!
Thanks a lot! Didn't know this function. :) Linting works now almost perfect but I still sometimes get the cursor displacements so editing can become a little guesswork. No idea what the cause is. I'll disable the inline dialogs and see if it still happens.
OK, seems like my files have broken text encoding. :( That has nothing to do with linting but if you know a tool to fix that, I'd appreciate it anyway. ;) Otherwise I think everything is said now and I'll leave it like that. Thanks again for your helpful answers.
Same problem, can be solved by mannally break lines, but can't do so correctly via Reflow Selection
, so is there a way to increase the "bytes" chktex can handle? (I noticed that it can be 512 bytes or 1024 bytes.)
I'm not sure if this is a problem with linter or linter-chktex. The problem is that I get displayed wrong line numbers for issues linter-chktex found. The column number seems to be right. Also it seems like the inline dialogs break cursor navigation: When I put the cursor at some place where I want to edit text, the editing actually happens further right from the actual position of the cursor.