How many times has one found himself in a situation where he just has to work with raw material, copying and pasting bits of text from multiple sources, with different fonts being used and different font sizes and formatting, and having to make them all look good and uniformly formatted? This can be a very frustrating and tedious thing to do.
LibreOffice / OpenOffice styles can be a real help, with a little help from AncientGreek. Before you go on you may want to have a look at "How LibreOffice / OpenOffice styles work".
Uniformity can be achieved by resetting all text to its default values; both LibreOffice and OpenOffice have relevant entries on their context menu. But then again, important text elements (such as bold or colored text) may be lost too, if applied too soon.
AncientGreek suggests another way of doing things: styles conversion (and assignment too, actually).
The idea comes from the fact that resetting all text to its default values does not affect styles already applied to the text. So, if one would just assign styles to the text (and formatting) he wishes to preserve, and then reset the text attributes, the overall process of applying and changing text formatting will be much easier.
Removing manual formatting ^
Manual formatting is any formatting applied to text that is not defined within a style. Displaying a word in bold or italics by clicking the relevant button or buttons on the toolbar, is an example of applying manual formatting.
Applying manual formatting is really easy and fast; you just select and click. And this may be good enough for a document that's a couple of paragraphs long. Well, it may be good enough for longer documents, provided that the manual formatting will never be changed.
Imagine that you have a 2,000 words document and some 100 of them have been underlined. Then, you change your mind and you want them to be italics instead. You have to manually re-apply the new formatting to each and every word; not a very productive way of working.
Using AncientGreek "Styles Conversion" dialog you can just select one of the words, create a character style based on the existing formatting and apply it to every word with this formatting. When this is done, it's very easy to change all the words at once, just by editing the applied style.
The Styles Conversion dialog ^
The Styles Conversion dialog (shown below) can be opened by clicking the icon on the Secondary Toolbar, the relevant entry on the AncientGreek Menu or the Main dialog.
The dialog presents two tabs:
- The Paragraph tab, which provides the interface to convert paragraph styles.
- The Character tab, which provides the interface to convert character styles.
Each of theses two tabs contain the following sections:
- The search section
- The replace section
- The text / style modification section
Both sections provide options that can be enabled or disabled. When an option is enabled, it will be taken into account when the function it refers to is performed; otherwise it will be ignored.
The search section ^
This is where the parameters of the search function are set; when the dialog is loaded, the parameters set reflect the formatting of the selected text and the user can modify them at will.
The parameter set is a very basic one, to adequately identify and distinguish text within the document. After the final style has been applied to the text, it's very easy to modify all its parameters using the style modification dialog provided by LibreOffice / OpenOffice.
The style parameters that are missing from this dialog, if set in the text, will not be altered after the style has been applied to it. This behavior can be changed using the text / style modification options.
These parameters are the following:
The style to search for, or in other words, the style that is already applied to the text. The list contains all styles currently being used in the document.
The button will reload the formatting of the selected text, when clicked.
The font to search for, or in other words, the font that is already applied to the text.
The justification to search for, or in other words, the justification that is already applied to the text.
This parameter exists only in the Paragraph tab, since only paragraphs can have justification settings; characters can not.
The combination of text formatting to search for, or in other words, the formatting that is already applied to the text.
The font size to search for, or in other words, the font size that is already applied to the text.
To find out more about font sizes, you have a look at "Setting font size in LibreOffice / OpenOffice".
The combination of character color, character background color and paragraph background color to search for.
The language (locale) of the text to search for. This would normally be "Greek, Ancient", but other languages can also be used.
If none of the parameters (font, justification, text formatting, font size, text, color, text language) is enabled, the search function is disabled.
Furthermore, the search function is disabled when the values of the parameters do not imply manual formatting; for example, if a "Style" that has bold enabled is specified, and only the "Formatting" parameter is enabled with bold checked, no manual formatting is implied, so the search function is disabled.
The replace section ^
This is where the resulting style is defined. Optionally, some of its properties can be defined as well.
A list of styles to choose from. If a style name that's not in the list is specified, a new style will be created.
- Styles in use only
The list of the previous parameter normally contains all available styles. When this option is checked, only style that are already in use in the document will be available.
- Based on
This is where the base style of the new style is entered. The option is only available when a new style is to be created.
Text / style modification section ^
- Apply text formatting to the style
If checked, the formatting shown above (font, justification, formatting, font size) will be integrated into the style which will be finally applied to the text matched, effectively altering its properties.
- Clear Direct Formatting
If checked, all manually applied formatting will be removed (reset to default) from the text matched, so that only the applied style's properties remain active.
Paragraph style conversion example ^
Let us see a paragraph style conversion example. Let's suppose that I'm writing a document in which i have manually formatted its chapters titles. In particular, I have increased the size of the titles to 16pt. and made them bold. What i want to do is turn these titles to a paragraph style, so that, for example, I can create a Table of Contents.
Such a heading can be seen in the following image.
As you can see, when I place the cursor anywhere within the text and open the the "Styles Conversion" dialog, the existing paragraph style ("Default Style") is already selected by AncientGreek. Furthermore, the fields "Formatting" and "Size" are selected as well, and their values correspond to those set in the text.
Then, all i have to do is set a style to the field "Replace with" / "Style:" (i have selected "Heading 1"), and click OK.
The result is shown in the image above.
The text's formatting has been changed, and now corresponds to that of the "Default Style". The original formatting has been lost, since the option "Apply text formatting to the Style" was not checked.
The output "Styles Conversion" dialog informs me that it has found and checked 31 paragraphs, and changed just 3 of them; there are three chapters in this document.
Character style conversion example ^
Now let's have a look at a characters style conversion.
In the following image we have a paragraph whose some words have been manually formatted. I have changed four words to bold and changed the text color of one of them.
When I open the "Styles Conversion" dialog having placed the cursor anywhere within the text in bold, I see that the "Search for / "Style: is left blank (which means that no character style has benn assigned to the text). At the same time, under "Text formatting" the fields "Font", "Formatting" and "Size" have been selected by AncientGreek, and their values correspond to the manual formatting set to the text.
Then I set the output options. I want this kind of text to be handled by a new style called "Bold and Itaqlics", so this is what I set to the field "Style:" under "Replace with". I also want this style to have the current attributes of the text in question, so I check the option "Apply text formatting to the Style", and I want every occurance of this type of text found in the document to have no other manual formatting applied to it, so I also check the option "Clear Direct Formatting".
The result is shown in the image below.
The text's formatting has been changed, and now corresponds to that of the "Bold and Italics" style. The original formatting has been preserved, since the option "Apply text formatting to the Style" was checked, but the word in red is now in black, since the option "Clear Direct Formatting" was checked (the font color is not currently managed by the "Styles Conversion" dialog, so it has not been set in the new style).
The output "Styles Conversion" dialog informs me that it has found and checked 1 paragraph with 34 characters, and changed 19 of them in one "text session"; this means that these 19 characters are consecutive.