Strange style behavior

Previous topic - Next topic

PK

Hi,

I post it, before opening a ticket in the bug tracker... I'd like to be sure that the problem does not come from me :(

I have isolated the problem with a test doc, attached from this message.

I have a style for the first paragraph (for having a Lettrine(= a drop initial capital) and a style for the others. All the other parameters should be the same, except that the indentation (no indent for lettrine one). I had two styles with no heritage for not having problems.

In fact, they come from the odt document, when I import it. I have to modify them by hands, because they are transformed from the original ones (for instance, I loose the lettrine property).

I have a strange behavior. The first lettrine paragraph seems like I want: no indentation. The second one has an indentation. I don't understand why. If I set up the automatic indent in the lettrine properties, so the second indentation is OK and the first other paragraph is full indent, as it exists an optical ruler on the left.

If I type by hands the text in the second paragraph, the problem disappears, as it was in the text itself.

I have compared all I could, but I have not seen anything that can explain this. The problem is that the original document has many paragraphs to modify for respecting what I want.

Help is welcome: thanks a lot...

PatJr

all I got was a bunch of font errors, missing, and a lot of blank pages
can you make a shorter sample file, 2 or 3 pages with an open source font so it's distributable with the font?


PK

I kept the skeleton of my doc if ever... The test inits at the page 11.

Here below the same test case with only 2 pages.

The real used font is free: Century Schoolbook L for my doc.

a.l.e

can you also attach a screenshot of what you see?

personally, with the fonts replaced with random ones on my computer, it does not really look good but i don't see either what is wrong with it.

personally, i mostly don't like the drop caps effects but if i needed to do it, i would turn off "auto-indent" and set an offset of 1mm

PK

Quote from: a.l.e on January 18, 2024, 05:12:24 PMcan you also attach a screenshot of what you see?

personally, with the fonts replaced with random ones on my computer, it does not really look good but i don't see either what is wrong with it.

personally, i mostly don't like the drop caps effects but if i needed to do it, i would turn off "auto-indent" and set an offset of 1mm

-08 is the form I want to get (1st paragraph without indent, the second one with indent)
-32 is my second page, with the same style and the error: the first paragraph is indented!
-07 is now the automatic indent property (for the two next images)
-24 is now still not indented for the first line, but all the next ones are indented!
-44 is the second page which is now OK

If it is not clear, tell me!






a.l.e

i wanted to check how exactly you defined your styles... but, indeed there are too many!

anyway, i tried to reproduce your sample with the C and i did not have any issue (if i got what you want to achieve...)

- drop caps
- 2 lines
- 1 mm of margin

lettrine.png

PK

Quote from: a.l.e on January 18, 2024, 05:46:51 PMi wanted to check how exactly you defined your styles... but, indeed there are too many!

anyway, i tried to reproduce your sample with the C and i did not have any issue (if i got what you want to achieve...)


I used only 'Chapitre', 'Premier paragaphe' and 'Paragraphe' styles in my document, then you need to check only them.

I'm able to correct my doc by hands, as I said. If I remove by hands the bad text by reintroducing a new one, the problem is gone. The problem is that I have many paragraphs such as it!

My case doc is targeted to be analyzed, to understand why it happened and eventually to have a trick for a general solution, because to correct all by hand is a little bit tricky... I suspect an import problem from LibreOffice format, but I can't prove it...

a.l.e

In order to further help you, i need to know, if what I have recreated is exactly what you need.

If it's not, please modify my .sla upload it, together with a screenshot of the result.

It's much easier to discuss about a simple example rather than 20 pages long document with dozens of styles and potential local formatting...

PK

Quote from: a.l.e on January 18, 2024, 07:35:03 PMIn order to further help you, i need to know, if what I have recreated is exactly what you need.

If it's not, please modify my .sla upload it, together with a screenshot of the result.

It's much easier to discuss about a simple example rather than 20 pages long document with dozens of styles and potential local formatting...

OK, I modified your .sla for having what I want. I have added a second style named Paragraphe, which is the second paragraph without lettrine *and* an indentation at the first line. 

Thanks for your help

PatJr

is this what you are looking for?

for the indents I have to type the numbers in the dialog box or it doesn't work properly

PK

Quote from: PatJr on January 18, 2024, 10:36:48 PMis this what you are looking for?

for the indents I have to type the numbers in the dialog box or it doesn't work properly


No, it isn't. What I'm looking for is what I have corrected in your last lettrine.sla.

Per chapter...
* first paragraph with lettrine and no indent for the first line
* other paragraphs without lettrine and indent for the first line
(this is a very classical typo in French)

The image bellow does not show the chapter title, but it is the idea  8)

This works perfectly with Scribus if I do it by hands. If I import a text from LO, it failed. First, the import of style does not work perfectly (i.e. the lettrine case does not work). But it is easy to correct by hands, by correcting the style.

At this point, it remains problems, as I have described in the thread. Some paragraphs with lettrine work nice (no indent) and some no. Without obvious reasons. I put a test case, for analyzing, showing a paragraph OK and an other KO. If you correct my test case by hands, it will work of course. I suppose there is "something" in the text of the first paragraph or something elsewhere that changes the indentation. I confess to not having disassembled the .sla to see what is wrong inside... 

My first question is to know if it is a bug (may be from the import process) or not. And the second point is - if we can understand what is wrong -  to have a trick for being able to correct easily all my doc  :D   

I hope to be clear  ;D

a.l.e

from what i can tell, all you need to do is to remove the "auto indent" from the "premier paragraph" style.
(well, as i wrote in a previous post, and as i did in my sla, you should probably also add a small margin between the drop cap and the start of the text... but that's up to you)

then it you should be fine.

PK

As I said, the problem is not how to do. I know and it works well. The problem is WHY it does not work with the example I put... It is easy to correct, but WHY this example does not look like it should be.

I guess that there is a bug and this is the reason why I propose an example...

a.l.e

#13
as i wrote above: you need to remove the auto-indent from your "premier paragraph" style.

and for the second "relevant" page remove the first line indent or "re-apply" the "premier paragraph" style.

then, it will look like this:

premier-paragraph.png

... which, if i understood you correctly, is what you are looking for.

p.s.: theoretically, you should be able to reset all your text to the style defaults, but while writing this reply, i've hit this bug: https://bugs.scribus.net/view.php?id=17141

PK

Yes. It is what I do to correct the problem. But it is a mess, because there are more than the half of the chapters to do :(

My target is not to how to correct it (except eventually if there is a general way to prevent this 'behavior'), but to confirm the problem and to propose a test case in order that the Scribus dev team might analyze for correcting in the future ;-)