Import character formatting while keeping own styles

Previous topic - Next topic

Eneen

Hi,

I'd like to import bold/italic direct character formatting only. I've searched for solution but can't find any. So:
- all styles are imported with odt and that makes mess inside my file
- when I import odt without styles no character formatting is imported
- when I apply paragraph style to frame all character formatting is lost

I see here some kind of two steps workaround:
- import text to fresh file, clean styles keeping bold/italic only
- paste text into main file after applying paragraph style to frame

Currently I have to do all formatting manually and it can be really tedious and error prone task.
I get all my text in odt format but files can be formatted in way I ask and in different file format (allowed by libreoffice export)

GarryP

Unfortunately, Scribus cannot currently - 1.4.6 - import character formatting from documents, it can only import some (not all) paragraph formatting. There's no way round this; it's just not possible at the moment.

Applying formatting at a frame level - where the frame is selected without any text in the frame being selected - will (and should) apply the formatting to all of the text in the frame. Frames have no text formatting. What you are telling Scribus is to apply the formatting to all of the paragraphs in the frame. Think of it as an override for all of the formatting of the text in the frame.

There's a hierarchy of how formatting is applied. Applying at a frame level (just a shortcut for "apply to all paragraphs in this frame, including linked frames") overrides paragraph formatting. Applying at a paragraph level overrides character formatting. The reverse is also true. Character formatting will override existing paragraph formatting for the selected text while paragraph formatting will override frame formatting (even though such a thing doesn't exist) for the selected paragraphs. It sounds complicated but it's quite simple once you get it.

Importing text from a word processor will destroy any existing bold and italic formatting because Scribus treats bold and italic formatting differently from how word processors do it, and with good reason. Word processors mimic bold and italic by manipulating the character glyphs on-the-fly whereas Scribus will only let you use a bold or italic variant if you have one installed. Scribus does it the proper way, word processors just mess around with the font.

This doesn't help you much but I hope it makes the situation easier to understand.

Eneen

Thank you!
It seems it's related to design decision:
https://bugs.scribus.net/view.php?id=8772#c43878
But:
Quote- applying a paragraph style reset direct formatting applied on selected paragraph and direct formatting applied on paragraph characters. Applied character styles are preserved.
So maybe there is way to somehow map "LibreWriter bold" into scribus character style...?

GarryP

Hmm... I seem to have been mistaken about applying paragraph styles overriding character styles. Oh well. Live and learn.

I'm sure it would be possible to map LibreOffice styles to Scribus character styles but I've no idea how difficult it would be to code or how easy it would be to use. I imagine a lot of people will have different ideas about how it should work depending on what they want it to do (and that's a discussion I want to keep out of).

Eneen

To use RTF and story editor workaround:
- edit text inside librewriter, use font that is used in scribus later, apply bold/italic to text and save as rtf,
- create blank Scribus doc, import styles you use inside main doc, import text, you will get text with direct formatting
- go to story editor and change paragraph styles there to yours using switch on the right side
- copypasta text into main doc

I wasn't able to do it using ODT as import filter seem to apply all formatting directly, so changing paragraph style do nothing.
I'll have to think about workflow here, but it should look like this:
- import odt (with character styles applied correctly)
- search-and-replace character styles to your own (no tool for that I'm aware of)