Marco,
I hadn't realised that it worked for all fonts -- all the better!
Good idea. Your suggestion inspired me to try and find a title-caps feature that would at least marginally be less mindless than ID's title caps. ID simply (and mindlessly) capitalises the initial letter of every word, while in fact all kinds of function words need to remain in lower case (mainly conjunctions, articles, and preposions, such as and, the, a, of, on, in, to, for). This GREP does that:
\b\l(?!((nd|he|f|n|o|y|rom|or)\b)|\b)
The GREP, using negative lookahead (?!), is pretty convoluted (with the two separate \b switches at the end, but that's to ensure that single-letter words like 'a' remain in lower case). It also therefore doesn't touch I (capital i) but that would be in upper case anyway. In this sense this expression is Anglo-centric, but it can be adapted to other languages easily (see below).
This GREP ignores, in order, and, the, if/of, in/on, to, from, and for. It may overgeneralise a bit, but that could be rectified. I don't know how title caps work in German -- is every word included? If so, ID's standard feature is ok. If not, you simply list the words that should be excluded minus the first letter. For example, to ignore aus, den, der, des, and die, just use
\b\l(?!(us|en|er|es|ie)\b)
Regards,
Peter
als Antwort auf: [#311587]
(Dieser Beitrag wurde von Peter Kahrel am 8. Sep 2007, 21:45 geändert)