[texhax] Vertical leaders alignment / Actual line width

lilliantadros at hotmail.com lilliantadros at hotmail.com
Wed Aug 27 10:22:05 CEST 2008

Hi, I'm trying to format chapter titles in a frame, where the title text is aligned bottom-right, and where the bottom line of the frame is vertically aligned with the baseline (thus the title text) and also ends right before the text startes, so it looks something  like this:
|                            |
|_____chapter name|

If anyone is familiar with the "Glenn" style in the fncychap package, this looks basically the same...
Anyway, I got up to that point, the trouble is when the text of the chapter title doesn't fit on one line. Ideally, I would want it to look like this:
|                             |
| A very long chapter|
|      title which spans|
|______several lines|

I got as far as putting it (right-aligned) in a parbox, and adjusting the vertical lengths. The trouble is with the bottom horizonal line: I give the maximum length for par-width, so doing it with rule+hfill+parbox like with single lines results in a zero-length rule, because the parbox takes up all the width. I checked out the pbox package, but it doesn't give me the width of the last line which is the one I'm interested in, and which is mostly the shortest.

I have several thoughts but I'm not exactly sure whether they make sense or how to implement them:
- If I could only find out the actual width of the last line, I could manually set the width of the bottom rule. But, like I said, pbox didn't calculate that.
- One could integrate the bottom line INSIDE the parbox, like with leaders or something. It's the closest I got, but then it's aligned with the first par line of course. Is there a way to indicate the vertical alignment of the leaders, so I could say it should point to the bottom line?
- One idea is to manually separate the lines of the parbox, but I'm not sure how, and is prob way difficult and not very clean...
- I tried setting the parbox first, vskipping and hskipping back to where the bottom line should start, and then rule+fill, but of course it then ignores the parbox altogether and goes the whole textwidth (right acros the bottom line).
- I thought maybe a white hrule or underline or something in the bottom of the parbox (are white chars processed at all or just ignored? Not even sure...) to overwrite the bottom rule where the bottom text is ("several lines"), but again not sure how...

ANY ideas are appreciated!!
Thanks in advance.
Be the filmmaker you always wanted to be—learn how to burn a DVD with Windows®.

More information about the texhax mailing list