NOTE: You can also search and replace for styles. Open the search and replace window, click More Options, select the Styles checkbox, and go nuts. I have blogged more on this here. Thanks to Felipe for reminding me of this.
Maybe I should have thought of this years ago. Maybe I just hadn't thought about it all that hard. But regardless, I had a realization this morning while brushing my teeth that makes importing a new template much easier.
So. You have a grrrreat document on what makes squirrels look so cute when the sit up and eat nuts. And you need to submit it to the Journal of Squirrel and Possum Research.
You've applied all sorts of styles from your best template. Styles like ReportHead1, ReportHead2, StrongNote, PlainNote, BodyText, ListDiamondBullets, etc. You've got about 20 styles and about 100 pages.
And now you get the note from the JoSPR and they love your article, but they want it in their template.
No problem! you cry as you swig a celebratory jigger of apricot brandy that you keep in your desk drawer for just such occasions. You open your document, import styles, find the template, click OK, and boom......
OK, no boom, just a whimper. You get all those new styles but guess what? Nothing changed because when you import SquirrelHeading1 into a document that uses ReportHead1, nothing about ReportHead1 changes.
Agh!
Do you need to go through the whole document and apply the JoSPR styles? Isn't the whole point, or one of the key points, of styles, is that updating them is soooooo easy?
No, and yes. IF YOU USED YOUR OWN STYLES RATHER THAN STYLES THAT CAN'T BE RENAMED LIKE HEADING1 THROUGH HEADING10 THEN IMPORTING DIFFERENTLY NAMED STYLE DEFINITIONS ISN'T THAT BAD
If you used your own styles, all you need to do is rename the styles. And then when you import, you're golden because when you import SquirrelHeading1 (20 point, Albany font) into a document that uses SquirrelHeading1 (18 point, AvantGarde font), then all of a sudden SquirrelHeading1 does in fact change to the new definition. And alllll text with that style applied changes, too.
Here's what you do.
Figure out if you've applied existing styles that are part of every Writer doc, like Heading1 through Heading10, or if you've applied styles you created yourself like ReportHeading1. If the former, then you do have to just import all the styles and then reapply. If the latter, then you're good.
Renaming Styles
Use this procedure if you can rename the styles you used. If you don't know, try this procedure and you'll find out.
1. Open your document.
2. Go to the text with the first style you want to rename, like ReportHead1. Select that text.
3. Choose Format > Styles and Formatting.
4. In that window, be sure the correct category, Paragraph or another, is showing. Click the appropriate icon at the top.
5. Right-click on the style name and choose Modify.
6. In the style window, click the Organizer tab.
7. Rename the style; name it whatever is in the new template that corresponds to this style, like SquirrelHeading1.
8. Click OK.
9. Now, all the text that used to have the style ReportHead1 applied to it now has the style SquirrelHeading1 applied to it.
10. Rinse and repeat for all the other styles you need to rename.
All you need to do now is import the right definitions from the new template.
Importing Styles
1. Open your document.
2. Go to the text with the first style you want to rename, like ReportHead1. Select that text.
3. Choose Format > Styles and Formatting.
4. Click and hold down on the far right icon and choose Load Styles.
5. In the window that appears, select all the checkboxes.
6. Click Find File.
7. Find the new template and click Open.
8. Now all the new style definitions have been imported and all the text should look different.
(If you used un-renameable styles, then at this point you need to go through and reapply the new styles. Sigh.)
Isnt it possible to search and replace styles, in order to automatize the process for people who would otherwise have to reapply non-renamable styles they have used in their documents?
Posted by: Felipe Sanches | November 17, 2006 at 05:50 PM
Hi Felipe,
Thank you SO much for bringing this up! In my excitement to hack I sometimes overlook the standard features like the Styles checkbox in the S/R box.
Click the More Options button in the S/R window and you can select your styles.
Cripes! Thanks for reminding me of this. I am soooo blogging this.
You can also -- and I should have included this in the blog -- put your files together in a master file, then have files with the same names in the master file but defined differently. The definitions in the master file override the definitions in the documents.
Posted by: Solveig Haugland | November 19, 2006 at 10:24 AM
good
Posted by: tiffany jewelry | August 25, 2009 at 02:23 AM