Remove Styles but Retain Formatting

In my field, publishers often require documents to be submitted with direct formatting only (i.e., no styles other than the default style).

With LibreOffice, is there a way to (1) use styles when composing a document but then (2) to remove those styles while (3) retaining their formatting?

I’m running LibreOffice 7.4.3.2 on Windows 10 and 11.

From what I gather, the publishers are most often using Adobe InDesign but require the files to be sent to them for typesetting in an editable format (almost always DOCX). My guess is that they are prohibiting any styles except the default because they find the likelihood of irregular formatting less of a headache than the likelihood of styles multiplying or conflicting.

This is the dumbest specification I’ve ever met! I don’t understand the rationale behind it. How do the publishers use formatting information? They have to extract it from the document encoding and whether it is brought by styles or direct formatting it ends up “nearly” the same in the encoding. The difference is every homogeneous direct formatting sequence defines a single-usage style, leading to useless multiplication of styles and the impossibility to reconstruct the logic of document composition.

You can however get rid of character and page styles by saving .doc(x). Since M$ Word has no equivalent notion for them, they are converted to direct formatting. But, don’t edit such a converted file because you (1) will end up in an awful formatting nightmare and (2) will face a high probability of document corruption after some editing sessions (cumulative effect of approwimative conversions).
Paragraph styles will be kept more or less the same (as long as their attributes can be converted).

You can also export to PDF and send this file to the print shop. Since PDF is a display format, there is absolutely no semantics attached to its graphical objects, including text, and everything is frozen, i.e. equivalent to direct formatting.

For a better advice, please edit your question to mention OS name, LO version and save format. Explain the press process so that we can understand what is at stake and eventually propose a reasonable procedure.

Thanks, @ajlittoz. I agree with your disagreement with the specification, but alas, they don’t ask me when they make the rules. :stuck_out_tongue: I’ve added the additional details you requested in my original post above. Any further thoughts you or others may have are certainly welcome. Thanks, again.

Weird requirements indeed.

What is the deal with the publisher/printers? Do they print your book with the formatting that you add, or do they have professional graphic designers and format it themselves, just as publishers had to do before the age of word processors with formatting capabilities? If the latter is the case, they may want to get a copy as clean as possible to prevent conversion problems.

If they request DOCX, they immediately bump into “irregular formatting” because Word is rather poor on formatting targets: only paragraph styles while Writer offers in addition character, page, frame and list. You’re more prone to conflict with direct formatting than with styles.

I like to point out that a strict and rigorous approach to formatting I call semantic styling is part of author creativity: author annotates the text with styles independently from their appearance to translate the importance or non-written nuances of thought. Professional graphics designer should never change author semantic styling, the same they respect the text (and its possible typos!). With semantic styling their job is easier because they only work of style attributes and the document should automatically follow. I.e., they turn the style properties into the rules set by the house graphical charter.

If they really want a cleanest possible text, save as .txt. All formatting will be removed. Only care to separate paragraphs with double Enter or, alternatively, never linewrap any paragraph.

And for the peace of your mind, work only on an .odt original. Otherwise, you’ll be positively “delighted” to meet all cumulative compatibility problems for working in a non-native format. Note this last advice is valid with any application.

Once all styles (paragraph and character) are applied:

  • Save a copy of the document as Rich Text (*.rtf).
  • Open it in WordPad (Windows 10).
  • Select all.
  • Paste in Writer.

Applied Styles? Only Default Paragraph Style.

1 Like

Thanks for that workflow suggestion, @LeroyG. The downside there is that WordPad doesn’t support footnotes. So, simply copying and pasting or editing and resaving in WordPad ends up deleting those. :frowning:

But from this suggestion and the other comments here, am I correct that what would be needed for LibreOffice to do this is essentially the LibreOffice equivalent of these Word macros that would move footnotes into the main text (so they don’t get deleted by WordPad) and then move them back from the main text into footnotes (after the styles are reset to default)?

Don’t. Round trips are not idempotent and the reconstructed “formatted document” will be different from the original. And the more roundtrips, the more damaged your document. You’ll never recover your styles on the return trip. And I have a legitimate doubt about the footnotes.

Instead, save a copy and “flatten” the copy.

Yes, @ajlittoz, working in a copy of the document and avoiding attempts at round trips are definitely good ideas. I’ve played around (unsuccessfully) with trying to adapt a couple of Word VBA macros to LibreOffice Basic for this purpose. But any further thoughts from you or others about how to “flatten” the formatting in a document copy while retaining the document’s footnotes are certainly welcome.

Since it is a job of reconstructing cleanly the structure

Unfortunately I know of no trick to do that. The goal is end up with a clean, strictly-conformant ODF document. Pasting as unformatted text will drop the notes. You must then proceed manually to reinsert them and remove the old anchor transformed into a common character. Depending on the number of notes, this might turn user-unfriendly.

That’s a delightfully apt and quotable understatement, @ajlittoz. :slight_smile: Hopefully, something will come up or be created that will allow LibreOffice to address this (admittedly odd but no less real) requirement. Thanks so much for your input on the present state of the question.