sillsdev / sillsdev/ptx2pdf

Fig positioning: Negative value for Lines field doesn't work

Open
#645 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

No action
Dominant language
Python
Stars
33
Forks
15
PR merge metrics
No merged PRs in 30d

Description

The Number of Lines setting doesn't work very well with a negative number, especially if you want to intrude on a preceding paragraph. In the first screenshot below the \fig was attached to \ref GEN 22:15-19. The text has v 19 starting a new paragraph. The final word of v 19 is hidden behind the picture (filenames reflect Module specs). The archive I've attached reflects this Module and PTXprint configuration.

When I tweaked the \ref statements to
\ref GEN 22:15-18 \fig....\fig* \ref GEN 22:19
the text is now all visible. But I would have liked to increase the picture size since it represents the story climax, and flow more lines of text down beside it, and force "Berseba" to its own line so the text block right edge follows the picture's edge better. Setting a negative #Lines figure does weird, unhelpful things. (Same behavior in ptxprint 2.1.12-Linux as in 2.1.13-Windows.)

Also, on p.3 of the PDF I wanted to raise the first pic to the top of the text (with a neg. value in #Lines but the pic jumps around, can't get it there. In general I'm having more success when I want to LOWER a pic's position on a page vs. RAISE it. I'm sure this is tricky under the hood!

Explanation--you might have a suggestion, perhaps? This module is designed to make quick formatting of the passage translated during an initial Translator Training Course, which might include 8-10 language teams. It needs to be done at the last minute after the teams have undergone a mock Consultant Check of their work. The texts do not all have the same paragraph markup, which makes it difficult when the positioning flakes out across paragraph boundaries. :) Anything we can do to simplify fitting the text to the pics would be helpful to the advisors/course staff responsible for printing the take-home books. So it would be ideal if no one had to tweak the Module \ref statements to make pics fit. However, I realize that this may be impossible....

Any thoughts?
Thanks!

fig attached v19
fig attached to v18
TTCBks22-BookWPicsTPIPTXprintArchive_02April.zip

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the behavior with the attached TTCBks22-BookWPicsTPIPTXprintArchive_02April.zip archive in PTXprint, focusing on negative #Lines values across paragraph boundaries. Compare the generated PDF with the screenshots; done means figures can be raised or lowered predictably without hiding text or requiring changes to the Module’s \ref statements.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, tex
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.