View Issue Details

IDProjectCategoryView StatusLast Update
0011071ScribusStory Editor / Text Framespublic2022-01-29 22:34
ReporterJLuc Assigned To 
PrioritynormalSeveritycrashReproducibilityhave not tried
Status confirmedResolutionopen 
Product Version1.5.0svn 
Target Version1.5.4 
Summary0011071: buggy behaviour with align-right tabs
DescriptionSame with 1.4.1 and today 1.5svn

On a (bottom of page) line i want
- say : the name of the magazine, the internet site and the date aligned left on that line, size of font = 8.8
- the pagenumber, aligned at the right.

So i create a frame for this line, a dedicated paragraph style, and i set a right-align tab at the right of the frame.
I type text, tab, insert page number special character, OK.

Now i want the page number to be in a bigger size : 9 is ok, 10 is ok,
11 is not ok at all. left part of the text collapse and print over itself.

I try to sort things out.
I try to widen the frame : when it is twice as wide as needed, the page number jumps further right, much further than the tab position specifies it. And after doing so, the left part of the text is not collapsed anymore... (but the page number is far right outside of the page!)

TagsCTL, CTL-layout-changes, layout, MABs
PatchNo

Relationships

related to 0012565 closedjghali Right alignment of hyphens 
has duplicate 0013372 closed Text overwrites in frames 
related to 0008445 confirmed Tabs are no longer respected when justified 
related to 0012442 closed Disordering of text in text box 

Activities

JLuc

2012-09-15 00:38

developer  

JLuc

2012-09-15 00:38

developer  

JLuc

2012-09-15 00:42

developer   ~0028930

Last edited: 2015-10-11 20:44

I uploaded 2 screen captures.
This happens after i set a character size twice bigger for page number than for the left text.

- with too wide frame : the linenumber goes far too far right, considering the position of the right align tab in the ruler.

- with normal size frame : right align tab does not show anymore in ruler, and left text has collapsed.

size of page number is 22 here.

JLuc

2012-12-28 16:00

developer   ~0029505

AMOF the behaviour is weird. Editing the text with a right tab has really unpredictable effects like the image shows, but some other effects too.

I upload a self documented SLA. tabs are between > and < chars.

"Right tab 2 line jumps errors.sla" : A linebreak is "randomly" inserted in the string after the tab. Sometimes disappear when editing the text, sometime comes back, in a non-consistant way.

JLuc

2012-12-28 16:01

developer  

JLuc

2012-12-28 16:02

developer  

right tab line break error.png (90,246 bytes)   
right tab line break error.png (90,246 bytes)   

JLuc

2012-12-28 16:04

developer   ~0029506

Last edited: 2015-10-11 20:44

It looks like these problems arise when the right tab is "too close" to the right border of the frame.

I upload SLA file and png image producing the "line collapsed" bug when one of the letter behing the tab is larger than others.

JLuc

2012-12-28 16:21

developer  

JLuc

2012-12-28 16:22

developer  

JLuc

2013-01-26 16:07

developer   ~0029769

Last edited: 2013-01-26 16:07

Same with 1.4.2
Align right tab collapses all text on the left before the tab.

JLuc

2013-03-20 18:37

developer  

scribus_tab_bug.png (30,256 bytes)   
scribus_tab_bug.png (30,256 bytes)   

JLuc

2013-03-20 18:39

developer   ~0030002

Last edited: 2013-03-20 19:10

I uploaded another screencast due to an "align right" issue reported on irc.
The issue is only on first line. The reporter says :
"The contents were made with the "generate table of contents" tool. I tried resetting manual character formatting, and also removing the line and re-typing it manually.

There are some very weird dependencies with the content of the first line. If I change the initial P into an S, the problem disappears. Adding some other letter in front also makes it disappear, but punctuation does not.
Since it only occurs in the first line, I was able to work around it by adding an empty line to the beginning of the frame and moving it up by the corresponding amount.

It only occurs on the first line, and only if the last character is 0, 2, 3, 6, 8 or 9 (didn't test anything but numbers). Only specific fonts as well, but there's more than one font that exhibits this.

As an update to that, the buggy number doesn't actually need to be the last character, it's enough that it occurs anywhere in the right part. So strings like a3a will also trigger the bug.
"

stefanb

2013-06-28 07:43

reporter   ~0030385

I appararently ran into the same problem and found this open bug.

I first encountered it using the font League Gothic, but it seems to happen with certain others as well (e.g. Arial). I can confirm that the problem only occurs when one of the above mentioned numbers appear, and only on the first line.

The problem does not only exist for a right aligned but also for a center aligned tab.

zerubbabel

2013-08-05 11:50

reporter   ~0030503

To me, this is a really annoying bug because it makes formatting running headers and footers very tedious, having to insert enough hard spaces between words to make the text readable, and then whenever the bug is fixed, having to go back and take the spaces out of each document. I wish it could be bumped to a higher priority.

utnik

2013-10-15 13:35

updater   ~0030731

i think, this should be classified as a bug, not as a feature!

JLuc

2014-04-09 21:16

developer   ~0031669

Last edited: 2014-06-26 19:32

0008445 and 0012442 are related to align right tabs too

Kunda

2014-07-08 17:32

updater   ~0032599

marked as 'bug' from feature + bumped to 1.5.1. Closing duplicate of this bug

JLuc

2015-10-11 20:43

developer   ~0036630

0013372 brings a new SLA example with image.

Kunda

2015-11-03 03:17

updater   ~0037166

William, seems 0013372 is a duplicate of this ticket.

Dawoodalbadi

2015-11-08 08:20

reporter   ~0037312

Last edited: 2022-01-26 21:59

I am trying to look to this issue
I found the all text layout behaviours compressed in one function contain more than 2000 line and that really very bad code management. I hope the designer of the code break this function in many small functions.
In our situation there are 2 main problems
- first one : shrinking the text while the frame resizing
- second problem: when you make the frame bigger the position of the text does not change to most right
these problems happen only when you use the special char "TAB"

so
 my proposal to solve this issue is finding the piece of code that check if entered char is tap or expanding char and add new assign for shrinking and position values

I will try to solve this issue but the big problem is understanding what the programmer try to show in pagitem_textframe::layout >>>> very inconvenience function
I put proposal to discus if I am correct and if not can you explain what wrong
regard
dawood

william

2015-11-08 08:58

updater   ~0037313

If you come up with patches, I can test them.
I agree with you about PageItem_TextFrame::layout()
It is too long, and it has repetitive code that could be factored out.
Also, it has a lot of tests for special cases, more than a normal Scribus user could memorize, which is probably detrimental to Scribus usability.
I don't know if the Scribus project has regression tests, but I think that it would be impossible to make major changes to PageItem_TextFrame::layout() without a representative set of Scribus documents to use for regression testing.
I had Scribus 1.4 documents that didn't preserve their formatting in Scribus 1.5, and I tracked it down to a change in PageItem_TextFrame::layout(), but it turned out that 1.5 implemented something that 1.4 ignored. http://bugs.scribus.net/view.php?id=12636
When I looked at the code, I added a way to add debugging. Those patches have been sitting around for over a year, so they probably won't be accepted and might have some bit rot, but they might still be useful, especially the changes to scdebug.h. http://bugs.scribus.net/view.php?id=12650
Regards, William

JLuc

2015-11-08 21:12

developer   ~0037325

PageItem_TextFrame::layout : in that heavy chunk of code, if you understand some set of codelines that uses a clearly defined context to perform a clearly defined action, then you could usefully create a dedicated function for that code. If you manage to create enough of such higher level function, it will be more easy to manage, debug and improve the code.

Dawoodalbadi

2015-11-09 05:00

reporter   ~0037326

I rise a comment to discuss the way to solve the issue of tab
I will not change the function layout because i will not understand it ever ^_^

please if anyone have idea to share about tabs and shrinking share it.

william

2015-11-09 06:34

updater   ~0037331

I have an example in the duplicate entry http://bugs.scribus.net/view.php?id=13372 with an overwrite that goes away if I remove a <tab/> from the SLA.
If I had the time to look into it, I would start with the SLA that I posted in that report and make a second copy that is identical except for removing one of the <tab/> items that provokes the overwrite.
Then I would add debug code to the layout code and compare the output from the two files.
The first difference in the debug output from the good and bad SLAs should indicate where the layout is going wrong.
It might take a few iterations of adding debug code and checking the differences in the debug output to pin down the line of code that causes the problem.
You would need to understand the code only enough to have an idea where to add the debug code and what to print.

Since it happens in both Scribus 1.4 and 1.5, it probably isn't worth looking at recent changes, but if you could find an even older version of Scribus where the tabs work, you could do a "git bisect" or "svn-bisect" to find the commit that caused the problem. Scribus has under 32K revisions, so bisection would take at most 15 steps, provided that you could find an old version of Scribus that does not have the tab problem and that is still buildable from source.

Dawoodalbadi

2015-11-09 11:40

reporter   ~0037341

Thank you all Who reply for me
I divide the problem to 3 tasks:

    Task 1: text after tab.
    Task 2: text before tab.
    Task 3: align to right.
 
I fix task 1 and now in task 2 I found out the tab has fixed size and it depend on the width of the frame so when you maximize the frame the text will be fine but when you minimize the frame it will continue to compress the text before the tab until the width of frame became as same as size of tab then the tab will goes to the next line and every thing will be fine.

so I need to know if the behaviour of tab is good or it need to be change. Two options on front of me :
1- make the tab shrinking to a limit and then it goes to next line
2- make the tab goes directly to next line if the width of the frame does not fit for it

please confirm for the best idea to start working for it.

Dawoodalbadi

2015-11-09 11:58

reporter   ~0037342

Just one comment to add
The problem does not depend on the aligment. Aligment is another problem, but the main problem is how scribus deal with TAB

JLuc

2015-11-09 17:37

developer   ~0037352

as for me i dont understand the 2 options you propose. I think you should describe the situation you are tackling = an example of the tab position and exact definition and the text and the exact size of the frame.
Maybe you could also propose a drawing with the various situations (bugy situation as is now, option 1, option 2).
Maybe also William will understand and answer you better than i do.

Dawoodalbadi

2015-11-10 05:17

reporter   ~0037366

Last edited: 2015-11-10 05:18

Mr JLuc I assume you understand what tab mean >>>>
tab is an expanding blank the right behaviour for it is to shrink according to the content of line or stay in the default size. for example the tab in MVS is 4 spaces by default but it depend on the previous.
for example:
this is(------tab----------)first line.
this is a wrong(--tab--)line

this two lines have tab but the tab in the next line is shrinking to organize the text.

this is the basic idea of the tab
now in our problem the tab have text before and text after. The text after I solved its problem easily but the text before I just have confused because what is happening it shrink the (text before the tab) instead of shrink the tab

This happens only when the frame does not fit to the text before the tab and the tab
the right behaviour in my opinion is when the text does not fit in the width of the frame its go in next line as any char but I have to ask if this is what the developers need or they want the tab shrinking a little bet and then goes to the next line. that because they want the tab shrinking but instead some thing goes wrong and let the text shrinking

I hope I clarify my point completely

Dawoodalbadi

2015-11-10 05:34

reporter   ~0037368

In the 2 lines that I show the the behaviour of the tab I adjust the end of tab but I think it will not be clear so I will draw it later and I will upload it here

JLuc

2015-11-10 10:37

developer   ~0037376

Last edited: 2015-11-10 16:18

i'm sorry it takes long to understand but, well, that's how it is sometime when 2 non-english native speakers meet !

Now i dont understand how you use the word 'fit'.
What does it mean to you when you say "the frame does not fit to the text" ?
I could maybe understand it means that the frame is bigger than the text, but it doenst make much sense so can you explain ?
And specifically what do you mean when you say "the frame does not fit to the text before the tab and the tab" ?

etc

Dawoodalbadi

2015-11-10 10:46

reporter   ~0037377

I have to record Screencast to show you
I will try to record as soon as i can

Dawoodalbadi

2015-11-10 11:10

reporter   ~0037380

https://drive.google.com/open?id=0B2zhep1TjhN_MWN1WDVkdk1oRnM

look to tab position and text before it, the tab will push the text and shrink it until the width of tab became close to frame width and then the tab will goes down and every thing will became ok

i am discussing the issue of tab now and ignoring the alignment for now

Kunda

2015-11-10 16:15

updater   ~0037391

Dawood, your google drive link requires permission to access. Can you open it up so that's not required? Or perhaps use a different service...?

JLuc

2015-11-10 16:27

developer   ~0037392

Yes dawood, i know that bugy behaviour.

If you ask "what is the correct" behaviour, then my answer is : look in a Open Office or Libre Office. You can recreate the same situation and see how it behaves. oK ?

Dawoodalbadi

2015-11-11 05:09

reporter   ~0037411

Last edited: 2015-11-11 05:15

sorry kunda,,

I change the sitting
you can see it now


ok jluc i will do as liberoffice if I can :(
only I get confused when I read the title of issue and I want to show that the main problem is (not) alignment,

Dawoodalbadi

2015-11-11 11:01

reporter   ~0037419

Last edited: 2015-11-11 11:07

I am sorry to disturb you but I really need to understand this issue

again I get confused when I produce the issue
I modify the code slightly and I try to open the old sla file that jluc upload and it had another problem when I maximize the frame so I will upload small patch and I need someone reproduce the problem and record the screen what will happen to understand the issue come from the code or another dependency.

JLuc

2015-11-11 11:55

developer   ~0037421

Thats fine dawood.

Since your work might have global effects on other situations with tabs, i recommend that you prepare and upload a no-regression-checks.sla document with a wide set of paragraphs and frames and tabs situations, where you and we can check that your patch or patches dont introduce regressions.
Could you prepare and upload this no-regression-check.sla along with the corresponding produced reference PDF ?

Dawoodalbadi

2015-11-12 05:27

reporter   ~0037440

Last edited: 2015-11-12 06:02

because I am not an expert in using scribus I get confused in producing the issue so I explain what I know in the sla file

I notice that the problems comes out only with some formats
so I am asking what is exactly steps that you are doing to produce that sla file that you upload in the past

JLuc

2015-11-12 09:23

developer  

JLuc

2015-11-12 09:35

developer   ~0037448

OK. I updated the no-regression-test.sla in adding the View > Display invisible glyphs option.

3 remarks including 1 answer :

1) none of the sample produces the error.
You could add one or 2 sample with errors so as to both check no-regression AND test efficiency of future patches

2) none of the tested situations use paragraph styles. Tab positions are only default positions.

But in scribus, tabs position can also be defined in the paragraph style.
Of course, your patch should fix the issue in all situations : default tab positions and paragraph styles defined positions.
And your no-regression-cheks.sla should ensure there is no regression also with paragraph style defined tabs.

As a consequence, it would be good to add a 2nd page of example with tabs paragraphs that use styles that have defined tab positions.
And of course, you could also include some buggy paragraphs in this 2nd page.


3) It could be that the answer to your "what steps produce the issue" is : defining tab positions in the paragraph styles.
Look at the paragraph style of each the buggy paragraphs that have been uploaded and see where the tabs are positionned and what sort of tabs it is etc. so you can reproduce... and fix.

JLuc

2015-11-12 09:37

developer   ~0037449

4) dont use "no style" paragraphs because its more ambiguous how scribus deals with them and we need to be 100% sure of what is expected when debuging such an issue. Instead, use "Default paragraph styles".

Dawoodalbadi

2015-11-15 05:47

reporter   ~0037488

hello jluc
sorry
that was not a patch I am only try to discover from where the problems comes
now it is clear that the bug happen because of many things>>>
so I will come back for this issue at the end of this week

JLuc

2015-11-23 13:31

developer   ~0037605

have you found out something ?

Dawoodalbadi

2015-11-24 03:19

reporter   ~0037630

Jluc I am sorry for unconvince. I am so buzy this days but I promise you as soon as I can I will come back for this issue

JLuc

2016-04-03 18:08

developer   ~0039730

Same today, with scribusboxes.

Kunda

2016-05-18 14:14

updater  

Example2.jpg (162,511 bytes)   
Example2.jpg (162,511 bytes)   

Kunda

2016-05-18 14:15

updater   ~0041197

uploaded another example of this bug from a dupe (0012442)

JLuc

2016-12-04 13:09

developer   ~0042653

As of today CTL appimage, it seems align right tabs are buggy : they seem totaly ignored. Testing uploaded "right tab collapsed error.sla"

Issue History

Date Modified Username Field Change
2012-09-15 00:30 JLuc New Issue
2012-09-15 00:38 JLuc File Added: line wider = bad action of tab.png
2012-09-15 00:38 JLuc File Added: normalline - tab disappeared in ruler and collapsed left text.png
2012-09-15 00:42 JLuc Note Added: 0028930
2012-12-28 16:00 JLuc Note Added: 0029505
2012-12-28 16:01 JLuc File Added: right tab 2 line jumps error.sla
2012-12-28 16:02 JLuc File Added: right tab line break error.png
2012-12-28 16:04 JLuc Note Added: 0029506
2012-12-28 16:21 JLuc File Added: right tab line collapsed error.png
2012-12-28 16:22 JLuc File Added: right tab 3 line collapsed error.sla
2013-01-26 16:07 JLuc Note Added: 0029769
2013-01-26 16:07 JLuc Note Edited: 0029769
2013-01-26 23:41 christoph_s Status new => confirmed
2013-03-20 18:37 JLuc File Added: scribus_tab_bug.png
2013-03-20 18:39 JLuc Note Added: 0030002
2013-03-20 18:48 JLuc Note Edited: 0030002
2013-03-20 19:10 JLuc Note Edited: 0030002
2013-06-28 07:43 stefanb Note Added: 0030385
2013-08-05 11:50 zerubbabel Note Added: 0030503
2013-10-15 13:35 utnik Note Added: 0030731
2014-04-07 15:42 JLuc Tag Attached: layout
2014-04-09 21:16 JLuc Note Added: 0031669
2014-06-26 19:32 JLuc Note Edited: 0031669
2014-06-26 19:32 JLuc Note Edited: 0031669
2014-06-27 01:53 Kunda Relationship added related to 0008445
2014-06-27 01:55 Kunda Relationship added related to 0012442
2014-07-08 17:32 Kunda Note Added: 0032599
2014-07-08 17:32 Kunda Priority normal => high
2014-07-08 17:32 Kunda Severity feature => minor
2014-07-08 17:32 Kunda Target Version => 1.5.1
2014-10-04 16:13 JLuc Relationship added related to 0012565
2014-11-06 19:29 Kunda Tag Attached: MABs
2014-12-24 16:43 JLuc Patch => No
2014-12-24 16:43 JLuc Priority high => urgent
2014-12-24 16:43 JLuc Severity minor => crash
2015-09-17 20:08 Kunda Category Story Editor / Text Frames => Story Ed/Txt Frames
2015-09-17 20:12 Kunda Category Story Ed/Txt Frames => Story Editor / Text Frames
2015-10-11 20:37 JLuc Relationship added has duplicate 0013372
2015-10-11 20:43 JLuc Note Added: 0036630
2015-10-11 20:44 JLuc Note Edited: 0028930
2015-10-11 20:44 JLuc Note Edited: 0029506
2015-11-03 03:17 Kunda Note Added: 0037166
2015-11-08 08:20 Dawoodalbadi Note Added: 0037312
2015-11-08 08:22 Dawoodalbadi Tag Attached: HOST-Oman
2015-11-08 08:31 Dawoodalbadi Note Edited: 0037312
2015-11-08 08:58 william Note Added: 0037313
2015-11-08 21:12 JLuc Note Added: 0037325
2015-11-09 05:00 Dawoodalbadi Note Added: 0037326
2015-11-09 06:34 william Note Added: 0037331
2015-11-09 11:40 Dawoodalbadi Note Added: 0037341
2015-11-09 11:58 Dawoodalbadi Note Added: 0037342
2015-11-09 17:37 JLuc Note Added: 0037352
2015-11-10 05:17 Dawoodalbadi Note Added: 0037366
2015-11-10 05:17 Dawoodalbadi Note Edited: 0037366
2015-11-10 05:18 Dawoodalbadi Note Edited: 0037366
2015-11-10 05:34 Dawoodalbadi Note Added: 0037368
2015-11-10 10:37 JLuc Note Added: 0037376
2015-11-10 10:37 JLuc Note Edited: 0037376
2015-11-10 10:46 Dawoodalbadi Note Added: 0037377
2015-11-10 11:10 Dawoodalbadi Note Added: 0037380
2015-11-10 16:15 Kunda Note Added: 0037391
2015-11-10 16:18 Kunda Note Edited: 0037376
2015-11-10 16:27 JLuc Note Added: 0037392
2015-11-11 05:09 Dawoodalbadi Note Added: 0037411
2015-11-11 05:15 Dawoodalbadi Note Edited: 0037411
2015-11-11 11:01 Dawoodalbadi Note Added: 0037419
2015-11-11 11:04 Dawoodalbadi File Added: try1.diff
2015-11-11 11:07 Dawoodalbadi Note Edited: 0037419
2015-11-11 11:55 JLuc Note Added: 0037421
2015-11-12 05:27 Dawoodalbadi Note Added: 0037440
2015-11-12 05:27 Dawoodalbadi File Added: no-regression-check.sla
2015-11-12 05:58 Dawoodalbadi File Deleted: try1.diff
2015-11-12 06:02 Dawoodalbadi Note Edited: 0037440
2015-11-12 09:22 JLuc File Deleted: no-regression-check.sla
2015-11-12 09:23 JLuc File Added: no-regression-check.sla
2015-11-12 09:35 JLuc Note Added: 0037448
2015-11-12 09:37 JLuc Note Added: 0037449
2015-11-15 05:47 Dawoodalbadi Note Added: 0037488
2015-11-23 13:31 JLuc Note Added: 0037605
2015-11-24 03:19 Dawoodalbadi Note Added: 0037630
2016-01-23 17:17 cbradney Target Version 1.5.1 => 1.5.3
2016-04-03 18:08 JLuc Note Added: 0039730
2016-05-18 14:14 Kunda File Added: Example2.jpg
2016-05-18 14:15 Kunda Note Added: 0041197
2016-12-04 13:07 JLuc Tag Detached: HOST-Oman
2016-12-04 13:09 JLuc Note Added: 0042653
2016-12-04 13:09 JLuc Tag Attached: CTL
2016-12-04 13:50 JLuc Tag Attached: CTL-layout-changes
2016-12-08 22:04 Kunda Target Version 1.5.3 => 1.5.4
2022-01-26 21:59 JLuc Note Edited: 0037312
2022-01-29 22:34 JLuc Priority urgent => normal