Yo también respaldaría la sugerencia de Mark: suba el espacio desigual máximo hasta 0.5 o más. Intentará más soluciones de ruptura, pero aún intentará ajustar el texto en la menor cantidad de líneas posible, y al hacerlo también permitirá más espacio en la última línea del párrafo.
El código actualmente permite que la última línea de un párrafo incluya un espacio extra de 'desigualdad', y realmente no le gusta acercarse al límite de esa desigualdad. Como vio, si no permite que la 'desigualdad' sea notable, está pidiéndole que justifique el texto. De hecho, está pidiéndole que justifique completamente el texto, incluida la última línea.
Si dice \tracing{j} en su archivo ptxprint-mods.tex, entonces su registro incluirá mucha información extra, y las líneas interesantes para esta pregunta se verán algo así:
s@tsideskips p (p). 0.0pt/0.0pt, pf=0.0pt plus 1.0fil
s@tsideskips s1 (s1). 0.0pt plus 158.52597pt/0.0pt plus 158.52597pt, pf=0.0pt
Los primeros 2 indican cuánto sangrado más desigualdad se permite a la izquierda / derecha.
El último es el \parfillskip y es una medida de cuánto espacio se permite en la última línea del párrafo (hasta infinito para p, y ningún espacio extra para s1 centrado). (quizás eso sea un poco duro?? Básicamente dice que no debería importarle si la última línea es la más larga)
s@tsideskips q2 (q2). 21.68065pt/0.0pt plus 79.26299pt, pf=0.0pt plus 79.26299p
t
Para q2 alineado a la derecha (ragged-right), veo que la desigualdad es de 79.26pt, y la última línea puede tener 79.26 puntos extra, por lo que estará muy descontento al permitir más de 169.5 puntos de espacio en la línea final.
I’d echo Mark’s suggestion: push the maximum ragged space all the way to 0.5 or more. It’ll try more break solutions, but it’ll still try to fit the text into as few lines as it can, and doing that will also allow more space on the last line of the paragraph.
The code currently lets the last line of a paragraph include an extra ‘raggedness’ of space, and it really doesn’t like getting near the limit of that raggedness. As you saw, if you don’t allow the ‘raggedness’ to be noticeable, you’re asking it to justify the text. Actually, you’re asking it to fully justify the text, including the last line.
If you say \tracing{j} in your ptxprint-mods.tex file, then your log will include a lot of extra stuff, and the interesting lines for this question will be looking something like this:
s@tsideskips p (p). 0.0pt/0.0pt, pf=0.0pt plus 1.0fil
s@tsideskips s1 (s1). 0.0pt plus 158.52597pt/0.0pt plus 158.52597pt, pf=0.0pt
The first 2 are how much indent plus raggedness are allowed on left / right.
That last one is the \parfillskip and is a measure of how much space there is allowed to be on the last line of the paragraph (up to infinite for p, and no extra space for centered s1). (maybe that’s a bit harsh?? It basically says that it shouldn’t care if the last line is the longest)
s@tsideskips q2 (q2). 21.68065pt/0.0pt plus 79.26299pt, pf=0.0pt plus 79.26299p
t
For ragged-right q2, I’m seeing that the raggedness is 79.26pt, and the last line can have an extra 79.26 points, so it’ll be very unhappy at allowing more than 169.5 points of space on the final line.
Traducción automática desde English