[scribus] updating positions by editing positions

Gary Dale garyndp at gmail.com
Tue Oct 30 02:19:15 UTC 2018


On 2018-10-29 08:32 PM, Gregory Pittman wrote:
> On 10/29/18 7:12 PM, Gary Dale wrote:
>> 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.



More information about the scribus mailing list