I would like to have a German rule that enforces capitalization for "Trotz" in "aus Trotz" and "zum Trotz". The difficult part is that it should not match cases such as "im Gegensatz zum trotz meiner Bedenken angenommenen Vorschlag ...". I made this last example up, but I think it's pretty obvious that it is not trivial to avoid false alarms.
I have no easy solution, just two remarks: first, we will need to handle noun phrases. Not detecting noun phrases causes some false alarms. Maybe unification is enough for this? I didn't have time yet to look into it. Detecting noun phrases could be the first step to properly detect more complex structures like in your example.
Second, we don't have a "no false alarms" policy. Of course we want to avoid them, but if you check against Wikipedia and if you think the rule is more often useful than it is annoying, then the rule is okay.
Good point. I will do just that.
The wording of the error message can also be used to transfer a certain degree of uncertainty in a rule that is likely to produce false positives. I'm thinking of something like "In festen Wendungen wie 'allen Ermahnungen zum Trotz' wird 'Trotz' als Substantiv verwendet und muss daher großgeschrieben werden. Bitte beachten Sie aber den Kontext."