Styles and formatted characters

General comments and questions. Technical support.
Post Reply
maximo_testa
Posts: 3
Joined: Sun May 23, 2010 8:02 am

Styles and formatted characters

Post by maximo_testa »

Hello, thanks for your work!
I have this question: I have a style (i.e. Normal) that DON'T has any effect selected for Font Format (Bold, Italic, etc.). When I apply this style to a whole document it works perfectly for all paragraphs that contains mixed font effects (Bold, Italic, etc.), but it change to no effects at all paragraphs that are all italics or bold or underlined.
Sorry, but I am an italian and I am not sure I have explained clearly my problem! I would try with an example:

Before applying Style:
This Paragraph has mixed effects: Bold, Italic.
This Paragraph is totally Italic.

After applying Style:
This Paragraph has mixed effects: Bold, Italic.
This Paragraph is totally Italic.

Hi!
User avatar
admin
Site Admin
Posts: 2720
Joined: Wed Jun 05, 2002 10:48 pm
Contact:

Post by admin »

Thanks for the example.

This is how the "Apply style" command of Atlantis is supposed to work. There is a significant difference between styles in MS Word documents (RTF, DOC, DOCX) and, let's say, CSS styles. Any paragraph in a MS Word document is always associated with a paragraph style from the document's style sheet. Any style in a MS Word document bears a complete set of font and paragraph formatting properties. In most cases, only a few of those properties are explicitly defined. The remaining properties are derived from the so called "default font format" and "default paragraph format" of a word processor. So when you apply a style to a paragraph in Atlantis, and this style does not have all the font & paragraph formatting properties explicitly defined, the entire set of font & paragraph properties is still applied to the target paragraph. But before applying a style, Atlantis checks if the target paragraph has what you call a "mix of font effects". If there is a mix (for example, there are paragraph fragments formatted in bold and in non-bold), Atlantis applies bold/non-bold to the target paragraph only if bold or non-bold is explicitly specified within this style or any of its "base styles" (ancestors). In this way, Atlantis tries to retain the original "formatting emphasis" present in the target paragraph.

In your sample paragraph #1, there is a mix of bold and non-bold fragments, and italic and non-italic fragments. Since bold and italic is "undefined" in your "Normal" style, Atlantis does not apply bold and italic to the paragraph #1. But your sample paragraph #2 does not have a mix of italic and non-italic. Italic is not explicitly specified with the "Normal" style. But Atlantis applies the italic attribute as specified within the "default font format" of Atlantis.
cyana
Posts: 11
Joined: Sun Jan 29, 2012 6:07 pm

Post by cyana »

I would like to add a question. I would like to leave the 'italic' characters as is, when assigning a new style. At the moment, this works only when italic characters of a paragraph are in minority, e.g.

In this paragraph, only a few characters are italic.

When applying a new style, the outcome is as expected. However

In this paragraph, most of the characters are italic.

here your result is

In this paragraph, most of the characters are italic.

At the moment, when editing large amounts of text, you need to step through all paragraphs and take care of the italic characters, this is very cumbersome and time consuming. I hope there would be a workaround I have not discovered yet ?

thanks
cyana
Robert
Posts: 1890
Joined: Fri Aug 15, 2003 8:27 pm

Post by Robert »

Hi,
You probably have an older version of Atlantis. The current version is v.1.6.5.8, and works as you expect. Please update your version of Atlantis (“Help | Check for Updates…”)
HTH.
Cheers,
Robert
cyana
Posts: 11
Joined: Sun Jan 29, 2012 6:07 pm

Post by cyana »

Thanks Robert. I've updated Atlantis and now I'm happy ;) - besides the fact that when the complete paragraph is italic, the character format is still lost.

greetings & thanks
cyana
maximo_testa
Posts: 3
Joined: Sun May 23, 2010 8:02 am

Post by maximo_testa »

I thought that Atlantis could do ALL my work :mrgreen: , now I undertand that I have still 1% of it to do by myself :evil: !
I think I could survive! :wink:

Thanks!
Robert
Posts: 1890
Joined: Fri Aug 15, 2003 8:27 pm

Post by Robert »

Hi,
If you want a style to format text in italics, you should use a style which inherently (automatically) applies the italic attribute to the associated text.
It is quite paradoxical to associate text with a non-italic style (i.e. the “Normal” style), then reformat this text entirely in italics, and expect the original non-italic style to leave the paragraph in italics when it is reapplied.
If you want italics, simply use an “italic” style. This is the traditional standard way with styles.
HTH.
Cheers,
Robert
cyana
Posts: 11
Joined: Sun Jan 29, 2012 6:07 pm

Post by cyana »

Thanks Robert and maximo_testa for your replies. My problem is, that I need to convert large amounts of text to epub. The text stems from PDF files and is exported with Acrobat. The result is a text that has tons of styles (sometimes up to 50) even for the same 'normal' style formatting; to unify it you need to assign the same style to all of them. This however leads to loss of italic characters when a complete paragraph is italic (and in previous Atlantis versions, the italic state was swapped when the italc characters were in majority).

The only way to avoid it was to step through the text and look for italic characters, set them to normal, apply the new style and reset them to italic again. We are talking of text with 600 pages and more, so you can estimate how time consuming this procedure is.

Now, with the new behavior, I still must step through the text, however only need to edit paragraphs that are completely in italic. This sure is an improvement, however still is rather time consuming. So if there would be a way to assign the style without loosing italics I'd be very happy - then I could delete all Acrobat styles and assign the proper style to the normal text within the blink of an eye.

Or, if there would be a way to detect all paragraphs that are completely in italic with one search this would have the same effect.

greetings and thanks
cyana
Robert
Posts: 1890
Joined: Fri Aug 15, 2003 8:27 pm

Post by Robert »

Hi Cyana,
You might be lucky if your “italic” paragraphs are entirely in italics, i.e. if their paragraph end mark is also formatted with the italic attribute. You can easily find out if you switch the “Special Symbols” mode on (“View | Special Symbols”).
If this is the case, you can set up the “Ctrl+F” dialog so that it finds any paragraph end mark formatted with the italic attribute:

1. Press “Ctrl+F”.
2. Clear the “Find” box.
3. Click the small button to the right of the “Find” box, and select “Paragraph End Mark” from the drop-down menu.
4. Check the “Format” box under the “Find” box, and specify “italic” as the Font Format to look for.
5. Press the “Find Next” button.

Atlantis should take you to the first paragraph all in italic. This said, you might find odd paragraphs whose paragraph end mark will in italic, but whose text will not be entirely in italics. In this case, the above method won’t be failsafe…

Now here is a better trick.

1. Create any appropriate style with “italic” as its main font format attribute (you could call it “Italics” for example).
2. Press “Ctrl+H”.
3. Clear the “Find” box.
4. Click the small button to the right of the “Find” box, and select “Paragraph End Mark” in the drop-down menu.
5. Check the “Format” box under the “Find” box, and specify “italic” as the Font Format to look for.
6. Clear the “Replace with” box.
7. Check the “Format” box under the “Replace with” box, and specify “Italics” as the style to apply to the paragraphs found by Atlantis.

In this way, the paragraphs which are entirely in italic will be automatically reassociated with the “Italics” style.

Note that you could use the same method to find all paragraphs which are not entirely in italics, and automatically reassociate them with your own “Normal” style.

1. Assign any appropriate properties to the “Normal” style.
2. Press “Ctrl+H”.
3. Clear the “Find” box.
4. Click the small button to the right of the “Find” box, and select “Paragraph End Mark” in the drop-down menu.
5. Check the “Format” box under the “Find” box, and specify “non-italic” as the Font Format to look for (clear the “Italic” check box).
6. Clear the “Replace with” box.
7. Check the “Format” box under the “Replace with” box, and specify “Normal” as the style to apply to the paragraphs found by Atlantis.

All the paragraphs which are not entirely in italics should be automatically reassociated with the “Normal” style.
Again, this is assuming that the “Normal” style paragraphs do not have their paragraph end mark formatted in italics…

HTH.
Cheers,
Robert
cyana
Posts: 11
Joined: Sun Jan 29, 2012 6:07 pm

Post by cyana »

Hello Richard,

thanks a lot for your suggestions ! The idea with the formatted paragraph end mark is brilliant. Although I cannot rely on the assumption, that an italic paragraph end mark indicates a totally italic paragraph due to Acrobats weird export behavior, it cuts down the searched characters to a minimum, so it saves me a lot of time !

thank you very much !
cyana
Post Reply