Find a page style in a writer document

I have a document that has a bunch of page styles like “Converted2” that, as far as I can tell, are not being used. However, I ran the great style delete macro and while many were deleted, there are still quite a few hanging around.

I have paged manually through the document, but did not find where these page styles are being used. Is there a way to do a “find” on a page style to find where these are remaining in the document?

There is no search function for page styles.

Converted9 page styles appear after repetitive editing sessions on .docx documents. These page styles are created as a result of divergence on page concepts between DOCX and ODF. If you keep your document as a .docx it is pointless to try and eliminate these page styles because they will be recreaton demand. They are particularly numerous because they are applied to single pages (in best cases on pairs of pages).

Your best solution is to paste your whole text as unformatted into a blank .odt document, even if you present file is .odt because its style dictionary and structure are already damaged beyond repair. Once you have your unformatted text, apply styles on it to rebuild formatting and layout. Don’t use direct formatting. Use only styles, all of them: paragraph, character, page, list and frames if you have images. This is the only way to achieve stable, reliable and predictable formatting (and get peace of mind).

1 Like

Thanks @ajlittoz . Yes you are correct, that is the source of the problem, the document came from .docx. However, it has so much formatting at this point, including many many inserted images, that pasting it as unformatted text into a blank .odt document and formatting from scratch would not be feasible.

What I did was open the original .docx document I wanted to convert from inside LibreOffice, and then saved it as .odt. This works many times better than saving the document as .odt from Word. LibreOffice has become leaps and bounds times better at both saving and reading and converting Microsoft formats in the past few years, very welcome improvements that have enabled me to move more and more to open document formats. Keep up the great interoperability work LibreOffice!

So the document is in great shape now in .odt format, using only styles, not direct formatting. And the few places where the conversion did not work well, on page styles, I easily fixed. Mainly by creating a Landscape page style and applying that to the “ConvertedX” landscape pages, and then applying the default page style to the portrait pages that followed the landscape pages.

The only issue left is cleaning the styles to get rid of unused ones. I am fairly sure the dozen or so remaining “ConvertX” page styles are unused. But the macro to delete unused styles did not delete the ones still there, so I am confused. If there is no way to search a document for where a page style is being used, I will have to just live with them remaining. Thanks again.

That macro should work correctly.
Those styles may still be in use (even if you’re not aware of it).
Try making a list of Styles in use (dropdown list at the bottom of the sidebar)
and check that they are not really in use.

1 Like

Thanks @bantoniof . So I selected “Applied Styles” from the dropdown at the bottom of the Page styles windows (accessed with F11). The styles that remained after running that macro were not listed. Hmmm.

So I selected “All Styles” from that dropdown, and created a new page style “ThisPageStyleIsUnused”, and ran the macro again. It deleted that style… and five of the nine other unused page styles. Hmmm.

So I ran it again, and it deleted two more unused page styles. A third run and it deleted the last two unused page styles.

So the macro works. But it may need to be run repeatedly until there are no more deletions, for some reason.

Thanks, problem solved.

I doubt it. Word has no notion of character, page and list styles. The case of DOCX “sections” is handled by creating “one-shot” ConvertedX page styles as you noticed. You dealt with them. All text “decorations” (bold, italic …) are converted to character direct formatting. I don’t think you replaced them by adequate character styles because this category is more than too often neglected by users (for not knowing they exist). The worst case occurs with lists. The translation created myriads of WwNum123 and Listxyz list and character styles. These styles are used only once, resulting in a behaviour similar to direct formatting. Unfortunately, there is no search function for them.

If your document is to be maintained and reviewed on the long term, cleaning and consolidating its structure and formatting pays. It is really a tedious task but the benefit is manifold.

Regarding images, if you can classify them into “families” with identical formatting, positioning and flow properties, applying the corresponding frame styles would again rationlise the document and make it more stable.

Hi,

this extension might do what you’re looking for: Styles Reporter


HTH,

Word has character styles since since 1983. See https://mendelson.org/MS%20Word%201.00%20for%20DOS%20Manual.pdf

@Stokpan The document you attached clearly demonstrates that Word “character styles” don’t cover the same feature as Writer character styles. Unless my reading is too superficial, it looks like Word CS are used automatically only in pre-defined contexts.

Around the mentioned date, there was no other choice than Word. I used its paragraph styles (style sheet) but never noticed the character styles, despite all my search through available documentation because of the induced shortcomings by Word workflow.

An important question: how many users are aware of this feature (assuming it can be as versatile as in Writer)? and how many users are willing to make use of it?

Microsoft styles are sometimes direct formatting by another name. This site appears to describe character styles but my Word is too old, or the commands are too deeply hidden to find them, Do you know all five style types in Microsoft Word? - Office Watch

The list styles look like direct formatted lists.

Word character styles are similar to LibreOffice; they both have the same limitation that you cannot cascade several styles so you can’t have strong and then emphasis, you need to have strong emphasis in one style. Which is why I don’t mind using manual bold and italics over my character styles.

That said, I find it easier to work with paragraph and character styles on LibreOffice.

Wrong! You can apply several character styles on the same sequence. However the stance is not obvious. But the most serious obstacle to revealing the trick to general audience is the fact that the final effect depends on the order of application when the styles have conflicting settings on the same attribute. Another problem arises when the range for the overlaid character styles has not the same extension. Not speaking of the difficulty of removing one style from the “sandwich”.

When talking about style abstract model, I find very annoying you can’t configure styles relative to another one and, here, that you can’t relate explicit character styles with the implicit character style defined in the paragraph style. As an example, consider Emphasis. In traditional typography, if your text is Roman, emphasis is translated by italic; but when text is italic, emphasis becomes Roman. This can’t be implement through standard styles in Writer for two reasons: setting can’t be made conditional to the ancestor and paragraph character style lives in a different hierarchy (this would require implementing dynamic – or contextual – inheritance).