0

I often experience many common mistakes, when I collaborate with partners, like the following:

  • spelling variations (advisor vs. adviser)
  • varying abbreviations (eg. vs. e.g.)
  • different forms hyphenation of words (dataset vs. data-set vs. data set)

There exist professional tools that can do this, but maybe there are some tools, add-ons, or scripts (eg. Python, bash) that can find these generic mistakes? Common spellchecker cannot find these little differences in our text. Any ideas?

Tik0
  • 163
  • 1
    You can use regex. In fact, you can do all the substitutions in one step with this trick: http://www.rexegg.com/regex-trick-conditional-replacement.html – Luis Turcio Feb 15 '20 at 00:09
  • Not automatic, but if your collaborators are a mixture of U.K. and U.S. authors, it's best to decide beforehand which spelling style will be used, and ask everybody to stick to it. It's nearly impossible to "correct" such differences automatically, so you should be prepared to make a final editorial pass. – barbara beeton Feb 15 '20 at 21:00
  • (This is not quite TeX-specific, tools for other document formats can be used for TeX as well as long as they don't give false positive errors for TeX commands) – user202729 Jul 05 '22 at 02:00

1 Answers1

0

Probably not the answer you are looking for, but you can create regular expression checks for things like this in ChkTeX. You would add something like

(?!#Use! e.g.! instead! of! eg.)\beg[.]

to the UserWarnRegex section of your ~/.chktexrc file. I admit it's a little hard to read because you use ! to escape spaces ( \ is used a lot for LaTeX commands so it doesn't make a good choice). Anyway, the initial (?!#...) is for the warning message to show when it finds the regular expresion, in this case \beg[.] which would match "eg."

ChkTeX was really meant to perform sanity checks on the (La)TeX code itself rather than the writing but, like any tool, it can be coerced into doing other things. :)

Obviously, the biggest problem is that you have to come up with the list of problems yourself. I don't know of any such lists off hand, but I know I've seen several lists of "weasel words" or "passive voice", or other "things to avoid".

Now that I am thinking about this it might be nice to have a set of semi-standard rulesets (for various languages and writing styles) like this that people could start from (and customize to their own taste) that would be linked from the ChkTeX website.

Ivan Andrus
  • 2,042