Hacker News new | ask | show | jobs
by kthxb 1664 days ago
Is there some linter like this vor LaTeX, too?
3 comments

Yes, ChkTeX for instance: https://www.nongnu.org/chktex/

It also detects repetitions and some basic English language stuff if I recall correctly.

I've used it for my PhD manuscript, it's quite useful.

ChkTeX from sibling comment looks really cool!

There’s also a set of style linting scripts by Matt Might [0] that I’ve found really helpful in my writing. There’s an emacs minor mode built around them too, writegood-mode [1]

0: https://matt.might.net/articles/shell-scripts-for-passive-vo...

1: http://bnbeckwith.com/code/writegood-mode.html

You have to watch out about some of these linting tools, though, in case you get slavishly attached to their prescriptions. Some of these tools insist that you can never use passive voice, for instance, and that can lead to some truly barbaric phrasing in some docs I've read where it reads like the writer bent themselves into a pretzel trying to get to the active voice.

In Matt Might's recommended reading section for that tool he points out Style: The Basics of Clarity and Grace by Joseph Williams, and reading that book and really learning a lot of things it shows will be much more helpful overall for your writing. Its use of contrasting examples is very effective. For instance, it shows how the passive voice can be a very powerful tool for controlling the flow of topics and ideas and actions in a sentence or paragraph. Through the passive voice you can improve the clarity and coherence of a piece of prose. As Matt Might says, it's about making it a conscious decision rather than to enforce all controlling rules.

Yeah, I agree with that. For me it’s still a nice syntax highlighting tool to help me identify and think through those decisions.

I use a lot of hedging/weasel words in my first drafts so I find it helpful to have those highlighted for reconsideration

My allmytexs script package has a texlint script which runs fotlatexmk, chktex, hunspell, and linkchecker. The next updates will also run biblint.

https://github.com/hoffmangroup/allmytexs/