John Jason Jordan wrote:
On Sun, 05 Oct 2008 01:35:19 +0100
Harold Fuchs <[EMAIL PROTECTED]> dijo:

On 04/10/2008 18:04, John Jason Jordan wrote:
On Sat, 4 Oct 2008 09:57:01 +0100
"Harold Fuchs" <[EMAIL PROTECTED]> dijo:

If OOo 3.0 does not have a real title case feature for English, I have
a suggestion for a simple workaround. It turns out that the
"unimportant" words are a short list - a couple hundred at the max. So
we could create a macro which would (1) capitalize the first letter of
all words in a selection of text and then (2) search for each of the
"unimportant" words and uncapitalize it. This macro could then be added
to the user's toolbar. I've thought of recording the macro and then
editing it to add the list of "unimportant" words, but I've been too
busy to get around to it.

As I said "It has a list of "stop words" built in which can easily be changed to 
suit ...".
You found the list.

It's way more complicated than just making a list of "stop" words.
As I noted earlier, most style manuals require the last word of the
title to be capitalized even if it is a "stop" word. Ditto for the
first word of the title. And then there are titles with colons in them,
where the first word after the colon must be capitalized even if it is
a "stop" word.

I thought I'd try to record a macro to do this. My plan was to record
the macro using just one "stop" word, and at the end move the cursor to
the beginning of the selection, select the next character and
capitalize it, then to the end and search backwards for a space, select
the next character forward and capitalize it, then search for a colon
and if found, move forward on space, select the next character and
capitalize it. When the macro was recorded then I planned to inspect
the code and duplicate the search and replace for the "stop" word that
I used by adding other "stop" words.  But I failed when I discovered I
couldn't search and replace within selected text only. Bah. I'll just
wait until 3.0 comes out and see if I can get the big one working that
Gene Kohlenberg got working on 3.0.

I'd be interested to hear from you if you think it works as you clearly have more experience in this area than I do.

Sadly, I know what the macro has to do; I just don't know how to write
code.

By "it works" I meant that the macro ran without crashing. I found that the macro was set to use lower case for some verbs and pronouns that the web site Writers Block confirmed should have been capitalized. So I went into the list and deleted them. I would still review the title after running the macro to make sure that the results were what I expected. It's much faster than having to change case manually.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to