[texhax] leaders protruding a fixed width from end of paragraph?
texforeverything at att.net
Fri Mar 18 18:39:13 CET 2011
On Thu, 17 Mar 2011 01:02:53 -0500, Paul Isambert <zappathustra at free.fr>
> Selon Stan<texforeverything at att.net>:
>> > Is there a way to fill the last line of a paragraph with leaders that
>> > extend a fixed width beyond the right edge of the paragraph, with
>> > right-aligned numbers on the right? I'm trying to get something
>> like this:
>> > Here's a sentence..................2
>> > Here's a sentence on two
>> > lines..............................5
>> > Here's the last sentence
>> > also on two lines.................11
>> > I tried using \leaders twice, once with \hfill to get to the edge of
>> > paragraph, and once with a fixed \hskip. That did not align the
>> > correctly, but that should not be hard to fix. The main problem was
>> > I could not get the \leaders to meet seamlessly.
> Use \leaders only once, but set \parfillskip to a negative value
> beforehand, as
> ... end of paragraph.\leaders\copy0\hfil<number>
Thanks. That works perfectly.
>> > I hope that this can be done somehow without modifying the output
>> > routine. Is that possible?
> This has indeed nothing to do with the output routine.
I was making this way more complicated than I need to. I was thinking
that I might need to know how much text ends up on the last line after the
paragraph is split into lines.
More information about the texhax