Font Error: Heading & Remove Formatting Use LIBERATION MONO Though Ubuntu Specified in Options & Style

OK… I think I’m starting to see what may be the issue here: while I have never used the Source Text character style before, in the couple of computer-related documents this is happening in, I have pasted code from web-sites before, and those have come up in a mono-style font before I manually changed them to my default Ubuntu font via the Font toolbar menu.

Because I wasn’t even really aware of character styles (I did define a few, but never really use them), I just assumed that the only difference was the font. However, I’m guessing that if I pasted some code now, looked at the character styles in the sidebar, I would see it show Source Text rather than No Character Style. While I learned the way to avoid code appearing in another font is to paste as unformatted text, I can’t rule out that Writer still has it as Source Text, even though it was in my default font.

What doesn’t make sense is the absolute randomness of the problem I’ve had - logic dictates that after hitting Enter after one of the offending paragraphs, every new paragraph should then have the character style of Source Text, which isn’t the case. So while that’s weird, I definitely have a greater understanding of how to rectify this, so many thanks for all the help from the people here!

[EDIT: I just tried pasting some code from a forum into a new document, and it does indeed come up as Source Text. though when I paste as unformatted text, it shows No Character Style. Still, I can’t rule out some kind of residue from previous code I pasted normally]

Correctly using template is a full question per se because you can do it several ways.

The only access method guaranteed to give you the benefit of all features is File>New>Templates or, equivalently, having defined a template of yours as default, File>New>Text Document. The document will then contain an internal link to the template and every time the template is modified, the document (styles) is updated accordingly.

1 Like

Thanks for all your help - this thread has been informative in more ways than one! I’ve got my own template with styles defined set as default, and it’s good to know that bit about styles being updated automatically. Previously, I was just importing the styles from that template, and when I altered it the changes did not get applied to the documents (but it wasn’t a major deal).

As for this issue with the Source Text, I opened up some computer-related documents I hadn’t opened since upgrading LO, and sure enough that character style was all over the place - but so random, the second half of one paragraph was in that character style, but the first part wasn’t! Not saying at all that going from 6.4x to 7.2x did that, but what is noticeable is that before upgrading, I had finally decided to start defining and using Headings (because I discovered Navigator!), and I had turned a whole bunch of plain-text headings into Heading 1-3, and they always displayed in the default Ubuntu font.

So something has changed between versions, because now if I turn a line of text into a heading, if the character style is Source Text in the background, then the heading is displayed in the wrong font. Anyway, with the help here that’s no longer an issue - those documents that were riddled with that character style I just did a Ctrl+A and set the entire docs to No Character Style, since I only used paragraph styles in those.

Now, I want to put a “solution” here for the benefit of others, and so I can mark this as [SOLVED], but first I will have a look around to see if there is a way to change all instances of one character style to another - basically a Find & Replace for styles. That’s because I gather most people use character styles as well as paragraph styles, so me telling them to just wipe all their character styles won’t be of much use!

Many thanks once again for all your help - you’ve been a real champion!

Maybe you should check the options of Find&Replace carefully. You may find something.

Another aporoach is to use Find only for selecting a couple of places, then you can change the style of all selected areas.

Yes, I did - you can find/replace Paragraph styles (which could come in handy) but not Character styles. I saw mention of an “advanced Find & Replace” extension that allowed that, but it was from a few years ago, and for OpenOffice.

Maybe you can search for the font used in the character style to mark only this places, then change the styles.

Many extensions from OpenOffice still work with LibreOffice…

I thought that might be the case, though I’m also used to compatibility issues when it comes to versions. So when I see a plugin in that’s a few years old, I immediately assume it won’t work with a program that has had many updated versions come out in that time.

As for searching for the font, well as I learned from this thread, and my problem which led me here, the font has little to do with the character style - this thread has been very instructive when it comes to that! And the thing is, if all my paragraphs look fine, because they’re all in the same font, but underneath some have the character style of Source Text - which will result in them changing to another font only if I remove formatting or set a paragraph style - then it’s no use searching for a particular font, because it isn’t being used yet. Hence needing to be able to search for a character style.

When it comes to myself, as outlined above I don’t use character styles (currently), so for me it was no problem to just select the entire document, and set the whole lot to No Character Style. But for others this will likely be an issue, because it will wipe all their character styles. Hence wanting to find a way to search for a particular character style.

But thanks for your input - it’s appreciated!

Many things changed but absolutely not the style engine. It is THE basic foundation of Writer. You’re hinting that you used only paragraph styles and I assume the remaining is done with manual formatting. Direct formatting is the main cause of formatting mess. Only styles (and I mean using all categories: paragraph, character, page, frame, list but excluding so-called table styles) can guarantee reliability and stability of formatting.

A second cause of formatting nightmare is pasting material of alien origin like data picked up in web sites. These are formatted according to HTML and CSS and more then often are badly formatted, i.e. instead of adhering to a style approach, they are akin to direct formatting. This alien material needs conversion before being incorporated to Writer text. This is where the convertor may introduce bad assumptions like your Source Text mishap. The correct but user-unfriendly way of dealing with alien material is to paste it unformatted and then apply pure-Writer styling.

I have documents which are more than 10 years old (having extension .swx or the like instead of .odt) and they still open without any problem, formatting or other because they are appropriately styled. I know, I should convert them to present encoding!

Actually, I’m stating emphatically that I only used paragraph styles, haha! As I said earlier, I strongly suspect it was pasting code from sites that caused that - even though I would Ctrl+Z to undo when I saw it in a mono font, then Ctrl+Shift+V to paste it again unformatted. As floris_v pointed out, you can delete all the text in a certain style, but that doesn’t mean you’ve actually gotten rid of it from the document - and I assume that’s what happened, and I was none the wiser because everything appeared in the default font (well, until this version of LO). Though I have no idea as to why it suddenly popped up in all sorts of random places - logic dictates every single paragraph created after that point would have the same character style. But the main thing is I now know what’s happening, and how to rectify it, so if I ever paste some code absentmindedly, and then replace it with unformatted text, I’ll be checking to make sure it isn’t still styled as Source Text even though it appears unformatted.