Discussion:
Text string in title case?
(too old to reply)
Tina Ricks
2008-02-27 23:13:50 UTC
Permalink
Hi all,



I'm trying to put many text strings (book titles) throughout a long book
into title case. I need to do this at the character level, not the
paragraph. For example, changing



THE TITLE OF THIS BOOK



to



The Title of This Book



So. it needs to have some logic, i.e. knows to skip conjunctions like "of"
and "and" etc.



I can see in the character designer how to change a set of characters to
small caps, lowercase, or uppercase. Does anyone know of a way to make this
ability go one step further and become title case?



Tina Ricks

Editor

Trial Guides, LLC

***@trialguides.com
Mike Wickham
2008-02-28 00:02:28 UTC
Permalink
I must be misunderstanding you because it sounds like a simple Find/Change
would do it.

1. In the Find/Change dialogue box, set Find to Text: "The Title of This
Book." Make sure the "Consider Case" checkbox is unchecked and Find/Change
will find the phrase no matter what case it is.

2. In the Find/Change dialogue box, set Change to Text: "The Title of This
Book" (capitalized the way you want). That will do it. Of course, if you've
set "Small Caps," "Uppercase," or "Lowercase" in the Paragraph Format or
Character Format that contains the phrase, the setting will override the
intended result.

3. In the Find/Change dialogue, be sure that "Book" is selected. Then hit
Find.

Mike Wickham

----- Original Message -----
From: "Tina Ricks" <***@verizon.net>
To: <***@lists.frameusers.com>
Sent: Wednesday, February 27, 2008 5:13 PM
Subject: Text string in title case?
Post by Tina Ricks
Hi all,
I'm trying to put many text strings (book titles) throughout a long book
into title case. I need to do this at the character level, not the
paragraph. For example, changing
THE TITLE OF THIS BOOK
to
The Title of This Book
So. it needs to have some logic, i.e. knows to skip conjunctions like "of"
and "and" etc.
I can see in the character designer how to change a set of characters to
small caps, lowercase, or uppercase. Does anyone know of a way to make this
ability go one step further and become title case?
Tina Ricks
Editor
Trial Guides, LLC
_______________________________________________
To unsubscribe send a blank email to
or visit
http://lists.frameusers.com/mailman/options/framers/mewickham%40compuserve.com
http://www.frameusers.com/ for more resources and info.
Tina Ricks
2008-02-28 00:34:57 UTC
Permalink
Sorry... I wasn't clear. Search/replace won't work.

It's lots and lots of different book titles, all throughout a 600 page
manuscript. This is a legal textbook with loads of footnotes, which contain
references to many other works. The previous author set all the book titles
in all caps, now they need to be cap/lowercase (title case).

So a search/replace doesn't work. I'm trying to avoid retyping all these
titles. Seems like the best so far is to change the case to lower, and
retype the initial caps where needed.

Tina Ricks

-----Original Message-----
From: Mike Wickham [mailto:***@compuserve.com]
Sent: Wednesday, February 27, 2008 4:02 PM
To: Tina Ricks; Frame Users
Subject: Re: Text string in title case?

I must be misunderstanding you because it sounds like a simple Find/Change
would do it.

1. In the Find/Change dialogue box, set Find to Text: "The Title of This
Book." Make sure the "Consider Case" checkbox is unchecked and Find/Change
will find the phrase no matter what case it is.

2. In the Find/Change dialogue box, set Change to Text: "The Title of This
Book" (capitalized the way you want). That will do it. Of course, if you've
set "Small Caps," "Uppercase," or "Lowercase" in the Paragraph Format or
Character Format that contains the phrase, the setting will override the
intended result.

3. In the Find/Change dialogue, be sure that "Book" is selected. Then hit
Find.

Mike Wickham

----- Original Message -----
From: "Tina Ricks" <***@verizon.net>
To: <***@lists.frameusers.com>
Sent: Wednesday, February 27, 2008 5:13 PM
Subject: Text string in title case?
Post by Tina Ricks
Hi all,
I'm trying to put many text strings (book titles) throughout a long book
into title case. I need to do this at the character level, not the
paragraph. For example, changing
THE TITLE OF THIS BOOK
to
The Title of This Book
So. it needs to have some logic, i.e. knows to skip conjunctions like "of"
and "and" etc.
I can see in the character designer how to change a set of characters to
small caps, lowercase, or uppercase. Does anyone know of a way to make this
ability go one step further and become title case?
Tina Ricks
Editor
Trial Guides, LLC
_______________________________________________
To unsubscribe send a blank email to
or visit
http://lists.frameusers.com/mailman/options/framers/mewickham%40compuserve.c
om
Post by Tina Ricks
http://www.frameusers.com/ for more resources and info.
Mike Wickham
2008-02-28 04:23:35 UTC
Permalink
Post by Tina Ricks
Sorry... I wasn't clear. Search/replace won't work.
It's lots and lots of different book titles, all throughout a 600 page
manuscript. This is a legal textbook with loads of footnotes, which contain
references to many other works. The previous author set all the book titles
in all caps, now they need to be cap/lowercase (title case).
So a search/replace doesn't work. I'm trying to avoid retyping all these
titles. Seems like the best so far is to change the case to lower, and
retype the initial caps where needed.
The only idea I can come up with is a wildcard search. In the Find/Change
dialogue check "Consider Case" and "Use Wildcards." Then search for
[A-Z][A-Z][A-Z]. This will find all instances of three capital letters in a
row (and assumes no book titles have less than three capital letters). If
you know the shortest number of characters in a book title, you might add
more [A-Z] entries to eliminate finding ISBN and other acronyms. Anyway, the
wildcard search will find the book titles, but leave you stuck changing
their case manually. Maybe some of the better minds here will have an idea
how to do that.

See help for "Finding and changing " and "Searching for special characters
and nonprinting symbols" for more information.

Mike Wickham
rebecca officer
2008-02-28 05:41:02 UTC
Permalink
I'm using an old version of Shlomo Perets' extremely useful expanded toolbar and it has a button to change the selected string to sentence case. It says the keyboard shortcut is Alt+F2. That may be generic on all systems, even those without the toolbar. If so, you could use Mike's wildcard search to select each title and then Alt+F2 to change them. A lot quicker than retyping!

Cheers, Rebecca
Post by Tina Ricks
Sorry... I wasn't clear. Search/replace won't work.
It's lots and lots of different book titles, all throughout a 600 page
manuscript. This is a legal textbook with loads of footnotes, which contain
references to many other works. The previous author set all the book titles
in all caps, now they need to be cap/lowercase (title case).
So a search/replace doesn't work. I'm trying to avoid retyping all these
titles. Seems like the best so far is to change the case to lower, and
retype the initial caps where needed.
The only idea I can come up with is a wildcard search. In the Find/Change
dialogue check "Consider Case" and "Use Wildcards." Then search for
[A-Z][A-Z][A-Z]. This will find all instances of three capital letters in a
row (and assumes no book titles have less than three capital letters). If
you know the shortest number of characters in a book title, you might add
more [A-Z] entries to eliminate finding ISBN and other acronyms. Anyway, the
wildcard search will find the book titles, but leave you stuck changing
their case manually. Maybe some of the better minds here will have an idea
how to do that.

See help for "Finding and changing " and "Searching for special characters
and nonprinting symbols" for more information.

Mike Wickham


_______________________________________________


You are currently subscribed to Framers as ***@alliedtelesis.co.nz.

Send list messages to ***@lists.frameusers.com.

To unsubscribe send a blank email to
framers-***@lists.frameusers.com
or visit http://lists.frameusers.com/mailman/options/framers/rebecca.officer%40alliedtelesis.co.nz

Send administrative questions to ***@frameusers.com. Visit
http://www.frameusers.com/ for more resources and info.

NOTICE: This message contains privileged and confidential
information intended only for the use of the addressee
named above. If you are not the intended recipient of
this message you are hereby notified that you must not
disseminate, copy or take any action in reliance on it.
If you have received this message in error please
notify Allied Telesis Labs Ltd immediately.
Any views expressed in this message are those of the
individual sender, except where the sender has the
authority to issue and specifically states them to
be the views of Allied Telesis Labs.
Art Campbell
2008-02-28 12:15:25 UTC
Permalink
Cool.
I'm not sure it's in the manual, but I think it's in the QRC in the
online documents directory.

Art
It works! Hooray! You're a hero.
Where did you find the Alt+Ctrl+C in the Frame manual?
-----Original Message-----
Sent: Wednesday, February 27, 2008 7:59 PM
To: Tina Ricks
Subject: Re: Text string in title case?
I think you can do it by searching with a wildcard string that only
lists capital letters and spaces, and then manually hitting Alt+Ctrl+c
to get the title case.
Art
Post by Tina Ricks
Sorry... I wasn't clear. Search/replace won't work.
It's lots and lots of different book titles, all throughout a 600 page
manuscript. This is a legal textbook with loads of footnotes, which
contain
Post by Tina Ricks
references to many other works. The previous author set all the book
titles
Post by Tina Ricks
in all caps, now they need to be cap/lowercase (title case).
So a search/replace doesn't work. I'm trying to avoid retyping all these
titles. Seems like the best so far is to change the case to lower, and
retype the initial caps where needed.
Tina Ricks
-----Original Message-----
Sent: Wednesday, February 27, 2008 4:02 PM
To: Tina Ricks; Frame Users
Subject: Re: Text string in title case?
I must be misunderstanding you because it sounds like a simple
Find/Change
Post by Tina Ricks
would do it.
1. In the Find/Change dialogue box, set Find to Text: "The Title of This
Book." Make sure the "Consider Case" checkbox is unchecked and
Find/Change
Post by Tina Ricks
will find the phrase no matter what case it is.
2. In the Find/Change dialogue box, set Change to Text: "The Title of
This
Post by Tina Ricks
Book" (capitalized the way you want). That will do it. Of course, if
you've
Post by Tina Ricks
set "Small Caps," "Uppercase," or "Lowercase" in the Paragraph Format or
Character Format that contains the phrase, the setting will override the
intended result.
3. In the Find/Change dialogue, be sure that "Book" is selected. Then hit
Find.
Mike Wickham
----- Original Message -----
Sent: Wednesday, February 27, 2008 5:13 PM
Subject: Text string in title case?
Post by Tina Ricks
Hi all,
I'm trying to put many text strings (book titles) throughout a long
book
Post by Tina Ricks
Post by Tina Ricks
into title case. I need to do this at the character level, not the
paragraph. For example, changing
THE TITLE OF THIS BOOK
to
The Title of This Book
So. it needs to have some logic, i.e. knows to skip conjunctions like
"of"
Post by Tina Ricks
Post by Tina Ricks
and "and" etc.
I can see in the character designer how to change a set of characters
to
Post by Tina Ricks
Post by Tina Ricks
small caps, lowercase, or uppercase. Does anyone know of a way to make this
ability go one step further and become title case?
Tina Ricks
Editor
Trial Guides, LLC
_______________________________________________
To unsubscribe send a blank email to
or visit
http://lists.frameusers.com/mailman/options/framers/mewickham%40compuserve.c
Post by Tina Ricks
om
Post by Tina Ricks
http://www.frameusers.com/ for more resources and info.
_______________________________________________
To unsubscribe send a blank email to
or visit
http://lists.frameusers.com/mailman/options/framers/art.campbell%40gmail.com
Post by Tina Ricks
http://www.frameusers.com/ for more resources and info.
--
Art Campbell
"... In my opinion, there's nothing in this world beats a '52
Vincent and a redheaded girl." -- Richard Thompson
No disclaimers apply.
DoD 358
--
Art Campbell

***@gmail.com
"... In my opinion, there's nothing in this world beats a '52
Vincent and a redheaded girl." -- Richard Thompson
No disclaimers apply.
DoD 358
Paul Findon
2008-02-29 16:33:13 UTC
Permalink
Hi Tina,

This is impossible with FrameMaker alone. I thought perhaps Spell
Catcher could handle it, as it does have commands for changing case
to Title style, but even that simply capitalises the first letter of
each word.

A job for AppleScript perhaps? (NG to you unless you use Mac
FrameMaker.)

I found a script at <http://bbs.applescript.net/viewtopic.php?
id=13297> that, in addition to changing case to Title style, can also
set a bunch of specified definite and indefinite articles,
conjunctions, and prepositions that don't start a sentence to
lowercase. Something the script author has called "Mixed" style.

I'm not a programmer, but with a little head scratching, I managed to
edit this script so that it searches an open FrameMaker document and
changes all paragraphs tagged "Heading1" or whatever you like to
Mixed style. Works a treat!

Incidentally, for Title style (or what CMOS calls "Headline" style),
do you follow the Microsoft style of not capitalising prepositions of
four or fewer letters. Or Apple's style of not capitalising
prepositions of three or fewer letters. Or CMOS's recommendation of
lowercasing prepositions regardless of length?

Styles - you gotta love 'em.

Paul
Post by Tina Ricks
Hi all,
I'm trying to put many text strings (book titles) throughout a long book
into title case. I need to do this at the character level, not the
paragraph. For example, changing
THE TITLE OF THIS BOOK
to
The Title of This Book
So. it needs to have some logic, i.e. knows to skip conjunctions like "of"
and "and" etc.
I can see in the character designer how to change a set of
characters to
small caps, lowercase, or uppercase. Does anyone know of a way to make this
ability go one step further and become title case?
Tina Ricks
Editor
Trial Guides, LLC
Rick Quatro
2008-02-29 16:47:51 UTC
Permalink
Hi Paul,

For Windows FrameMaker, you can use FrameScript. If anyone is interested in
a script like this, please contact me offlist. Thanks.

Rick Quatro
Carmen Publishing
585-659-8267
www.frameexpert.com
Post by Paul Findon
Hi Tina,
This is impossible with FrameMaker alone. I thought perhaps Spell
Catcher could handle it, as it does have commands for changing case
to Title style, but even that simply capitalises the first letter of
each word.
A job for AppleScript perhaps? (NG to you unless you use Mac
FrameMaker.)
I found a script at <http://bbs.applescript.net/viewtopic.php?
id=13297> that, in addition to changing case to Title style, can also
set a bunch of specified definite and indefinite articles,
conjunctions, and prepositions that don't start a sentence to
lowercase. Something the script author has called "Mixed" style.
I'm not a programmer, but with a little head scratching, I managed to
edit this script so that it searches an open FrameMaker document and
changes all paragraphs tagged "Heading1" or whatever you like to
Mixed style. Works a treat!
Incidentally, for Title style (or what CMOS calls "Headline" style),
do you follow the Microsoft style of not capitalising prepositions of
four or fewer letters. Or Apple's style of not capitalising
prepositions of three or fewer letters. Or CMOS's recommendation of
lowercasing prepositions regardless of length?
Styles - you gotta love 'em.
Paul
Peter Gold
2008-02-29 17:03:51 UTC
Permalink
In the days of FM/unix, before book-wide search/replace and other
come-lately power features, something like this would be done with
fmbatch and one or more of GREP, AWK, and SED text-manipulation tools.

The general plan was to use control fmbatch with a unix script to
convert all appropriate .fm files to MIF, then perform the
text-crunching on the MIF files, then reconvert the MIF files back to
.fm with fmbatch.

If there's enough volume to repay the effort, something similar would
work today with mif2go from omsys.com, dobatch from cudspan, dzbatcher
from datazone.com, or FM2MIF (a new free utility that installs under
FM's File > Utilities menu option, from dtptools.com, to convert
directories-full of .fm files to MIF). I believe mif2go's MIF
converter is free; dobatch and dzbatcher are free. All but FM2MIF work
like fmbatch.

Instead of the unix tools, Perl or other newer text-manglers can do
the find/replace, perhaps with the assistance of GREP.

Converting .fm to MIF is the first step.

The second step would be to find all the ALL CAPS titles in all the
MIFs, collect them into a single-column list from which you can remove
the duplicates, and create a second column with the precise conversion
for each title - this would settle style issues over which title words
to make all lowercase, etc.

The third step would be to find and replace every instance of the
uppercase titles with their title cased partner in the MIF, without
damaging the MIF file's integrity. This may take some care in cases
where the titles break across lines, etc.

Finally, you'd use one of the fmbatch-replacements to reconstruct .fm
files from the MIFs.

I'm not a coder or scripter. Heck, my long-term and short-term memory
aren't that good anymore. BUT, it's hard to forget a proven tool-chain
process like this.<G>

HTH
Regards,

Peter
_______________________________
Peter Gold
KnowHow ProServices
Post by Paul Findon
Hi Tina,
This is impossible with FrameMaker alone. I thought perhaps Spell
Catcher could handle it, as it does have commands for changing case
to Title style, but even that simply capitalises the first letter of
each word.
A job for AppleScript perhaps? (NG to you unless you use Mac
FrameMaker.)
I found a script at <http://bbs.applescript.net/viewtopic.php?
id=13297> that, in addition to changing case to Title style, can also
set a bunch of specified definite and indefinite articles,
conjunctions, and prepositions that don't start a sentence to
lowercase. Something the script author has called "Mixed" style.
I'm not a programmer, but with a little head scratching, I managed to
edit this script so that it searches an open FrameMaker document and
changes all paragraphs tagged "Heading1" or whatever you like to
Mixed style. Works a treat!
Incidentally, for Title style (or what CMOS calls "Headline" style),
do you follow the Microsoft style of not capitalising prepositions of
four or fewer letters. Or Apple's style of not capitalising
prepositions of three or fewer letters. Or CMOS's recommendation of
lowercasing prepositions regardless of length?
Styles - you gotta love 'em.
Paul
Post by Tina Ricks
Hi all,
I'm trying to put many text strings (book titles) throughout a long book
into title case. I need to do this at the character level, not the
paragraph. For example, changing
THE TITLE OF THIS BOOK
to
The Title of This Book
So. it needs to have some logic, i.e. knows to skip conjunctions like "of"
and "and" etc.
I can see in the character designer how to change a set of
characters to
small caps, lowercase, or uppercase. Does anyone know of a way to make this
ability go one step further and become title case?
Tina Ricks
Editor
Trial Guides, LLC
Rick Quatro
2008-02-29 17:36:20 UTC
Permalink
Hi Peter,

This is one of the strengths of MIF: that you can get an ASCII
representation of your FM document and do manipulations like this. However,
the advantage of FrameScript (and the FDK) is that you can work directly on
the FrameMaker document (or book) without risk of corrupting the MIF file.
FrameScript has built-in string functions as well as the ability to use
regular expressions.

I recently did a TitleCase script that used an INI file for exceptions, both
for acronyms that should stay uppercase and words that should be lowercase.

[Upper]
ADA=
II=
III=
IV=
HVAC=
TV=
XY=
UCLA=
ICU=
PA=
HUCLA=
USC=
LAC=

[Lower]
and=
to=

The script could be restricted to processing particular paragraph formats in
order to limit its scope. Another useful feature is that each paragraph that
is changed can be written to a hyperlinked log file. This would allow you to
check what was actually changed, and to jump to a changed paragraph if
necessary.

Depending on the scope of a problem, sometimes you have to fix things like
this by hand. However, for anyone that uses FrameMaker on a near daily
basis, FrameScript is definitely worthwhile to learn. I am amazed by how
much people do "by hand" with FrameMaker.

Rick Quatro
Carmen Publishing
585-659-8267
www.frameexpert.com
Post by Peter Gold
In the days of FM/unix, before book-wide search/replace and other
come-lately power features, something like this would be done with
fmbatch and one or more of GREP, AWK, and SED text-manipulation tools.
The general plan was to use control fmbatch with a unix script to
convert all appropriate .fm files to MIF, then perform the
text-crunching on the MIF files, then reconvert the MIF files back to
.fm with fmbatch.
If there's enough volume to repay the effort, something similar would
work today with mif2go from omsys.com, dobatch from cudspan, dzbatcher
from datazone.com, or FM2MIF (a new free utility that installs under
FM's File > Utilities menu option, from dtptools.com, to convert
directories-full of .fm files to MIF). I believe mif2go's MIF
converter is free; dobatch and dzbatcher are free. All but FM2MIF work
like fmbatch.
Instead of the unix tools, Perl or other newer text-manglers can do
the find/replace, perhaps with the assistance of GREP.
Converting .fm to MIF is the first step.
The second step would be to find all the ALL CAPS titles in all the
MIFs, collect them into a single-column list from which you can remove
the duplicates, and create a second column with the precise conversion
for each title - this would settle style issues over which title words
to make all lowercase, etc.
The third step would be to find and replace every instance of the
uppercase titles with their title cased partner in the MIF, without
damaging the MIF file's integrity. This may take some care in cases
where the titles break across lines, etc.
Finally, you'd use one of the fmbatch-replacements to reconstruct .fm
files from the MIFs.
I'm not a coder or scripter. Heck, my long-term and short-term memory
aren't that good anymore. BUT, it's hard to forget a proven tool-chain
process like this.<G>
HTH
Regards,
Peter
_______________________________
Peter Gold
KnowHow ProServices
Peter Gold
2008-02-29 18:07:27 UTC
Permalink
Post by Rick Quatro
Hi Peter,
This is one of the strengths of MIF: that you can get an ASCII
representation of your FM document and do manipulations like this. However,
the advantage of FrameScript (and the FDK) is that you can work directly on
the FrameMaker document (or book) without risk of corrupting the MIF file.
FrameScript has built-in string functions as well as the ability to use
regular expressions.
I have no argument. My point was simply to mention that it's possible
to do this operation with some readily-available tools.


Regards,

Peter
_______________________________
Peter Gold
KnowHow ProServices

Continue reading on narkive:
Loading...