OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Replace existing dumb quotes with smart quotes

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Writer
View previous topic :: View next topic  
Author Message
john_h
General User
General User


Joined: 02 Mar 2005
Posts: 15

PostPosted: Thu Mar 24, 2005 3:49 am    Post subject: Replace existing dumb quotes with smart quotes Reply with quote

I have a document prepared in a text editor, with regular quotes rather than smart quotes. I'd like to replace all the regular quotes with smart quotes in OOo v2.

In Another Inferior Overpriced Word Processor (TM), I could do this using find and replace - regular quote in the find box, regular quote in the replace box, and the all quotes are replaced with the appropriate opening or closing smart quote. Tried this in OOo and it didn't work - any suggestions how I can change the quotes at once?

Smart quotes are appearing fine when I type new text, BTW.
Back to top
View user's profile Send private message
RGB
Super User
Super User


Joined: 25 Nov 2003
Posts: 1743
Location: In Lombardy, near a glass of red Tuscany wine

PostPosted: Thu Mar 24, 2005 4:08 am    Post subject: Reply with quote

The opening quotes usually comes with a space before them, and the closing ones with a character instead: if you do a search-replace using space+normal quote, and replacing it by space+custom quote, you will be able to replace the opening quotes, then, doing a search-replace using normal quotes -> custom quotes, you will be able to replace the closing ones.
Back to top
View user's profile Send private message
cmwalden
Newbie
Newbie


Joined: 02 Dec 2007
Posts: 1

PostPosted: Sun Dec 02, 2007 2:51 pm    Post subject: Here is a technique that worked for me... Reply with quote

I found a combination of search and replace that works pretty well. It would be nice to have an option to do this automatically using the same logic as the custom-quote while you type. I'm not sure what that would take. In the mean time maybe this will help.

1. Go to the first set of quotes that you can find and manually retype them to get the raw quote characters you will need.
2. Copy the opening quote.
3. Do ctrl-F for Find and enter [space]" as was suggested above for the find. In the replace put the quote character that you copied preceded by a [space]. (If you leave off the space in your replace statement you make spaces disappear.)
4. Replace all.
5. Repeat the search and replace but put \<" in the find section. Remove the trailing space from the replace statement Click the More Options button and check Regular Expression. (The \<" searches for an quotes that come at the beginning of a word, which finds the ones at the beginning of a line.)
6. Replace all.

That will replace your opening quotes for the most part. Now for the closing quotes:
1. Copy your closing quote character and go back into find.
2. Change the \<" to \>" to look for quotes at the end of a word.
3. Change your replace quote to the correct closing quote.
4. Replace all.
5. Change the find to "[space] and add a trailing space to the closing quote in the replace.
6. Uncheck Regular Expression option.
7. Replace All.

You may have a few stray quotes that need to be replaced but they can be found easily with a search.

If you need to look for single quotes the steps are the same using singles in stead of double.

It's more work than it should be, but it will help you get them all.
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Bhikkhu Pesala
Super User
Super User


Joined: 23 Aug 2005
Posts: 2324
Location: Seven Kings, London, UK

PostPosted: Sun Dec 02, 2007 8:50 pm    Post subject: Reply with quote

There is no need to use Find and Replace if you text is not yet formatted with styles. Select all, Apply the default paragraph style, Format, Autoformat,

Apply to change all of the quotes to smart quotes. Then apply body text style if you wish.

Tools, Autocorrect, Custom Quotes, Replace must be on, and the paragraph style must be "Default."
_________________
Fonts * Opera * Oo Tips * FAQ * New Forum
Oo 2.3.1 * Win XP
Back to top
View user's profile Send private message Visit poster's website
BillP
Super User
Super User


Joined: 07 Jan 2006
Posts: 2703

PostPosted: Mon Dec 03, 2007 7:28 am    Post subject: Reply with quote

Bhikkhu Pesala wrote:
There is no need to use Find and Replace if you text is not yet formatted with styles. Select all, Apply the default paragraph style, Format, Autoformat,

Apply to change all of the quotes to smart quotes. Then apply body text style if you wish.

Tools, Autocorrect, Custom Quotes, Replace must be on, and the paragraph style must be "Default."

I think you'll find that when you use Format > Autoformat > Apply, there is no need to apply the Text Body style. That's done automatically--even if you don't want it. The developers think this is necessary to prevent using Format > Autoformat > Apply twice--something which I don't understand.
Back to top
View user's profile Send private message
Bhikkhu Pesala
Super User
Super User


Joined: 23 Aug 2005
Posts: 2324
Location: Seven Kings, London, UK

PostPosted: Mon Dec 03, 2007 1:48 pm    Post subject: Reply with quote

Here, it applies the style, "First line indent."
_________________
Fonts * Opera * Oo Tips * FAQ * New Forum
Oo 2.3.1 * Win XP
Back to top
View user's profile Send private message Visit poster's website
BillP
Super User
Super User


Joined: 07 Jan 2006
Posts: 2703

PostPosted: Mon Dec 03, 2007 5:27 pm    Post subject: Reply with quote

Bhikkhu Pesala wrote:
Here, it applies the style, "First line indent."

Aha. It will change any paragraph with the Default style which already has an indent to the First Line Indent style instead of the Text Body style. I don't understand why it's making these changes at all. Even with every Autocorrect option turned off, the styles will still be changed and direct formatting will be removed. Since I don't want the styles changed and I don't want any direct formatting automatically removed, I avoid using this feature completely in Writer.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Writer All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group