Discussion:
[scribus] updating positions by editing positions
Gary Dale
2018-10-29 23:12:02 UTC
Permalink
One of the things I hate about Scribus is that it seems to duplicate
styles on a whim. In one document I'm currently working on, it created
40 copies of the styles. One of the things I like about it is that I can
fix this with a text editor by removing the duplicated styles directly
then saving the file. This is a lot faster than removing them using the
style delete dialogue.

I have a document that I need to make multiple changes to the positions
and widths of numerous text objects - the same changes for each of
hundreds of objects that I could presumably do directly by editing the
.sla file. However when I look at the object positions, the numbers
don't make sense.

For example, a 136mm x 7mm text object that is located 9mm from the left
margin and 7mm from the top of the page shows as XPOS="125.512611023622"
YPOS="1343.85051968504" WIDTH="385.511811023622" HEIGHT="19.8425196850394".

Another 24mm x 28mm object 5mm lower shows as XPOS="125.512611023622"
YPOS="1358.0237480315" WIDTH="68.0314960629921" HEIGHT="79.3700787401575".

From the width & height, and the offset for the second object, it
appears that the internal unit is around 0.3mm but where do the XPOS and
YPOS numbers come from?


___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://wiki.scribus.net
http://forums.scribus.net
Gregory Pittman
2018-10-30 00:32:42 UTC
Permalink
One of the things I hate about Scribus is that it seems to duplicate styles on a whim. In one document I'm currently working on, it created 40 copies of the styles. One of the things I like about it is that I can fix this with a text editor by removing the duplicated styles directly then saving the file. This is a lot faster than removing them using the style delete dialogue.
I have a document that I need to make multiple changes to the positions and widths of numerous text objects - the same changes for each of hundreds of objects that I could presumably do directly by editing the .sla file. However when I look at the object positions, the numbers don't make sense.
For example, a 136mm x 7mm text object that is located 9mm from the left margin and 7mm from the top of the page shows as XPOS="125.512611023622" YPOS="1343.85051968504" WIDTH="385.511811023622" HEIGHT="19.8425196850394".
Another 24mm x 28mm object 5mm lower shows as XPOS="125.512611023622" YPOS="1358.0237480315" WIDTH="68.0314960629921" HEIGHT="79.3700787401575".
From the width & height, and the offset for the second object, it appears that the internal unit is around 0.3mm but where do the XPOS and YPOS numbers come from?
I'm not sure why, but it looks like these numbers are points, and are referenced to the canvas -- the space around the document.

Greg


___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://wiki.scribus.net
http://forums.scribus.net
Gary Dale
2018-10-30 02:19:15 UTC
Permalink
Post by Gregory Pittman
One of the things I hate about Scribus is that it seems to duplicate styles on a whim. In one document I'm currently working on, it created 40 copies of the styles. One of the things I like about it is that I can fix this with a text editor by removing the duplicated styles directly then saving the file. This is a lot faster than removing them using the style delete dialogue.
I have a document that I need to make multiple changes to the positions and widths of numerous text objects - the same changes for each of hundreds of objects that I could presumably do directly by editing the .sla file. However when I look at the object positions, the numbers don't make sense.
For example, a 136mm x 7mm text object that is located 9mm from the left margin and 7mm from the top of the page shows as XPOS="125.512611023622" YPOS="1343.85051968504" WIDTH="385.511811023622" HEIGHT="19.8425196850394".
Another 24mm x 28mm object 5mm lower shows as XPOS="125.512611023622" YPOS="1358.0237480315" WIDTH="68.0314960629921" HEIGHT="79.3700787401575".
From the width & height, and the offset for the second object, it appears that the internal unit is around 0.3mm but where do the XPOS and YPOS numbers come from?
I'm not sure why, but it looks like these numbers are points, and are referenced to the canvas -- the space around the document.
Greg
They seem to be points but what canvas? I have a mult-page document (48
in this case) and each object seems to be placed on a page via the
OwnPage attribute. The objects on OwnPage  0 seem to have less bizarre
numbers but they still don't make sense.

I checked an item at the top of OwnPage 26 and found that its position
seems to be taken approximately from the start of the document - but
only if the pages were about 230mm tall instead of the 210mm of the A5
paper size.

This leads me to conclude that the OwnPage attribute is used to document
what page an object is on but the actual positioning is taken from some
other point near the start of the document. Despite the OwnPage
attribute, the objects aren't positioned on the page but rather within
the entire document.

The XPOS positions seem to consistent across pages but again appear to
reference a position off to the left of the page.

The pages are just A5 and there are no bleeds. I can't find a definition
of Canvas with respect to Scribus as anything other than the page or pages.

Calculating from the XPOS numbers, I find that they seem consistently to
be from a spot about 35mm to the left of the page. This is about 100
points. When I try to calculate the value for the page height (take the
object from page 27 (OwnPage 26), convert the position to mm, subtract
the object's position on the page then divide by the number of previous
pages (26) and convert back to points, I get 40.77. If account for an
extra "top canvas" of about 20 points, the calculation gets very close
to 40 points.

This suggests that the canvas extends beyond the page by 100 points on
the left and by 20 points on the top and bottom of each page.

___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://wiki.scribus.net
http://for
JLuc
2018-10-30 10:13:30 UTC
Permalink
I checked an item at the top of OwnPage 26 and found that its position seems to be taken approximately from the start of
the document - but only if the pages were about 230mm tall instead of the 210mm of the A5 paper size.
Yes this is it.

The overhead is for the free workspace between pages.

JL



___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://wiki.scr
Gregory Pittman
2018-10-30 13:24:59 UTC
Permalink
Post by JLuc
I checked an item at the top of OwnPage 26 and found that its position seems to be taken approximately from the start of the document - but only if the pages were about 230mm tall instead of the 210mm of the A5 paper size.
Yes this is it.
The overhead is for the free workspace between pages.
Look at File > Preferences > Display > Scratch Space tab. The extra distance in XPos should correspond to the Left Scratch Space, and in YPos to the Top Scratch Space. I suppose additional Ypos distances relate to the Vertical Gaps Between Pages.

Greg

___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://wik

Gary Dale
2018-10-30 01:07:22 UTC
Permalink
Post by Gary Dale
One of the things I hate about Scribus is that it seems to duplicate
styles on a whim. In one document I'm currently working on, it created
40 copies of the styles. One of the things I like about it is that I
can fix this with a text editor by removing the duplicated styles
directly then saving the file. This is a lot faster than removing them
using the style delete dialogue.
I have a document that I need to make multiple changes to the
positions and widths of numerous text objects - the same changes for
each of hundreds of objects that I could presumably do directly by
editing the .sla file. However when I look at the object positions,
the numbers don't make sense.
For example, a 136mm x 7mm text object that is located 9mm from the
left margin and 7mm from the top of the page shows as
XPOS="125.512611023622" YPOS="1343.85051968504"
WIDTH="385.511811023622" HEIGHT="19.8425196850394".
Another 24mm x 28mm object 5mm lower shows as XPOS="125.512611023622"
YPOS="1358.0237480315" WIDTH="68.0314960629921"
HEIGHT="79.3700787401575".
From the width & height, and the offset for the second object, it
appears that the internal unit is around 0.3mm but where do the XPOS
and YPOS numbers come from?
I received an off-list reply from Bert that says that Scribus uses 1/72"
points internally. Again, this confirms the figures that I get for the
width & height of the objects.

However the positions are as I described them and the margins are 6mm
all around (a little less than 1/4"). If taken from the edge of the
paper, the 9mm left position which shows as 125.5... should be more like
25 points and the YPOS, which seems to be increasing as objects move
down the page, should be even smaller.

I know I've got the correct objects from their content and from the
OwnPage attribute. I also checked another object on another page (page
0) and got similar results, except the XPOS and YPOS weren't totally
wacky. I expect to see about 2.83 mm per internal unit. For OwnPage 2
objects, the XPOS was 13.9 while the YPOS were 191.9 and 113.9. On
OwnPage 0, the XPOS was 4.2 and the YPOS was 2.93.

Can anyone provide any insight into how the XPOS and YPOS numbers are set?


___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://wiki.scribus.net
http://forums.scribus.net
Loading...