Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pullquote with several paragraphs shows wrong indentation #865

Closed
OlivierNicole opened this issue May 2, 2020 · 9 comments · Fixed by #1021
Closed

Pullquote with several paragraphs shows wrong indentation #865

OlivierNicole opened this issue May 2, 2020 · 9 comments · Fixed by #1021
Assignees
Labels
bug Software bug issue
Milestone

Comments

@OlivierNicole
Copy link
Member

Trying to put several paragraphs in a pullquote, the first paragraph came out unindented (which is normal), but so did the second.

image

(The last line of every paragraph is stretched, but that’s an easy fix.)

I couldn’t find why this is happening. I only noticed that when commenting out the mark typesetting, the second paragraph is indented.

@alerque alerque added the bug Software bug issue label May 2, 2020
@alerque
Copy link
Member

alerque commented May 4, 2020

My eyes start twitching and I get erratic muscle cramps in my neck whenever I see something that looks like it might turn out to be a pushBack() bug...

@OlivierNicole
Copy link
Member Author

Would you happen to have any pointers to what a pushBack() bug is?

@alerque
Copy link
Member

alerque commented Jun 6, 2020

@OlivierNicole The typesetter:pushBack() function (found in core/typesetter.lua) is the logic that tries to handle material that was originally shaped for one frame context but didn't end up fitting and gets pushed into the start of the next frame. The trouble is it has to unshape the contents, drop some things that are relative to the frame (glues that might be margins, etc.) then hope it all gets shaped right in the next frame context. It mostly works, but is notorious for having edge case bugs. We've rewritten it several times and it still isn't very robust.

@OlivierNicole
Copy link
Member Author

I see.

@CatholicPenguin
Copy link

Has there been any progress on this issue? How should I fix the last line stretching issue in the meantime?

@OlivierNicole
Copy link
Member Author

@PapistPenguin One simply needs to remove the temporary setting of parfillskip to a zero-width glue, which is the cause for that stretched line and is unnecessary given the way pullquote works.

I'll file in a merge request presently.

OlivierNicole added a commit to OlivierNicole/sile that referenced this issue Jul 13, 2020
This removes the stretched lines at the end of every paragraph but the
last, when a `pullquote` (from the `pullquote` package) contains several
paragraphs. It does not fix the bug mentioned in sile-typesetter#865.
OlivierNicole added a commit to OlivierNicole/sile that referenced this issue Jul 13, 2020
This removes the stretched lines at the end of every paragraph but the
last, when a `pullquote` (from the `pullquote` package) contains several
paragraphs. It does not fix the bug mentioned in sile-typesetter#865.
alerque pushed a commit that referenced this issue Jul 13, 2020
This removes the stretched lines at the end of every paragraph but the
last, when a `pullquote` (from the `pullquote` package) contains several
paragraphs. It does not fix the bug mentioned in #865.
@alerque alerque added the needs MWE Minimum working example needed for investigation label Jul 30, 2020
@alerque
Copy link
Member

alerque commented Jul 30, 2020

@OlivierNicole Do you have a working example (stripped down to as small an example as possible) that shows the second paragraph not indenting?

@OlivierNicole
Copy link
Member Author

@alerque Sure.

\begin[class=plain]{document}
\script[src=packages/pullquote]

\begin{pullquote}
You wonder that there are so few followers of the Pythagorean opinion [that the
earth moves] while I am astonished that there have been any up to this day who
have embraced and followed it.

Nor can I ever sufficiently admire the outstanding acumen of those who
have taken hold of this opinion and accepted it as true: they have,
through sheer force of intellect done such violence to their own senses as
to prefer what reason told them over that which sensible experience
plainly showed them to the contrary.

For the arguments against the
whirling of the earth we have already examined are very plausible, as we have
seen: and the fact that the Ptolemaics and the Aristotelians and all their
disciples took them to be conclusive is indeed a strong argument of their
effectiveness. But the experiences which overtly contradict the annual movement
are indeed so much greater in their apparent force that, I repeat, there is no
limit to my astonishment when I reflect that Aristarchus and Copernicus were
able to make reason so conquer sense that, in defiance of the latter, the
former became mistress of their belief.
\end{pullquote}

\end{document}

@alerque alerque removed the needs MWE Minimum working example needed for investigation label Jul 31, 2020
@alerque
Copy link
Member

alerque commented Jul 31, 2020

Thanks. That does reproduce for me. I'll have a look.

I suspect this is related to our drop-cap woes (which we have so many issues about I don't even know which one to link to). The paragraph merger definitely feels familiar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Software bug issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants