├── test ├── math.tex ├── clean.tex └── dirty.tex ├── rules ├── cliche ├── passive-voice ├── bad-words ├── foolish-phrases ├── misspellings ├── latex-checking ├── barrass ├── networking-research ├── common-typos ├── my-rules ├── day-gastel └── verbose-phrases ├── .gitignore ├── style-check.gemspec ├── Makefile ├── style-censor ├── README.md ├── README.html ├── style-check.rb ├── COPYING └── LICENSE /test/math.tex: -------------------------------------------------------------------------------- 1 | \documentclass[12pt]{article} 2 | \begin{document} 3 | Hello $1<2$. 4 | \end{document} 5 | -------------------------------------------------------------------------------- /rules/cliche: -------------------------------------------------------------------------------- 1 | dig deeper % phrase cliche 2 | attack these problems % phrase bobby dislikes 3 | crack these problems % phrase bobby dislikes 4 | attack this problem % phrase bobby dislikes 5 | crack this problem % phrase bobby dislikes 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # CVS default ignores begin 2 | tags 3 | TAGS 4 | .make.state 5 | .nse_depinfo 6 | *~ 7 | #* 8 | .#* 9 | ,* 10 | _$* 11 | *$ 12 | *.old 13 | *.bak 14 | *.BAK 15 | *.orig 16 | *.rej 17 | .del-* 18 | *.a 19 | *.olb 20 | *.o 21 | *.obj 22 | *.so 23 | *.exe 24 | *.Z 25 | *.elc 26 | *.ln 27 | core 28 | # CVS default ignores end 29 | README 30 | style-check-*.tar.gz 31 | -------------------------------------------------------------------------------- /test/clean.tex: -------------------------------------------------------------------------------- 1 | \begin{comment} 2 | some bad stuff that is in the comment environment and should be ignored. 3 | we we 4 | behavior 5 | fashion 6 | \end{comment} 7 | A user did what a user does. % an exception to the an vowel/a consonant rule 8 | A CD player needs a AA battery. % an exception to the an vowel/a consonant rule 9 | Is an RFID tag small? 10 | An RFID tag is small. 11 | \verb+bad things can happen in verbatim environments for the forseeable future+ 12 | \caption{This caption is short.} 13 | \caption[Lorem ipsum dolor sit amet.]{Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed tincidunt purus id mauris. Morbi euismod turpis eu lacus. Nam tempor.} 14 | $the actual impact of a number of$ % math mode exemption. 15 | A user reported a uniformly stupid set of bugs. 16 | \url{http://www.example.com/} 17 | \todo{don't leverage the pudding} 18 | NSF likes the phrase research impact. 19 | I like my coffee. 20 | -------------------------------------------------------------------------------- /style-check.gemspec: -------------------------------------------------------------------------------- 1 | 2 | Gem::Specification.new do |s| 3 | s.name = 'style-check' 4 | s.version = '0.15' 5 | s.date = '2014-12-06' 6 | s.summary = "Style checker for LaTeX" 7 | s.description = "style-check.rb searches latex-formatted text in search of forbidden phrases and 8 | prints error messages formatted as if from a compiler." 9 | s.authors = ["Neil Spring"] 10 | s.email = 'nspring@cs.umd.edu' 11 | s.files = ["bin/style-check.rb", "lib/style-check.rb" ] + Dir["lib/rules/*"] 12 | 13 | s.platform = Gem::Platform::RUBY 14 | s.require_paths = [ 'lib' ] 15 | s.extensions = Dir['ext/**/extconf.rb'] 16 | 17 | s.executables = [ "style-check.rb" ] 18 | s.test_files = Dir["test/**/test_*.rb"] 19 | s.homepage = 20 | 'http://www.scriptroute.org/' 21 | s.license = 'GPL' 22 | s.post_install_message = "Now run: \n% style-check.rb *.tex" 23 | end 24 | 25 | # Local Variables: 26 | # compile-command: "gem build style-check.gemspec" 27 | # End: 28 | -------------------------------------------------------------------------------- /test/dirty.tex: -------------------------------------------------------------------------------- 1 | each line should have a failure. like this one does not capitalize a sentence. 2 | And this one uses ellipsis wrongly... 3 | A aardvark eats a ant. 4 | An aardvark lives in an burrow. 5 | For the forseeable future. 6 | \caption{Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed tincidunt purus id mauris. Morbi euismod turpis eu lacus. Nam tempor.} 7 | \caption{\label{thelabel}Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed tincidunt purus id mauris. Morbi euismod turpis eu lacus. Nam tempor.} 8 | including apples, oranges, pears, etc. 9 | \url{www.example.com} 10 | I hope ginger does not impact the tofu 11 | gives alan information about 12 | gives the user information about 13 | forbid use of cite after a period.~\cite{foo} 14 | Previous sentence. Fooble Internet and Internet. 15 | Situation Normal all F'd Up(SNAFU) 16 | foo < bar should complain because < is another char. 17 | \emph{bar} refers to the essential bar-ness of life. 18 | \emph{bar} refers to foo. 19 | The bar is used to foo as can be seen in this sentence, which has two errors. 20 | -------------------------------------------------------------------------------- /rules/passive-voice: -------------------------------------------------------------------------------- 1 | it is possible to % phrase passive voice, try: "can" 2 | are identified by % phrase passive 3 | is shown % phrase passive. 4 | is not included in % phrase maybe this is passive 5 | there (are|is) [^\.:;]* (that|in) % phrase maybe this is passive 6 | can be evaluated % phrase avoid passive: I evaluated 7 | can be observed % phrase avoid passive: are visible 8 | # is needed % phrase passive voice 9 | is used to % phrase go active voice, or subsititute "helps" 10 | (are|were) needed[^\?] % phrase passive voice 11 | (is|are) presented in % phrase "appears in", or reword to avoid passive voice 12 | it is possible that % phrase "may" 13 | (is|are) (depicted|illustrated|sketched) in % phrase thats passive voice 14 | (is|are) shown in % phrase "shows" 15 | as can be seen in % phrase X shows that Y. 16 | there needs to be % phrase passive voice in a bad way. 17 | was designed % phrase passive voce. 18 | it may be % phrase passive "it" 19 | it is important that % phrase passive; replace with X is important because Y. 20 | -------------------------------------------------------------------------------- /rules/bad-words: -------------------------------------------------------------------------------- 1 | utilize % phrase "use" http://www.bartleby.com/64/C003/0294.html 2 | utilizes % phrase "uses" http://www.bartleby.com/64/C003/0294.html 3 | leverage % phrase "use" 4 | abstraction % phrase this is often used poorly? 5 | fashion % phrase hrm. 6 | [dw]on't % spelling do not or will not. 7 | behavioral % spelling I'm convinced we don't use this word properly. 8 | we'll % spelling we will 9 | we've % spelling we have 10 | [^r][^c][^h] impact % phrase "consequences", "effect", "result", though nsf likes "research impact" 11 | tackle % phrase "tackle" (a problem) is wimpy for "solve" or a tired metaphor for "address a challenge". 12 | thusly % phrase "thus" or "this way" or "like this" http://www.bartleby.com/64/C003/0282.html 13 | transpire % phrase "happen" 14 | so-called % phrase can be abused; it's negative. 15 | necessitate % phrase require. 16 | necessitated % phrase required. 17 | necessitates % phrase requires. 18 | loosing % spelling you almost certainly mean "losing". use "loosening" otherwise. 19 | aforementioned % phrase too pretentious. 20 | important to % phrase "valued by"? 21 | notion % phrase avoid this weak phrase. (thanks brian bershad!) 22 | -------------------------------------------------------------------------------- /rules/foolish-phrases: -------------------------------------------------------------------------------- 1 | (quite|more|very|most) unique % phrase unique is. 2 | (quite|more|very|most) abstract % phrase abstract is. 3 | tangible view % phrase mix that metaphor some more. 4 | for e\.g\. % phrase e.g. includes "for". 5 | begs the question % phrase unless you're very clever: "raises the question": http://alt-usage-english.org/excerpts/fxbegthe.html 6 | high rate of speed % phrase local news-speak. 7 | especially necessary % phrase 'especially important', necessary may be an absolute like unique. 8 | how will it effect % phrase you likely meant "affect" 9 | how it will effect % phrase you likely meant "affect" 10 | insure proper performance % phrase "ensure" 11 | especially true % phrase 'especially important', true may be an absolute like unique. 12 | to affect change % phrase "effect" change; I read this on a poster. 13 | higher results % phrase maybe higher performance or higher values. 14 | is more general then the % phrase probably "than" 15 | upper bounding % phrase "limiting" or "setting an upper bound on" 16 | in principal % phrase likely, "in principle" 17 | literally like % phrase literally means no simile. 18 | design principal % phrase likely, "design principle" 19 | -------------------------------------------------------------------------------- /rules/misspellings: -------------------------------------------------------------------------------- 1 | asess % spelling 2 | elimintate % spelling 3 | enginner % spelling 4 | experiements % spelling 5 | measurment % spelling 6 | pathlogies % spelling 7 | secrurity % spelling 8 | taht % spelling 9 | teh % spelling 10 | thrid % spelling 11 | accrurate % spelling 12 | prevalance % spelling prevalence 13 | upto % spelling not a word, should be "up to" 14 | til % spelling not a word, should be "until" 15 | thes % spelling indecisive these/the 16 | accurarte % spelling 17 | suppots % spelling 18 | privledge % spelling "privilege" I misspell it every way possible. 19 | privlege % spelling "privilege" I misspell it every way possible. 20 | priviledge % spelling "privilege" I misspell it every way possible. 21 | infomation % spelling 22 | queueing % spelling I'd love to spell it this way, but spellchecker whines. 23 | vatnage % spelling argh. 24 | hte % spelling 25 | acknowledgement % spelling acknowledgment, though what you have is technically legal, despite ispell. 26 | acknowlegement % spelling needs a d. 27 | acknowlegment % spelling needs a d. 28 | acknowledgements % spelling acknowledgment , though what you have is technically legal, despite ispell. 29 | acknowlegements % spelling needs a d. 30 | acknowlegments % spelling needs a d. 31 | targetted % spelling "targeted" 32 | desireable % spelling "desirable" 33 | fullproof % spelling found this in savage et al. traceback 34 | -------------------------------------------------------------------------------- /rules/latex-checking: -------------------------------------------------------------------------------- 1 | \{\\em [^\}]*[^\}\/]\}[:] % syntax use \emph{} or explicit italic correction {\em foo\/} 2 | \{\\em [^\}]*[:\.,]\} % syntax punctuation at the edges of italic text is not italicized 3 | [A-Z]{2,10}\.[ ]*[\n ][ ]*[A-Z] % syntax intersentence spacing should be used if a sentence ends with an acronym: "FOO\\@." 4 | \\etal[^{] % syntax it's good practice to use \etal{} to avoid bad spacing 5 | \\caption\[[^\]]*[^\.]\] % syntax short caption should end with a period. 6 | \\caption\[.*CCDF.*\] % syntax short caption should not include graph type. 7 | \\caption\[.*CDF.*\] % syntax short caption should not include graph type. 8 | \\caption\[.{0,25}\] % syntax short caption should not be too short. 9 | [ ]---[ ] % syntax the em-dash should be right up against the words. 10 | [ \n]---[ \n] % syntax the em-dash should be right up against the words. 11 | ^---[ \n] % syntax the em-dash should be right up against the words. 12 | [ \n]---$ % syntax the em-dash should be right up against the words. 13 | [ \n]--[ \n] % syntax the en-dash should be between numbers. 14 | ^--[ \n] % syntax the en-dash should be between numbers. 15 | [ \n]--$ % syntax the en-dash should be rbetween numbers. 16 | ,[~ ]\\etal % syntax no comma before etal (unless Smith, Martinez, \etal) 17 | \\etal\{\}'s % syntax eew. 18 | \\(sub)?section\{[A-Z][^}]*[ ][a-z]{5,40}[^}]*\} % syntax subsection headers should be initial capped. 19 | \\(sub)?section\{[A-Z][^}]*[^:][ ]{1,}(With|A|An|Is|And|For|To|The)[ ][^}]*\} % syntax some words needn't be capitalized 20 | [ ]\\footnote % syntax no space before footnote. 21 | ,, % syntax double comma is unlikely to be intentional. 22 | cf\.[^\\] % phrase cf. should get an escaped space "\ " 23 | [a-z]''[\.] % syntax close quotes outside the period. (doesn't seem to work.) 24 | [<>] % syntax a less than or greater than outside math mode shows other characters. 25 | in section \\ref % phrase should have ~ between section and ref 26 | section~\\ref % capitalize capitalize section when saying Section 6. 27 | \\(sub)?section\{Intro\} % syntax spell it out. 28 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | RULESFILES=bad-words barrass common-typos foolish-phrases latex-checking misspellings my-rules \ 2 | networking-research passive-voice verbose-phrases day-gastel 3 | PACKAGE=style-check 4 | VERSION=0.14 5 | SYSCONFDIR=/etc/$(PACKAGE).d 6 | PREFIX=/usr/local 7 | bindir=$(PREFIX)/bin 8 | INSTALL=install 9 | 10 | all: 11 | 12 | user-install: 13 | mkdir -p $(HOME)/.style-check.d 14 | for p in $(RULESFILES); do \ 15 | $(INSTALL) -m0644 rules/$$p $(HOME)/.style-check.d; \ 16 | done 17 | 18 | install: 19 | mkdir -p $(DESTDIR)$(SYSCONFDIR) 20 | for p in $(RULESFILES); do \ 21 | $(INSTALL) -m0644 rules/$$p $(DESTDIR)$(SYSCONFDIR); \ 22 | done 23 | mkdir -p $(DESTDIR)$(bindir) 24 | $(INSTALL) -m0755 style-check.rb $(DESTDIR)$(bindir); 25 | 26 | distdir = $(PACKAGE)-$(VERSION) 27 | am__remove_distdir = \ 28 | { test ! -d $(distdir) \ 29 | || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ 30 | && rm -fr $(distdir); }; } 31 | distdir: README Makefile 32 | $(am__remove_distdir) 33 | mkdir $(distdir) 34 | mkdir $(distdir)/rules 35 | for f in $(RULESFILES); do \ 36 | cp rules/$$f $(distdir)/rules; \ 37 | done 38 | cp Makefile COPYING style-check.rb README README.html $(distdir) 39 | mkdir $(distdir)/test 40 | cp test/*.tex $(distdir)/test 41 | 42 | $(distdir).tar.gz: distdir 43 | tar cvfz $(distdir).tar.gz $(distdir) 44 | $(am__remove_distdir) 45 | 46 | dist: $(distdir).tar.gz 47 | 48 | README: README.html 49 | cat $< | w3m -dump -T text/html > $@ 50 | 51 | check: 52 | @echo Should succeed 53 | ./style-check.rb -r rules test/clean.tex 54 | @echo Should report nothing 55 | !(./style-check.rb -r rules test/clean.tex | grep clean) 56 | @echo Should report something 57 | ./style-check.rb -r rules test/dirty.tex | grep dirty > /dev/null 58 | @echo Checks for space after line before column. 59 | ./style-check.rb -g -r rules test/dirty.tex | grep "1: 32" > /dev/null 60 | @echo Checks for html output 61 | ./style-check.rb -w -r rules test/dirty.tex | grep html > /dev/null 62 | ./style-check.rb -r rules test/math.tex 63 | ./style-check.rb test/math.tex 64 | ./style-check.rb --help > /dev/null 65 | 66 | upload: $(distdir).tar.gz 67 | scp README.html ringding.cs.umd.edu:public_html/software/style-check-readme.html 68 | scp $(distdir).tar.gz ringding.cs.umd.edu:public_html/software/ 69 | ssh ringding.cs.umd.edu "cd public_html/software && rm -f style-check-current.tar.gz && ln -s $(distdir).tar.gz style-check-current.tar.gz" 70 | -------------------------------------------------------------------------------- /rules/barrass: -------------------------------------------------------------------------------- 1 | ## I like this once in a while, for "goals" accomplish % phrase do 2 | ## A nice hint, but not a good rule. additional % phrase extra, more 3 | anticipate % phrase expect 4 | breakthrough % phrase discovery 5 | commence % phrase begin 6 | conjecture % phrase guess 7 | ## I use this correctly. consider % phrase think 8 | considerable % phrase much 9 | ## I often use this in a technical sense. construct % phrase build 10 | demonstrate % phrase show 11 | encounter % phrase meet 12 | endeavour % phrase try 13 | excepting % phrase except 14 | exhibit % phrase show 15 | fabriacate % phrase build 16 | firstly % phrase first 17 | guidelines % phrase guidance 18 | hypothesize % phrase suggest 19 | indication % phrase sign 20 | initiate % phrase start 21 | modification % phrase change 22 | possess % phrase have 23 | preventative % phrase preventive 24 | ## often I use illustrations represents % phrase is 25 | shortly % phrase soon (though best to say when) 26 | subsequently % phrase later 27 | # sufficient % phrase enough -- I often use sufficient technically. 28 | ## I don't believe in this. upon % phrase on 29 | utilisation % phrase use 30 | ## I don't believe in this. within % phrase in 31 | virtually % phrase almost 32 | currently % phrase now 33 | absolutely essential % phrase essential 34 | an actual investigation % phrase an investigation 35 | almost unique % phrase rare 36 | completely surrounded % phrase surrounded 37 | conclusive proof % phrase proof 38 | an essential condition % phrase a condition 39 | hard evidence % phrase evidence 40 | they are in fact % phrase they are 41 | few in number % phrase few 42 | a positive identification % phrase an identification 43 | quite obvious % phrase obvious 44 | real problems % phrase problems 45 | streamlined in appearance % phrase streamlined 46 | quite unique % phrase unique 47 | every individual one % phrase every one 48 | the reason for this is because % phrase because 49 | reason why % phrase reason -awu 50 | reverted back % phrase reverted 51 | related to each other % phrase related 52 | each individual person % phrase each person 53 | in actual fact % phrase in fact 54 | a specific example % phrase an example 55 | an integral part % phrase a part 56 | different varieties % phrase varieties 57 | grouped together % phrase grouped 58 | percolate down % phrase percolate 59 | eradicate completely % phrase eradicate 60 | give positive encouragement % phrase encourage 61 | -------------------------------------------------------------------------------- /rules/networking-research: -------------------------------------------------------------------------------- 1 | EBONE % capitalize a somewhat useless rule, now (we standardized on Ebone) 2 | EBone % capitalize a somewhat useless rule, now (we standardized on Ebone) 3 | IPs % phrase should be IP addresses 4 | NMI % spelling is Steve's cat's name, not a measurement system 5 | Planetlab % capitalize PlanetLab 6 | Send-Train % capitalize should be Send-train 7 | UUNET % capitalize UUnet 8 | [Rr]ate-limits % spelling "rate limits" has no hyphen, only "rate-limited" 9 | [a-z] Tier % syntax don't capitalize Tier unless at the beginning of the sentence 10 | ``no-valley'' % spelling should not be quoted, it's distracting 11 | best effort % phrase hyphenate best-effort service. 12 | bpf % capitalize 13 | ccdf % capitalize 14 | cisco % capitalize the company name 15 | city-pairs % phrase decided to hyphenate 16 | deliver route % phrase jargon redundancy 17 | euclidean % capitalize Euclidean. 18 | interdomain % spelling inter-domain 19 | internet % capitalize unless talking about an internet other than the Internet 20 | intradomain % spelling intra-domain 21 | load\bbalanc % syntax load-balanced links, hyphenate load-balancing too 22 | log-normal % spelling lognormal is one word. 23 | magic-packet % spelling don't hyphenate 24 | multiaccess % spelling multi-access (or better, multiple access) 25 | namespace % spelling two words 26 | nimi % capitalize 27 | no\bvalley % phrase hyphenate no-valley 28 | pareto % capitalize 29 | planetlab % capitalize PlanetLab 30 | points links % phrase probably wrong to have two plural nouns adjacent 31 | scriptroute % capitalize 32 | send-train % capitalize should be Send-train 33 | tier [123] % phrase should be tier-1, tier-2, or tier-3. 34 | tier-[123]s % phrase should be tier-1 ISPs 35 | ttl % capitalize 36 | weibull % capitalize proper name. 37 | PoP % syntax I think POP looks less annoying. 38 | PoPs % syntax I think POP looks less annoying. 39 | the general Internet % phrase it's just the Internet. there is only one. 40 | IP-ID % phrase spell it out 41 | handful of routers % phrase they don't fit in your hand 42 | outdegree % phrase going to use hyphenated form. 43 | network measurement algorithms % phrase you're too kind to network measurement. I haven't seen an algorithm yet. 44 | http[ ] % capitalize capitalize HTTP. 45 | linux % capitalize capitalize Linux 46 | Internet[^\.]*Internet % syntax avoid Internet twice in the same sentence? 47 | zipf % capitalize capitalize the guy's name. 48 | in network distance % phrase what is that? 49 | TIMEWAIT % spelling it's "TIME-WAIT", hyphenated in rfc 793 50 | FINWAIT % syntax it's "FIN-WAIT-1" or "FIN-WAIT-2", hyphenated in rfc 793 51 | -------------------------------------------------------------------------------- /rules/common-typos: -------------------------------------------------------------------------------- 1 | a the % phrase double article 2 | pt % syntax ? I guess avoid straggling pt's that escape tex? 3 | [ ], % syntax whitespace before comma seems wrong. 4 | ''[\.,] % syntax end quotes go outside punctuation like . and , 5 | Figure Figure % phrase pizza pizza. 6 | [ ]-[ ] % syntax a hyphen surrounded by space should probably be an emdash '---' 7 | [0-9]-[0-9] % syntax use an endash '--' for ranges 8 | [0-9]ms % syntax put a space between the number and the unit. 9 | [^egs]\. [a-z] % syntax a period usually ends a sentence, and sentences should start with a capital; doesn't apply for i.e., 10 | \. [a-z] % syntax a period usually ends a sentence, and sentences should start with a capital; "i.e." should have a comma following. 11 | [a-z]\.\. % syntax double period is rarely right, use \ldots for ellipsis 12 | [^\\]" % syntax use fancy quotes 13 | \beg\. % syntax should be e.g. as in "examples given" 14 | from to\b % phrase haven't used this properly. 15 | help help % phrase double word, that probably means the author paniced 16 | of of % phrase apparent double word. 17 | the affect % phrase should probably be 'the effect' 18 | the the % phrase apparent double word. 19 | there too few % phrase there are too few? 20 | was not was % phrase pretty much a joke if this gets matched. 21 | we we % phrase it would be oi oi in french, I guess. 22 | with on % phrase probably wrong. 23 | with with % phrase apparent double word. 24 | [\n ]--[\n ] % syntax that's an en-dash, you want an em-dash: "---" 25 | my my % phrase unlikely that's what you want, at least without a comma. (doesn't work across newlines) 26 | >From % syntax be careful when you email .tex files. I've seen this slip through into submissions. 27 | e\.t\.c\. % syntax it's et cetera; use etc. 28 | such as like % phrase pick one 29 | <<<<<<< . % syntax CVS conflict! 30 | ======= % syntax CVS conflict! 31 | >>>>>>> [0-9] % syntax CVS conflict! 32 | [;:]'' % syntax close quotes before (semi-)colons, but after commas and periods 33 | e\.g\.[\n ] % syntax should be followed with a comma, as e.g. can be read as "for example" (thanks JZ!) 34 | i\.e\.[\n ] % syntax should be followed with a comma, as i.e. can be read as "that is" (thanks JZ!) 35 | [ ]\.[\n ] % syntax stray period? 36 | further more % phrase one word: furthermore 37 | safe guard % phrase one word: safeguard 38 | that be % phrase mistake. 39 | can not % phrase cannot 40 | only only % phrase double word 41 | is is % phrase double word. 42 | they shows % phrase argh, mistake. 43 | less that than % phrase typo damage 44 | from from % phrase double word score 45 | in in % phrase "in" (common mistake) 46 | not not % phrase argh. 47 | it it % phrase argh. 48 | to illicit % phrase "to elicit" -- illicit is always an adjective. 49 | c\.f\. % phrase actually, it's cf., and you'd like cf.\ (backslash space) 50 | this lead to % phrase "led to" if past tense, "leads to" if present. 51 | on on % phrase double word. 52 | has is % phrase choose 53 | description their % phrase saw this, clearly wrong. 54 | including: % syntax I prefer no colon after including, which already says a list is coming. 55 | [a-z]\([A-Z] % syntax put a space before parens, even when introducing acronyms. 56 | without and without % phrase saw this. 57 | can be result % phrase saw this typo. 58 | 59 | -------------------------------------------------------------------------------- /rules/my-rules: -------------------------------------------------------------------------------- 1 | # such may be abused to blacklist certain words even spelled correctly. 2 | # capitalize is case sensitive, and also bracketed by non-word. 3 | # phrase and spelling are case insensitive, but bracketed by non-word characters. 4 | # syntax is case sensitive but not bracketed by non-word; probably best if used with regexes. 5 | \bet al\.[^}] % syntax use the \etal{} command instead. (or write one to italicize) 6 | \bet\. al\. % syntax use the \etal{} command, "et" needs no dot (et alii). (or write one to italicize) 7 | \bc\.f\.\b % syntax should be cf. for "confer" (latin for compare) 8 | \b$i\)[^$] % syntax leave the paren in math mode -- should be $i)$ 9 | \b$ii\)[^$] % syntax leave the paren in math mode -- should be $ii)$ 10 | \b$iii\)[^$] % syntax leave the paren in math mode -- should be $iii)$ 11 | \b$iv\)[^$] % syntax leave the paren in math mode -- should be $iv)$ 12 | \b$v\)[^$] % syntax leave the paren in math mode -- should be $v)$ 13 | \ban [b-df-gj-np-tv-z] % syntax probably meant to use "a" instead of "an", though there are exceptions. 14 | \ban [B-DF-GJ-NP-TV-Z][^A-Z/] % syntax probably meant to use "a" instead of "an", though there are exceptions (like acronyms). 15 | \b[Aa] [aeiouAEIOU](?!se|ni|A|ur|RL|ti|ne|DP) % syntax probably meant to use "an" instead of "a", though there are exceptions. (user, useful, AA, unified, uniform, unique, Europe, one, UDP; n/a doesn't work, so use {n/a}) 16 | This allows % phrase tie more explicitly: This (x) allows... 17 | try and % phrase "try to", though if you're using try as a noun in a compound sentence, this rule is wrong. 18 | impact of % phrase not a useful metaphor; try evaluation, success, effect, value. 19 | including [^\.]*etc\. % syntax "including" tells of a non-exclusive list, so "etc." is redundant. This rule will misfire if you have two lists in your sentence, but you shouldn't do that either. ;) 20 | includes [^\.]*etc\. % syntax "includes" tells of a non-exclusive list, so "etc." is redundant. This rule will misfire if you have two lists in your sentence, but you shouldn't do that either. ;) 21 | and etc\. % phrase come on. learn some latin. 22 | AT&T % syntax you poor thing, this won't compile. 23 | doesn't % phrase be formal. 24 | be occur % phrase what happens when I'm indecisive about what follows "can" 25 | up until % phrase "until" 26 | one or more % phrase probably redundant -- nonzero is probably implied. 27 | is comprise(d|s) of % phrase you probably mean "is composed of" because "comprises" is more a synonym for "contains" 28 | will be significantly different % phrase "will differ significantly" for active voice 29 | More importantly, % phrase probably means the order is wrong: put important stuff first. 30 | todo % ignoredcommand 31 | texttt % ignoredcommand 32 | due to space constraints % phrase don't whine. 33 | this paper % phrase can be ambiguous if talking about someone else's paper whether you mean the one youre writing or the one you're talking about.. 34 | the above % phrase horrible phrase that must be expunged. you might use "these" instead, but best to make the sentence stand alone. 35 | referred to above % phrase "these". 36 | (all|the|of) [0-9][ ] % phrase use words for numbers in phrases. 37 | clearly shows % phrase "clearly" is usually much. 38 | grows larger % phrase is "grows smaller" possible? grows. 39 | guarantee as much as possible % phrase then not really a guarantee "provide" 40 | affects negatively % phrase "hurts" or "harms" 41 | rely upon % phrase rely on is good enough 42 | relies upon % phrase relies on is good enough 43 | record route packets? % phrase hyphenate record-route packets 44 | record-route; % phrase leave record route alone if not modifying something else 45 | we accomplish this % phrase verbose way to get active voice. 46 | refers to the % phrase you're being wimpy in the definition. use "is" 47 | \\emph\{[a-zA-Z ]*\} refers to % syntax you're being wimpy in the definition. 48 | loss off % phrase loss of? 49 | this could % phrase this "what" could 50 | with that has % phrase probably just one 51 | simply % phrase probably isn't. 52 | to get to % phrase "to reach"? 53 | latency benefit % phrase reduction 54 | latency improvement % phrase reduction 55 | shed insight % phrase 'shed light' would seem the metaphor. 56 | increasingly more % phrase redundant 57 | I\.e\. % syntax starting a sentence with i.e. is just ugly. 58 | E\.g\. % syntax starting a sentence with e.g. is just ugly. 59 | in the large % phrase if large is a noun, bad. if it's an adjective, fine. 60 | encapsulates with % phrase seen it, don't know what it means. 61 | -------------------------------------------------------------------------------- /style-censor: -------------------------------------------------------------------------------- 1 | a the % phrase double article 2 | pt % syntax ? I guess avoid straggling pt's that escape tex? 3 | that was % phrase probably redundant 4 | # such may be abused to blacklist certain words even spelled correctly. 5 | # capitalize is case sensitive, and also bracketed by non-word. 6 | # phrase and spelling are case insensitive, but bracketed by non-word characters. 7 | # syntax is case sensitive but not bracketed by non-word; probably best if used with regexes. 8 | ''[\.,] % syntax end quotes go outside punctuation like . and , 9 | EBONE % capitalize a somewhat useless rule, now (we standardized on Ebone) 10 | EBone % capitalize a somewhat useless rule, now (we standardized on Ebone) 11 | Figure Figure % phrase pizza pizza. 12 | IPs % phrase should be IP addresses 13 | NMI % spelling is Steve's cat's name, not a measurement system 14 | Planetlab % capitalize PlanetLab 15 | Send-Train % capitalize should be Send-train 16 | UUNET % capitalize UUnet 17 | [ ]-[ ] % syntax a hyphen surrounded by space should probably be an emdash '--' 18 | [0-9]-[0-9] % syntax use an emdash '--' for ranges 19 | [0-9]ms % syntax put a space between the number and the unit. 20 | [Rr]ate-limits % spelling "rate limits" has no hyphen, only "rate-limited" 21 | [^egs]\. [a-z] % syntax a period usually ends a sentence, and sentences should start with a captial; doesn't apply when an acronym. 22 | [a-z] Tier % syntax don't capitalize Tier unless at the beginning of the sentence 23 | [a-z]\.\. % syntax double period is rarely right, use \ldots for ellipsis 24 | \" % syntax use fancy quotes 25 | \. [a-z] % syntax a period usually ends a sentence, and sentences should start with a captial; doesn't apply when an acronym. 26 | \\etal[^{] % syntax it's good practice to use \etal{} to avoid bad spacing 27 | \beg\. % syntax should be e.g. as in "examples given" 28 | ``no-valley'' % spelling should not be quoted, it's distracting 29 | a large number of % phrase you mean "many" 30 | a number of % phrase as opposed to "a letter of?" 31 | a small number of % phrase you mean "few" 32 | actually % spelling probably doesn't add 33 | and instead % phrase replace with but. 34 | asess % spelling 35 | be done % phrase if "X of Y can be done", try "Y can be Xed"; it's already passive tense. 36 | behavioral % spelling I'm convinced we don't use this word properly. 37 | best effort % phrase hyphenate best-effort service. 38 | bpf % capitalize 39 | ccdf % capitalize 40 | cisco % capitalize the company name 41 | city-pairs % phrase decided to hyphenate 42 | combining multiple % phrase as opposed to "combining one?" 43 | counting the number of % phrase counting. dude. 44 | deliver route % phrase jargon redundancy 45 | do this % phrase probably verbose if you use a pronoun for what you're doing 46 | don't % spelling do not 47 | elimintate % spelling 48 | enginner % spelling 49 | et al.[^}] % syntax use the \etal{} command instead. 50 | exists % spelling -- probably no better than "is" 51 | experiements % spelling 52 | fashion % spelling hrm 53 | from to\b % phrase haven't used this properly. 54 | help help % phrase double word, that probably means the author paniced 55 | i\)[^$] % syntax leave the paren in math mode -- should be $i)$ 56 | if it is to % phrase should be "to" (usually followed by "be X") 57 | if they are to % phrase should be "to" (usually followed by "be X") 58 | ii\)[^$] % syntax leave the paren in math mode -- should be $ii)$ 59 | iii\)[^$] % syntax leave the paren in math mode -- should be $iii)$ 60 | in different continents % phrase ON different continents, IN different countries 61 | in general % phrase unless matched with "in specific," this is usually useless 62 | in order to % phrase remove "in order" and get "to" 63 | in the past % phrase past tense is likely enough. 64 | in the way of % phrase should be "as" 65 | interdomain % spelling inter-domain 66 | internet % capitalize unless talking about an internet other than the Internet 67 | intradomain % spelling intra-domain 68 | is permitted to % phrase "may" 69 | iv\)[^$] % syntax leave the paren in math mode -- should be $iiv)$ 70 | largely opaque % phrase largely does not modify opaque 71 | load\bbalanc % syntax load-balanced links, hyphenate load-balancing too 72 | log-normal % spelling lognormal is one word. 73 | magic-packet % spelling don't hyphenate 74 | makes a new % phrase should be "creates" 75 | may not chose % phrase "may not" is future tense; "chose" is past. 76 | measurment % spelling 77 | multiaccess % spelling multi-access (or better, multiple access) 78 | namespace % spelling two words 79 | nimi % capitalize 80 | no\bvalley % phrase hyphenate no-valley 81 | note that % phrase is the rest of the paper less notable? 82 | of of % phrase apparent double word. 83 | out-degree % spelling outdegree for consistency 84 | pareto % capitalize 85 | pathlogies % spelling 86 | planetlab % capitalize PlanetLab 87 | points links % phrase probably wrong to have two plural nouns adjacent 88 | really % spelling probably doesn't add 89 | rigorously % spelling probably doesn't add, and I rarely do anything with rigor 90 | scriptroute % capitalize 91 | secrurity % spelling 92 | send-train % capitalize should be Send-train 93 | so that we may % phrase probably "to" 94 | taht % spelling 95 | teh % spelling 96 | the affect % phrase should probably be 'the effect' 97 | the the % phrase apparent double word. 98 | the way in which % phrase should be "how" or "" 99 | there too few % phrase there are too few? 100 | thrid % spelling 101 | tier [123] % phrase should be tier-1, tier-2, or tier-3. 102 | tier-[123]s % phrase should be tier-1 ISPs 103 | ttl % capitalize 104 | v\)[^$] % syntax leave the paren in math mode -- should be $v)$ 105 | value stems % phrase value is derived or offered, I think. 106 | was not was % phrase pretty much a joke if this gets matched. 107 | we we % phrase it would be oi oi in french, I guess. 108 | we'll % spelling we will 109 | we've % spelling we have 110 | web % capitalize unless you're Charlotte, we capitalize Web. 111 | weibull % capitalize 112 | with on % phrase probably wrong. 113 | with with % phrase apparent double word. 114 | -------------------------------------------------------------------------------- /rules/day-gastel: -------------------------------------------------------------------------------- 1 | a considerable amount of % phrase "much" 2 | a considerable number of % phrase "many" 3 | a decreased amount of % phrase "less" 4 | a decreased number of % phrase "fewer" 5 | a great deal of % phrase "much" 6 | a majority of % phrase "most", though 'a majority of' implies more than 50% while most implies significantly more. 7 | a number of % phrase "many" or "some" 8 | a situation in which % phrase "when" 9 | a small number of % phrase "a few" 10 | absolutely essential % phrase "essential" 11 | accounted for by the fact % phrase "because" 12 | adjacent to % phrase "near" or "next to" 13 | along the lines of % phrase "like" 14 | an adequate amount of % phrase "enough" 15 | an example of this is the fact that % phrase "for example" 16 | an order of magnitude faster % phrase "10 times as fast" 17 | apprise % phrase "inform" 18 | are of the same opinion % phrase "agree" 19 | as a consequence of % phrase "because" 20 | as a matter of fact % phrase "in fact" or leave out 21 | as a result of % phrase "because" 22 | as is the case % phrase "as happens" 23 | as of this date % phrase "today" 24 | as to % phrase "about" or leave out 25 | at a rapid rate % phrase "rapidly" or "fast" 26 | at an earlier date % phrase "soon" 27 | at no time % phrase "never" 28 | at present % phrase "now" 29 | at some future time % phrase "later" or "sometime" 30 | at the conclusion of % phrase "after" 31 | at the present time % phrase "now" 32 | at this point in time % phrase "now" 33 | based on the fact that % phrase "because" 34 | because of the fact that % phrase "because" 35 | by means of % phrase "by" or "with 36 | causal factor % phrase "cause" 37 | cognizant of % phrase "aware of" 38 | completely full % phrase "full" 39 | consensus of opinion % phrase "consensus" 40 | considerable amount of % phrase "much" 41 | contingent upon % phrase "dependent on" 42 | count the number of % phrase "count" 43 | definitely proved % phrase "proved" 44 | despite the fact that % phrase "although" 45 | due to the fact that % phrase "because" 46 | during the course of % phrase "during" or "while" 47 | during the time that % phrase "while" 48 | effectuate % phrase "cause" 49 | elucidate % phrase "explain" 50 | employ % phrase "use" 51 | enclosed herewith % phrase "enclosed" 52 | end result % phrase "result" 53 | endeavor % phrase "try" 54 | entirely eliminate % phrase "eliminate" 55 | eventuate % phrase "happen" 56 | fabricate % phrase "make" 57 | facilitate % phrase "help" 58 | fatal outcome % phrase "death" 59 | fellow colleague % phrase "colleague" 60 | fewer in number % phrase "fewer" 61 | finalize % phrase "end" 62 | first of all % phrase "first" 63 | for the purpose of % phrase "for" 64 | for the reason that % phrase "because" 65 | from the point of view of % phrase "for" 66 | future plans % phrase "plans" 67 | give an account of % phrase "describe" 68 | give rise to % phrase "cause" 69 | has been engaged in a study of % phrase "has studied" 70 | has the capability of % phrase "can" 71 | has the potential to % phrase "can" or "may" 72 | have the appearance of % phrase "look like" or "resemble" 73 | having regard to % phrase "about" 74 | immune serum % phrase "antiserum" 75 | important essentials % phrase "essentials" 76 | in a number of cases % phrase "sometimes" 77 | in a position to % phrase "able to" 78 | in a satisfactory manner % phrase "satisfactorily" 79 | in a situation in which % phrase "when" 80 | in a very real sense % phrase "in a sense" or leave out 81 | in almost all instances % phrase "nearly always" 82 | in case % phrase "if" 83 | in close proximity to % phrase "close" or "near" 84 | in connection with % phrase "about" or "concerning" 85 | in light of the fact that % phrase "because" 86 | in many cases % phrase "often" 87 | in most cases % phrase "usually" 88 | in my opinion it is not an unjustifiable assumption that % phrase "I think" 89 | in only a small number of cases % phrase "rarely" 90 | in order to % phrase "to" 91 | in relation to % phrase "toward" or "to" 92 | in respect to % phrase "about" 93 | in some cases % phrase "sometimes" 94 | in terms of % phrase "about" 95 | in the absence of % phrase "without" 96 | in the event that % phrase "if" 97 | in the most effective manner % phrase "most effectively" 98 | in the not too distant future % phrase "soon" 99 | in the not-too-distant future % phrase "soon" 100 | in the possession of % phrase "has" or "have" 101 | in this day and age % phrase "today" 102 | in view of the fact that % phrase "because" 103 | inasmuch as % phrase "for" or "as" 104 | in as much as % phrase "for" or "as" 105 | incline to the view % phrase "think" 106 | inclined to the view % phrase "thought" 107 | initiate % phrase "begin" or "start" 108 | is defined as % phrase "is" 109 | is desirous of % phrase "wants" 110 | is detrimental to % phrase "harms" 111 | is similar to % phrase "resembles" 112 | it has been reported by % phrase "___ reported" 113 | it has long been known that % phrase "I haven't looked up the reference" 114 | it is apparent that % phrase "apparently" or "clearly" 115 | it is believed that % phrase "I think" (or say who thinks) 116 | it is clear that % phrase "clearly" 117 | it is clear that much additional work will be required % phrase "I don't understand it" 118 | it is evident that % phrase probably not needed just say what happened 119 | it is generally believed % phrase "many think" 120 | it is my understanding that % phrase "I understand that" 121 | it is of interest to note that % phrase leave out 122 | it is often the case that % phrase "often" 123 | it is suggested that % phrase "I think" 124 | it is worth pointing out in this context % phrase omit 125 | it may be that % phrase "I think" or "perhaps" 126 | it may, however, be noted that % phrase "but" 127 | it should be noted that % phrase omit 128 | it was observed in the course of the experiments that % phrase "we observed" 129 | join together % phrase "join" 130 | lacked the ability to % phrase "could not" 131 | large in size % phrase "large" 132 | let me make one thing perfectly clear % phrase A snow job is coming... 133 | majority of % phrase "most" 134 | make reference to % phrase "refer to" 135 | militate against % phrase "prohibit" 136 | more often than not % phrase "usually" 137 | needless to say % phrase (leave out, and consider leaving out what follows it) 138 | new initiatives % phrase "initiatives" 139 | no later than % phrase "by" 140 | of an efficient nature % phrase "efficient" 141 | of great theoretical and practical importance % phrase "useful" 142 | of long standing % phrase "old" 143 | of the opinion that % phrase "think that" 144 | on a daily basis % phrase "daily" 145 | on account of % phrase "because" 146 | on behalf of % phrase "for" 147 | on no occasion % phrase "never" 148 | on the basis of % phrase "by" 149 | on the grounds that % phrase "because" 150 | on the part of % phrase "by" or "among" or "for" 151 | on those occasions in which % phrase "when" 152 | our attention has been called to the fact that % phrase "we belatedly discovered" 153 | owing to the fact that % phrase "because" 154 | perform % phrase "do" 155 | place a major emphasis on % phrase "stress" or "emphasize" 156 | pooled together % phrase "pooled" 157 | presents a picture similar to % phrase "resembles" 158 | previous to % phrase "before" 159 | prior to % phrase "before" 160 | determinations were performed % phrase "were determined" 161 | quantify % phrase "measure" 162 | quite a large quantity of % phrase "much" 163 | quite unique % phrase "unique" 164 | rather interesting % phrase "interesting' 165 | red in color % phrase "red" 166 | referred to as % phrase "called" 167 | regardless of the fact that % phrase "even though" 168 | relative to % phrase "about" 169 | resultant effect % phrase "result" 170 | root cause % phrase "cause" 171 | serious crisis % phrase "crisis" 172 | should prove the case that % phrase "if" 173 | smaller in size % phrase "smaller" 174 | so as to % phrase "to" 175 | subject matter % phrase "subject" 176 | subsequent to % phrase "after" 177 | sufficient % phrase "enough" 178 | take into consideration % phrase "consider" 179 | terminate % phrase "end" 180 | the fact of the matter is that % phrase (leave out) 181 | the field of % phrase just say the field name "chemistry" 182 | the great majority of % phrase "most" or "almost all" 183 | the opinion is advanced that % phrase "I think" 184 | the predominate number of % phrase "most" 185 | the question as to whether % phrase "whether" 186 | the reason is because % phrase "because" 187 | the vast majority of % phrase "most" or "almost all" 188 | there is a reason to believe % phrase "I think" 189 | they are the investigators % phrase "they" 190 | this result would seem to indicate % phrase "the result indicates" 191 | results seem to indicate % phrase "the results indicate" 192 | result seems to indicate % phrase "the result indicates" 193 | through the use of % phrase "by" or "with" 194 | to the fullest possible extent % phrase "fully" 195 | transpire % phrase "happen" 196 | ultimate % phrase "last" 197 | unanimity of opinion % phrase "agreement" 198 | until such time % phrase "until" 199 | utilization % phrase "use" 200 | utilize % phrase "use" 201 | very unique % phrase "unique" 202 | was of the opinion % phrase "believed" 203 | ways and means % phrase "ways" or "means" but not both 204 | we have insufficient knowledge % phrase "we do not know" 205 | we wish to thank % phrase "we thank" 206 | what is the explanation of % phrase "why" 207 | whether or not to % phrase "whether to" 208 | with a view to % phrase "to" 209 | with reference to % phrase "about" (or leave out) 210 | with regard to % phrase "concerning" or "about" (or leave out) 211 | with respect to % phrase "about 212 | with the exception of % phrase "except" 213 | with the result that % phrase "so that" 214 | within the realm of possibility % phrase "possible" 215 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # style-check.rb 2 | 3 | The code described in this README parses latex-formatted text in search of forbidden phrases and prints error messages formatted as if from a compiler. 4 | 5 | # Why does this code exist? 6 | 7 | This code is a weapon against collaborators who would dilute your writing with ambiguous or verbose prose. It was designed to ensure that collaborative papers appear in a consistent style: mine. 8 | 9 | I think of all activities as coding. My presentations use python scripts, not powerpoint. My writing and research posters use latex and emacs, not word or publisher. When I write code, I try to be creative and sloppy, relying on tools to identify most of my mistakes. (For example, gcc issues warnings, splint can verify some memory processes, and custom scripts can identify simple portability problems.) When writing text, I had no such tools. 10 | 11 | The style checker is one such tool. When I notice a mistake that can be identified by a regular expression, I add a forbidden expression to the style checker's ruleset. Then, when I build my latex-formatted paper, I run the style checker to seek out such phrases. 12 | 13 | It has saved me from submitting gramatically-sloppy last-minute edits. 14 | 15 | Like the warnings printed by a compiler, errors from the style checker should not be taken literally. Use your own judgement to correct sentences: make them shorter, more specific, and more varied. I cannot advise you to rely on this tool in the way I do; my approach to writing is not necessarily a good one for anyone. 16 | 17 | # How does it work? 18 | 19 | The style checker is a ruby script that seeks out files in directories /etc/style-check.d or ~/.style-check.d, or files named ~/.style-censor or ./style-censor. Each file is a list of expressions in one of four types, annotated with a justification. See the existing files for examples. 20 | 21 | ## Type 1: Syntax 22 | 23 | Syntax expressions are matched exactly. They are case-sensitive. Any regular expression will do. As a hint, "\b" will match some non-word character, like a space or newline. 24 | 25 |
[ ], % syntax whitespace before comma seems wrong. 26 | ''[\.,] % syntax end quotes go outside punctuation like . and , 27 | [ ]-[ ] % syntax a hyphen surrounded by space should probably be an emdash '---' 28 |29 | 30 | ## Type 2: Capitalize 31 | 32 | Capitalize expressions match whole words, and are case-sensitive. Such expressions are designed to help maintain uniformity of capitalization of product and project names, like PlanetLab, Scriptroute, CoDeeN, iPod, etc. They are transparently wrapped with "\b"s to ensure that only whole words are matched. 33 | 34 |
Planetlab % capitalize PlanetLab 35 | planetlab % capitalize PlanetLab 36 | ccdf % capitalize 37 | cisco % capitalize the company name 38 | internet % capitalize unless talking about an internet other than the Internet 39 | ttl % capitalize 40 |41 | 42 | ## Type 3: Phrase 43 | 44 | Phrases match longer phrases such as "the foreseeable future" or ["at the end of the day"](http://www.plainenglish.co.uk/pressrelease.html). As with capitalize expressions, they are transparently wrapped with "\b"s, but are not case sensitive. Some phrases that should be forbidden include double words. 45 | 46 |
[^r][^c][^h] impact % phrase "effect", "result", though nsf likes "research impact" 47 | absolutely essential % phrase essential 48 | few in number % phrase few 49 | the the % phrase apparent double word. 50 | (quite|more|very|most) unique % phrase unique is. 51 | a large number of % phrase you mean "many" 52 | the way in which % phrase should be "how" or "" 53 | live in a vacuum % phrase a tired metaphor that makes me want to vomit. 54 |55 | 56 | ## Type 4: Spelling 57 | 58 | Spelling expressions are internally handled just like phrases. These are useful for common misspellings or typo's. Perhaps you habitually misspell lose as loose and would prefer to have a checker complain. I habitually misspell measurment, secrurity, and experiements. 59 | 60 |
experiements % spelling 61 | measurment % spelling 62 | secrurity % spelling 63 | taht % spelling 64 | teh % spelling 65 | privledge % spelling "privilege" I misspell it every way possible. 66 | privlege % spelling "privilege" I misspell it every way possible. 67 | priviledge % spelling "privilege" I misspell it every way possible. 68 | queueing % spelling I'd love to spell it this way, but spellchecker whines. 69 |70 | 71 | ## Type -1: Ignored Commands 72 | 73 | Ignore the parameter to this command. If only spell checkers were this cool. The standard ignored commands are \begin, \end, \url, \cite, \ref, \label, and a few others. You can extend this in ./censor-dict with a personal dictionary that might include, for example \todo or \hostname. The internal implementation of ignored commands is to "replace" them with ~ (the non-breaking space character) before the rest of the rules are checked, so it is possible that other rules may need to take this into account. 74 | 75 |
todo % ignoredcommand 76 | texttt % ignoredcommand 77 |78 | 79 | ## Built-in checking 80 | 81 | In addition to configurable rules, the style checker also seeks out common errors within the LaTeX source itself: 82 | 83 | * an unescaped percent-sign directly following a number is frequently an error. 84 | * a \cite{} tag should precede (not follow) a period. 85 | * a \cite{} tag should not be used obviously as a noun in the middle of a sentence. 86 | * paragraphs should end with the end of a sentence. 87 | 88 | Comments using \begin{comment} and \end{comment} from comment.sty are skipped. 89 | 90 | Math mode between unescaped $'s is skipped. 91 | 92 | For more detail, read the ruby code. It's shorter than this file. 93 | 94 | # How do I use it? 95 | 96 | From the style-check-(version) directory, run 97 | sudo make install 98 | to install as the superuser. As an alternative, 99 | make user-install 100 | will put the ruleset in your home-directory, but putting the style-check.rb script in your path is up to you. 101 | 102 | To run the script, 103 | style-check.rb *.tex 104 | 105 | Or, if you'd like a little justification with your scolding, 106 | style-check.rb -v *.tex 107 | 108 | # Limitations 109 | 110 | This is not a proof-reader, editor, spelling checker, or grammar checker. It can catch only some simple, common, frustrating mistakes. It is not a substitute for reading what I've listed below. It is intended only for LaTeX files. 111 | 112 | This code will not teach you to use "that" and "which" properly. It will not teach you to hyphenate. It may be used for evil. You may think my rules are stupid. 113 | 114 | There are many bugs in the code; it is not guaranteed that the style checker will find all forbidden phrases. It may become confused by nested environments. 115 | 116 | # Attitude 117 | 118 | Don't ask me to add a feature. Send me a patch. 119 | 120 | Don't complain that it's written in Ruby. My language kicks your language's ass. 121 | 122 | Don't complain about the ruleset. Invent a mechanism to override ones you don't care for. 123 | 124 | # Further Reading 125 | 126 | This section is split into two categories -- entertainment for reading that is light and fun and should help you think about writing better, and reference that may help answer harder questions. 127 | 128 | ## Entertainment 129 | 130 | The Elements of Style, by Strunk and White 131 | [http://www.bartleby.com/141/](http://www.bartleby.com/141/) 132 | 133 | Woe is I: The Grammarphobe's Guide to Better English in Plain English, by Patricia T. O'Conner. 134 | 135 | Lake Superior State University Banished Words List 136 | [http://www.lssu.edu/banished/](http://www.lssu.edu/banished/) 137 | 138 | Usage in The American Heritage Dictionary 139 | [http://www.bartleby.com/61/7.html](http://www.bartleby.com/61/7.html) 140 | 141 | alt.usage.english FAQ 142 | [http://alt-usage-english.org/fast_faq.shtml](http://alt-usage-english.org/fast_faq.shtml) 143 | 144 | How To Write A Dissertation, by Doug Comer 145 | [http://www.cs.purdue.edu/homes/dec/essay.dissertation.html](http://www.cs.purdue.edu/homes/dec/essay.dissertation.html) 146 | 147 | Plain English Campaign 148 | [http://www.plainenglish.co.uk/](http://www.plainenglish.co.uk/) 149 | 150 | Thesis Errors 151 | [https://core.ecu.edu/wuenschk/Help/ThesisDiss/therr.htm](https://core.ecu.edu/wuenschk/Help/ThesisDiss/therr.htm) 152 | 153 | How to Avoid Colloquial (Informal) Writing 154 | [http://www.wikihow.com/Avoid-Colloquial-%28Informal%29-Writing](http://www.wikihow.com/Avoid-Colloquial-%28Informal%29-Writing) 155 | 156 | Henning Schulzrinne's Notes 157 | [http://www.cs.columbia.edu/~hgs/etc/writing-style.html](http://www.cs.columbia.edu/~hgs/etc/writing-style.html) 158 | 159 | ## Reading that takes work (and reference) 160 | 161 | Rules for Writers, by Diana Hacker. 162 | 163 | The New Oxford Guide to Writing, by Thomas S. Kane. 164 | 165 | Line by Line: How to Edit Your Own Writing, by Claire Cook. 166 | 167 | ## Related Code 168 | 169 | Michael Haardt wrote GNU [diction](http://www.gnu.org/software/diction/diction.html), which is similar in that it finds and complains about bad phrases, but different in that it also notes questionable phrases (such as any use of "affect") and does not expect to check LaTeX source. Style-check focuses on forbidden phrases and common typographic errors in LaTeX code. 170 | 171 | ## To install 172 | 173 |
174 | gem install style-check 175 |176 | [http://www.cs.umd.edu/~nspring/software/style-check-current.tar.gz](http://www.cs.umd.edu/~nspring/software/style-check-current.tar.gz) 177 | 178 | # Thanks 179 | 180 | Kurt Partridge for encouraging me to release this thing. 181 | 182 | Vibha Sazawal for reminding me often that there is more to writing than style. 183 | 184 | Rich Wolski for introducing me to Strunk and White, the gateway drug. 185 | 186 | Jacob Martin reported the first bug, packaged style-check for [gentoo](https://packages.gentoo.org/packages/dev-tex/style-check), and contributed a ruleset based on [Day and Gastel, "How to Write and Publish a Scientific Paper"](http://www.amazon.com/How-Write-Publish-Scientific-Paper/dp/0313330271). 187 | 188 | Indika Meedeniya noticed a few more bugs and suggested compatibility with gedit. 189 | 190 | Rudolf Mühlbauer suggested: 191 | 192 | > I use it in conjunction with vim [:make | copen]: 193 | > 194 | >
~/.vim/ftplugin/tex.vim: 195 | > set makeprg=~/opt/style-check-0.14/style-check.rb\ -v\ % 196 | >197 | 198 | Vinícius Vielmo Cogo provided an html output scheme. 199 | 200 | * * * 201 | 202 | [Neil Spring](mailto:nspring@cs.umd.edu) 203 | -------------------------------------------------------------------------------- /README.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
The code described in this README parses 6 | latex-formatted text in search of forbidden phrases and 7 | prints error messages formatted as if from a compiler. 8 | 9 |
This code is a weapon against collaborators who would 12 | dilute your writing with ambiguous or verbose prose. It 13 | was designed to ensure that collaborative papers appear 14 | in a consistent style: mine. 15 | 16 |
I think of all activities as coding. My 17 | presentations use python scripts, not powerpoint. My 18 | writing and research posters use latex and emacs, not 19 | word or publisher. When I write code, I try to be 20 | creative and sloppy, relying on tools to identify most 21 | of my mistakes. (For example, gcc issues warnings, 22 | splint can verify some memory processes, and custom 23 | scripts can identify simple portability problems.) When 24 | writing text, I had no such tools. 25 | 26 |
The style checker is one such tool. When I notice a 27 | mistake that can be identified by a regular expression, 28 | I add a forbidden expression to the style checker's 29 | ruleset. Then, when I build my latex-formatted paper, I 30 | run the style checker to seek out such phrases. 31 | 32 |
It has saved me from submitting gramatically-sloppy 33 | last-minute edits. 34 | 35 |
Like the warnings printed by a compiler, errors from 36 | the style checker should not be taken literally. Use 37 | your own judgement to correct sentences: make them 38 | shorter, more specific, and more varied. I cannot 39 | advise you to rely on this tool in the way I do; my 40 | approach to writing is not necessarily a good one for 41 | anyone. 42 | 43 |
55 | [ ], % syntax whitespace before comma seems wrong. 56 | ''[\.,] % syntax end quotes go outside punctuation like . and , 57 | [ ]-[ ] % syntax a hyphen surrounded by space should probably be an emdash '---' 58 |59 | 60 |
69 | Planetlab % capitalize PlanetLab 70 | planetlab % capitalize PlanetLab 71 | ccdf % capitalize 72 | cisco % capitalize the company name 73 | internet % capitalize unless talking about an internet other than the Internet 74 | ttl % capitalize 75 |76 | 77 |
86 | [^r][^c][^h] impact % phrase "effect", "result", though nsf likes "research impact" 87 | absolutely essential % phrase essential 88 | few in number % phrase few 89 | the the % phrase apparent double word. 90 | (quite|more|very|most) unique % phrase unique is. 91 | a large number of % phrase you mean "many" 92 | the way in which % phrase should be "how" or "" 93 | live in a vacuum % phrase a tired metaphor that makes me want to vomit. 94 |95 | 96 |
104 | experiements % spelling 105 | measurment % spelling 106 | secrurity % spelling 107 | taht % spelling 108 | teh % spelling 109 | privledge % spelling "privilege" I misspell it every way possible. 110 | privlege % spelling "privilege" I misspell it every way possible. 111 | priviledge % spelling "privilege" I misspell it every way possible. 112 | queueing % spelling I'd love to spell it this way, but spellchecker whines. 113 |114 | 115 |
128 | todo % ignoredcommand 129 | texttt % ignoredcommand 130 |131 | 132 |
In addition to configurable rules, the style checker 134 | also seeks out common errors within the LaTeX source 135 | itself:
Comments using \begin{comment} and \end{comment} from 146 | comment.sty are skipped. 147 | 148 |
Math mode between unescaped $'s is skipped. 149 | 150 |
For more detail, read the ruby code. It's shorter 151 | than this file. 152 | 153 |
To run the script,
164 | style-check.rb *.tex
165 |
166 |
Or, if you'd like a little justification with your scolding,
167 | style-check.rb -v *.tex
168 |
169 |
This code will not teach you to use "that" and 176 | "which" properly. It will not teach you to hyphenate. 177 | It may be used for evil. You may think my rules are 178 | stupid. 179 | 180 |
There are many bugs in the code; it is not guaranteed 181 | that the style checker will find all forbidden phrases. It 182 | may become confused by nested environments. 183 | 184 | 185 |
Don't ask me to add a feature. Send me a patch. 188 | 189 |
Don't complain that it's written in Ruby. My 190 | language kicks your language's ass. 191 | 192 |
Don't complain about the ruleset. Invent a mechanism 193 | to override ones you don't care for. 194 | 195 |
Woe is I: The Grammarphobe's Guide to Better English in Plain English, by Patricia T. O'Conner. 205 | 206 |
Lake Superior State University Banished Words List
207 | http://www.lssu.edu/banished/
208 |
209 |
Usage in The American Heritage Dictionary
210 | http://www.bartleby.com/61/7.html
211 |
212 |
alt.usage.english FAQ
213 | http://alt-usage-english.org/fast_faq.shtml
214 |
215 |
How To Write A Dissertation, by Doug Comer
216 | http://www.cs.purdue.edu/homes/dec/essay.dissertation.html
217 |
218 |
Plain English Campaign
219 | http://www.plainenglish.co.uk/
220 |
221 |
Thesis Errors
222 | http://core.ecu.edu/psyc/wuenschk/therr.htm
223 |
224 |
How to Avoid Colloquial (Informal) Writing
225 | http://www.wikihow.com/Avoid-Colloquial-%28Informal%29-Writing
226 |
227 |
Henning Schulzrinne's Notes
Rules for Writers, by Diana Hacker. 232 |
The New Oxford Guide to Writing, by Thomas S. Kane. 233 |
Line by Line: How to Edit Your Own Writing, by Claire Cook. 234 | 235 | 236 |
Michael Haardt wrote GNU diction, 239 | which is similar in that it finds and complains about 240 | bad phrases, but different in that it also notes 241 | questionable phrases (such as any use of "affect") and 242 | does not expect to check LaTeX source. Style-check 243 | focuses on forbidden phrases and common typographic 244 | errors in LaTeX code. 245 | 246 |
Kurt Partridge for encouraging me to release this thing.
251 |Vibha Sazawal for reminding me often that there is more to writing than style.
252 |Rich Wolski for introducing me to Strunk and White, the gateway drug.
253 |Jacob Martin reported the first bug, packaged style-check for gentoo, and contributed a ruleset based 254 | on Day 255 | and Gastel, "How to Write and Publish a Scientific Paper".
256 |Indika Meedeniya noticed a few more bugs and suggested compatibility with gedit.
257 |Rudolf Mühlbauer suggested:
258 | I use it in conjunction with vim [:make | copen]: 259 |264 | 265 |260 | ~/.vim/ftplugin/tex.vim: 261 | set makeprg=~/opt/style-check-0.14/style-check.rb\ -v\ % 262 |263 |
| File | "+file.to_s+" (line: "+linenum.to_s 162 | puts ", column: "+column.to_s if column 163 | puts ") |
|---|---|
| Original | %s |
| Problem | %s |
| Solution | %s |
| Trigger | %s |
This HTML was generated by a modified version of style-check.rb software.
\n\n" 374 | EOF 375 | puts web_trailer 376 | end 377 | 378 | exit $exit_status 379 | -------------------------------------------------------------------------------- /COPYING: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc. 5 | 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Library General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | 282 | How to Apply These Terms to Your New Programs 283 | 284 | If you develop a new program, and you want it to be of the greatest 285 | possible use to the public, the best way to achieve this is to make it 286 | free software which everyone can redistribute and change under these terms. 287 | 288 | To do so, attach the following notices to the program. It is safest 289 | to attach them to the start of each source file to most effectively 290 | convey the exclusion of warranty; and each file should have at least 291 | the "copyright" line and a pointer to where the full notice is found. 292 | 293 |