Importing text only but with a bit of "bold" ans "italic"

Previous topic - Next topic

Denis ROUQUIER

Hello

I am currently preparing the second Scribus-based issue of our journal (the first went fine).
Everything is about OK ; I still feel a bit uneasy with text import.

I have tried several methods :
- copy-paste
- import (text only)
- import not-text-only

I have seen several problems :
- « Ctrl-space » characters become ordinary space characters   (typical of copy-paste from word) ;
- missing space characters here and there (from word, random, difficult to reproduce) ;
- local changes (like one word in bold or one sentence in italic) are not reproduced ;
  this is normal with copy-paste or with text-import-text-only, but it is a problem for me ;
- several new styles created (but not used ??) ; this is normal with « import text not-text-only »
  but I really want to keep the list of styles under control.

I wish Sribus could offer a text import function with the following features :
- no new style is created
- no existing style is modified
- the imported text appears in « default paragraph style »
- the local changes (like one word in bold or one sentence in italic) are reproduced.

The nearest I can go to this is by using the following method :
- start with a writer text (or with a writer version of a word text) ;
- use import text (not text only ; not prefix style names ...) ;
- click once in the frame and apply « default paragraph style » without bracket
- delete the newly created styles (this may be shared between several imports).

All this seems a bit complex, and I might have to use the old method (import text only, and carefully read the imported text to manually reproduce the local changes, like one word in bold or one sentence in italic).



a.l.e

If I understand you correctly, this has been discussed recently in this thread:

Importing LO Writer text without over-writing existing styles
https://forums.scribus.net/index.php/topic,6642.msg27393.html

Last Thursday, with the help of a few people at our local Hackergarten, I had a second look at the ODT importer and managed to find one of the switches that would allow to import the text and apply the formatting from the Scribus document.

But there is a lot more work to be done.
We will see, if I succeed.

Aleks100

Have you tried to export text as markdown, check it if everything is fine (delete # headers), and then to import it in Scribus?

Denis ROUQUIER

Thank you for your answer and thank you for directing me to

 https://forums.scribus.net/index.php/topic,6642.msg27393.html

The two questions are about text import but the situations are quite different ; in my case I have absolutely no control over the way authors name and define their styles. Authors are sympathetic but will not enter in technical discussions about styles. So I must be ready to receive texts with a great variety of styles : style names, style content, style application, and direct formatting on the text will change from one file to the next.

(I understand that this protected me from the problem seen by « henrylaw » : the imported styles never had the same name as one of my pre-defined Scribus styles).

In my case only the visual aspect of the text is meaningful ; and in fact only a part of that visual aspect : font, font size, vertical spacing, horizontal alignment as set by the author must be ignored and set according to the  « default-paragraph-style » of Scribus. Only « bold », « italic », « underlined » and « superscrit » must be kept. Right now I do this manually ; I wish it could be automated.


Nermander

What you are asking for is almost important. If one author has used direct formatting and another used styles, you are saying the styles should be converted to direct formatting?

I would say you need to set up a workflow where the texts you receive are "cleaned up"/sanitized in some way.

When I worked as the deputy editor for a magazine we made at my job, I set up a whole kit of Word macros to clean up what we got from authors.

a.l.e

Yes, that was the way I understood it.

The way I'm approaching the other issue, is also by keeping the styles if they exist and have an option to ignore the other styles (and apply a default style).
And the local formatting your mentioning (b, i, u, sup, sub) should the only to be kept (if they differ from the style in the source document).

Denis ROUQUIER

Workflow : yes, I once had a sort of workflow ; I would duplicate the incoming file, adjust all the features of the « normal » style and copy-paste to Publisher ; in some cases it didn't work, some old fromatting would reappear ... I am not an expert in Word macros, and the incoming files are really very variable !


With Scribus, the target I am trying to reach is : a text in « default-paragraph-style » with a few characters or words, here and there, modified by direct formatting.

To achieve this I use the following method :

1)
Import the text using « copy-paste » or import-text with the « text-only » option ;
(styles from the incoming file are ignored, Scribus styles are not modified, and the text is in « default-paragraph-style »). This phase is quite simple.

2)
Scan the text and select a few characters here and there, or a few words, or a few sentences, and apply direct formatting to change them to bold or italic or ...,  to make them look like in the incoming file. The reason they appear as bold or italic in the incoming file may be because of direct formatting or because of a style ; I don't take this into account while reading the incoming file and modifying the Scribus text.

This phase may be long and I might miss some modifications. I wish it could be automated, but I see that this seems to be in contradiction with the general view (keep the styles from the incoming file as far as possible).

I can provide a short example file if needed