sillsdev / ptx2pdf

XeTeX based macro package for typesetting USFM formatted (Paratext output) scripture files
23 stars 8 forks source link

UI does not seem to save fractional cutout positions. #808

Open davidg-sil opened 1 year ago

davidg-sil commented 1 year ago

Cutout positions can be fractions of a line, to allow for more precise positioning of the image within the cutout. The UI allows setting fractional values but it seems to turn the fraction into an integer when you try do actually do this.

Turning the value into a (positive) integer is correct for paragraph offsets, but incorrect for cutouts.

markpenny commented 1 year ago

@mhosken This is what needs to be fixed:

image

@davidg-sil At present the UI only allows multiples of 0.5 as the step value. Should this be changes to allow more refined values such as 3.7 with a step of 0.1?

davidg-sil commented 1 year ago

I would have thought so, yes. Well... maybe not: I don't know it's possible in the world of glade, but the fractional values are only valid when it's counting lines for cutouts, not when counting paragraphs. The tool tip says that, so I guess it's not possible, in which case maybe 0.5 and allowing people to set other values is a good compromise.

davidg-sil commented 1 year ago

While talking UI issues on that page, 'Before verse' strikes me as a bit confusing, even with the tool-tip. Would 'Immediate' work?

mhosken commented 1 year ago

tentative fix committed

markpenny commented 1 year ago

The fix hasn't changed anything (yet). The .piclist file still has a rounded number "cl3" instead of what the UI shows "cl2.5":

RUT 1.11 rūtun gir sēriyaḍun barobar nayomi son inval|src="co00956b.tif" size="col" pgpos="cl3" ref="1:15" scale="0.4"

I still need to work out a way (in the UI) to only allow integers for "Number of Paragraphs", while allowing 1 decimal place for "Number of Lines".

markpenny commented 1 year ago

This is still broken (as of 2.3.22): image

and the UI doesn't allow + / - to be clicked when it is a Paragraph: image

davidg-sil commented 8 months ago

Still broken. I've been doing some digging. Bug looks to be connected to the field being prefixed s_

davidg-sil commented 1 month ago

Still broken. (pre-2.6.5) To update / reiterate, there are 2 problems:

  1. PYTHON CODE: The decimal portion of the cutout position should get to the piclist, not just the integer.
  2. UI element: As this is intended for fine positioning of the figure in the cutout, with 1.5= "2 lines, raised half a line" and 1.49 = "1 line, but lowered (almost) half a line", the UI field should allow for smaller increments (0.1 or even 0.01 lines)
markpenny commented 1 month ago

Fixed for 2.6.8 Image