pre-commit-latex-hooks icon indicating copy to clipboard operation
pre-commit-latex-hooks copied to clipboard

Extend with more useful rules

Open jonasbb opened this issue 4 years ago • 0 comments

[ ]---[ ]                    % syntax the em-dash should be right up against the words.
[ \n]---[ \n]                % syntax the em-dash should be right up against the words.
^---[ \n]                    % syntax the em-dash should be right up against the words.
[ \n]---$                    % syntax the em-dash should be right up against the words.
[ \n]--[ \n]                 % syntax the en-dash should be between numbers.
^--[ \n]                     % syntax the en-dash should be between numbers.
[ \n]--$                     % syntax the en-dash should be rbetween numbers.
[ ]\\footnote                % syntax no space before footnote.  
[ ]-[ ]              % syntax a hyphen surrounded by space should probably be an emdash '---'
[0-9]-[0-9]          % syntax use an endash '--' for ranges
[0-9]ms              % syntax put a space between the number and the unit.
[\n ]--[\n ]         % syntax that's an en-dash, you want an em-dash: "---"
\b$i\)[^$]              % syntax leave the paren in math mode -- should be $i)$
\b$ii\)[^$]             % syntax leave the paren in math mode -- should be $ii)$
\b$iii\)[^$]            % syntax leave the paren in math mode -- should be $iii)$
\b$iv\)[^$]             % syntax leave the paren in math mode -- should be $iv)$

The rules are taken from the rules folder in this repository https://github.com/nspring/style-check Many of the other rules are just phrases or typos.


TeXtidote is a LaTeX spelling and grammar checker: https://github.com/sylvainhalle/textidote#rules-checked-by-textidote

jonasbb avatar Jun 18 '21 12:06 jonasbb