[Solved + Issue] Styles not getting (completely) applied

Discuss the word processor
Post Reply
agentspanky
Posts: 5
Joined: Fri Dec 14, 2007 2:18 am

[Solved + Issue] Styles not getting (completely) applied

Post by agentspanky »

hi all,

I've been using OOo for a number of years, using the 'old school' hard formatting up until recently (this heading is 16pt times roman, that paragraph is 9pt OptimaNovaLT, etc..)
Trying to use styles for the last few months has been nothing if not difficult. I've been battling with v2.2.something, and upgraded to 2.3.1 yesterday to see if my problem has been resolved. I've read the local help files and all the online documents and tutorials and gone through these forums, and can't see if i'm doing anything wrong.

My problem (sorry for long winded background!), is that after setting up styles on my small document:
  • heading1
  • heading2
  • textbody
and correctly applying "Next style" to these styles, only some of the style information gets applied.

After a paragraph end (hard return), the 'apply style' box correctly shows what should be applied every time, but might only change the typeface of the correct style and not the size - or show the correct style but apply no correct formatting to it at all. No problem - i'll do this manually just this once.. But even selecting the paragraph i want and using either fill style or using the apply style box doesn't necessarily change the style, but the apply style box happily reports what it should be! It might get the indenting right (on a heading2, for instance), but ignore the typeface and size!

There's nothing weird going on in my 'conditions' of textbody, either - i've checked.

on an unrelated matter i can faintly see the edges of (invisible) tables/frames in the exported pdf even in lossless quality - is this expected?

Thanks for any help/advice you might have - i love the suite of software, but am going nuts with these styles!
Last edited by Hagar Delest on Thu Jun 12, 2008 10:11 am, edited 2 times in total.
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: styles not getting (completely) applied

Post by acknak »

Can you create a simple sample (!!) document, attach it here along with instructions, like
1) Open the document
2) Put the cursor after ...
3) Type ...
4) Note that X happens when I expect Y to happen.

It will make it a lot easier to talk about.

Include a PDF made from the same sample that shows the lines--those are not normal--unless you asked for them.
AOO4/LO5 • Linux • Fedora 23
agentspanky
Posts: 5
Joined: Fri Dec 14, 2007 2:18 am

Re: styles not getting (completely) applied

Post by agentspanky »

Thanks for the reply..

I've attached a sample .odt, and the pdf is at http://test.aerogenesis.com.au/OOo%20Forum%20Sample.pdf (it was a little big to attach - 128kb doesn't go far these days). Also attached is a .png of how it looks on my pc (just in case).
there is a table near the start with a list of specific issues, as well as a few headings, etc scattered around for examples.

I'm on an Xp SP2 box, with all updates, acrobat reader 8.1, OOo 2.3.1

Thanks for any and all help..
Attachments
Screenshot of .odt on my machine
Screenshot of .odt on my machine
OOo Forum Sample.odt
Sample .odt showing some formatting issues i'm having
(114.1 KiB) Downloaded 306 times
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: styles not getting (completely) applied

Post by acknak »

Nice. That should help a bit. I forgot about the font issue: your document looks completely different here because I don't have all the fonts it calls for. Anyway, that shouldn't be a big problem.

First the easier problem: the lines in the PDF.

At first I couldn't see them--they are incredibly faint, and they only show up in certain spots--but they are there. However, I could only see them with your PDF in Adobe Reader. If I used the free Evince PDF reader to view your PDF, they aren't there. So it looks like that it's a problem with Adobe Reader. You might want to try an alternate PDF viewer and see if it makes any difference for you.

I'll try to take a closer look at the styles issues tomorrow.
AOO4/LO5 • Linux • Fedora 23
Bill
Volunteer
Posts: 8932
Joined: Sat Nov 24, 2007 6:48 am

Re: styles not getting (completely) applied

Post by Bill »

The document still contains some direct formatting. When you apply a style to text which has direct formatting already applied, the direct formatting is not removed and will override the style settings. To remove the direct formatting, select the affected text then press CTRL+SHIFT+SPACE.
agentspanky
Posts: 5
Joined: Fri Dec 14, 2007 2:18 am

Re: styles not getting (completely) applied

Post by agentspanky »

wow - brilliant!

Thanks Bill, that seemed to do the trick. I just just CTRL-SHIFT-SPACE'd the whole document, and it looks like I wanted it to days ago! :)
can i please ask
  • How you can tell there was direct formatting in the file?
  • How you knew about the CTRL-SHIFT-SPACE thing? I've read everything I can about styles in the last few days
And acknak, I'll try Evince (Acrobat is soo slow!), but I'm thinking that if it shows up in any document, OOo must have put it there at some level, right?

Thanks for your help, guys..
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: styles not getting (completely) applied

Post by acknak »

... if it shows up in any document, OOo must have put it there at some level, right?
Absolutely.

It may be that evince is not rendering the PDF perfectly, and so the lines are not there. It may be that the way OOo constructs the PDF is not quite right.

But it doesn't seem to be a simple "OOo has generated the PDF incorrectly" kind of problem.

BTW, here's a pic with some "computer enhancement":
Borders visible in PDF: Enhanced screenshot from Adobe Reader 8.1/Linux
Borders visible in PDF: Enhanced screenshot from Adobe Reader 8.1/Linux
The lines definitely correspond to the table and frame borders, and they only appear where they cross certain parts of the background "light bulb" graphic (which wasn't in your .odt, BTW).

If you watch Adobe Reader render the page, all those rectangles are rendered separately. I have a feeling that there is a 1-pixel overlap, and the colors from the background are being added in twice along those borders. That would account for why the background affects the density of the lines: where the background graphic is white, you can add it together all you want--you still get white. Where there is even a little bit of color, doubling it will make it stand out as a line.

Could be all wet; just a guess.

I tried to reproduce the problem using a background image with a borderless table or frame and your graph images--no success. It may even be specific to OOo running on Windows, or it could be specific to that particular image. E.g. is the image simply lightened, or was it lightened by making it mostly transparent? OOo makes some long detours when transparent graphics are composited.

PS: Never mind that last bit. I can reproduce it, but only in very specific circumstances. I'll keep fiddling to see if I can tell what's causing it.
AOO4/LO5 • Linux • Fedora 23
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: styles not getting (completely) applied

Post by acknak »

Ok, I think it's nailed down.

The lines are caused when you use a frame over a transparent page background image. They're not actually the object borders that Writer shows, they're borders of rectangular areas that Writer generates when rendering the page as a PDF.

Also, I can see them in evince, but they are much much lighter. So I guess the exact appearance depends on the PDF renderer.

Anyway, the workarounds are to either: a) avoid using a transparent page background, or b) change the document frames to use a color fill that is 100% transparent.
AOO4/LO5 • Linux • Fedora 23
agentspanky
Posts: 5
Joined: Fri Dec 14, 2007 2:18 am

Re: styles not getting (completely) applied

Post by agentspanky »

Hey acknak, thats amazingly helpful.

Your solution (b) sounds a little artificial, so in the interests of simplicity, I guess I'll lighten the background, before importing it back at 0% transparency.
(The reason the background wasn't in the .odt was that I linked it, rather than embedded it in).
I'm not sure I would have figured that out, and probably would have accepted the faint lines as 'one of those things'. But now you've got the solution(s), I'vm very happy :)

Thanks to both of you - best regards
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: styles not getting (completely) applied

Post by acknak »

Ok, I filed this as Issue 84603: PDF rendering artifacts with transparent page background.
Your solution (b) sounds a little artificial, so in the interests of simplicity, I guess I'll lighten the background, before importing it back at 0% transparency.
That's probably the best choice, as the transparent background can trigger other problems (see the example in with the issue). I've had similar problems with transparent objects, which is what made me suspicious in the first place.

OTOH, Writer's frames are a little odd ("no fill" does not make a frame transparent), and "solid fill @ 100% transparency" is a standard way to get a completely transparent frame, so I still think it's a reasonable workaround.
AOO4/LO5 • Linux • Fedora 23
huw
Volunteer
Posts: 417
Joined: Wed Nov 21, 2007 1:57 pm

Re: styles not getting (completely) applied

Post by huw »

Bill wrote:The document still contains some direct formatting. When you apply a style to text which has direct formatting already applied, the direct formatting is not removed and will override the style settings. To remove the direct formatting, select the affected text then press CTRL+SHIFT+SPACE.
agentspanky wrote:I just just CTRL-SHIFT-SPACE'd the whole document, and it looks like I wanted it to days ago! :)
can i please ask
  • How you can tell there was direct formatting in the file?
I'll have to leave that to someone else - OpenOffice is a bit unfriendly in this area and I haven't figured it out either. Whilst it is actually quite good at styles, the primary formatting options presented to a user are direct, and converting a direct formatted document to a styles based one is an excercise in frustration. If only they'd fully commit to styles!
agentspanky wrote:
  • How you knew about the CTRL-SHIFT-SPACE thing? I've read everything I can about styles in the last few days
It's listed in the keyboard short-cuts, but you'd have to know about the option in the first place to know to go looking for it. If you select some text and right-click it, right at the top of the context menu is an option "Default". This is the command that Ctrl+Shift+Space calls. I think they're going to change it to "Default formatting" soon (or have they already? I'm on StarOffice so I can't check). It's also the first item in the Format pull-down menu.
User avatar
foxcole
Volunteer
Posts: 1507
Joined: Mon Oct 08, 2007 1:31 am
Location: Minneapolis, Minnesota

Re: [Solved + Issue] Styles not getting (completely) applied

Post by foxcole »

It's "Default Formatting" at least as of version 2.1, maybe earlier. It's certainly there in all versions since.

PDF has only recently (well, comparatively recently) been able to support transparency at all, so it's no wonder there might be some issues with it in third-party PDF tools. See this Wikipedia article, Transparency (graphic), section 5, "Transparency in PDF" for more information. (This article is accurate.)
Cheers!
---Fox

OOo 3.2.0 Portable, Windows 7 Home Premium 64-bit
Bill
Volunteer
Posts: 8932
Joined: Sat Nov 24, 2007 6:48 am

Re: [Solved + Issue] Styles not getting (completely) applied

Post by Bill »

foxcole wrote:It's "Default Formatting" at least as of version 2.1, maybe earlier. It's certainly there in all versions since.
According to this issue, the term "Default Formatting" was used in version 2.0 beta:

Rename Default formatting menu item to Clear formatting
agentspanky
Posts: 5
Joined: Fri Dec 14, 2007 2:18 am

Re: [Solved + Issue] Styles not getting (completely) applied

Post by agentspanky »

Ah..

That was my fault entirely, then..
When right clicking on text and the 'Default Formatting' menu option came up - I thought that related to the 'Default' font set in the Tools >> Options >> Writer Options >> Basic Fonts (Western) page.
I had seen that when initially setting up all the general options, and definitely didn't want everything to be 10pt Garamond! I probably would have clicked had it been 'Clear direct Formatting' or something, but.. c'est la vie.

'Select All', and 'Default Formatting' it is! :)
Post Reply