[texhax] Positioning that depends on space available in the current line

Lars Madsen daleif at imf.au.dk
Mon Jun 20 14:32:34 CEST 2011


Aleksandar Zec wrote, On 2011-06-20 14:14:
> Hello,
> 
> I would like to achieve this effect:
> 
> aaaaaaaaaaaaaaaaaaaaaaaaa
> aaaaaaaaaaaaaaaaaaaaaaaaa
> aaaaaaa             bbbbb
> 
> aaaaaaaaaaaaaaaaaaaaaaaaa
> aaaaaaaaaaaaaaaaaaaaaaaaa
> aaaaaaa
>    bbbbbbbbbbbbbbbbbbbbbb
> 
> 'aaa' is a normal paragraph text. 'bbb' is a signature that should be
> positioned
> 
> (1) on the right end of the last line if there is enough place;
> (2) in the next line if there is not enough place, right aligned.
> 
> Any package/trick to do this automatically?
> 
> Thank you in advance,
> Alex
> _______________________________________________
> TeX FAQ: http://www.tex.ac.uk/faq
> Mailing list archives: http://tug.org/pipermail/texhax/
> More links: http://tug.org/begin.html
> 
> Automated subscription management: http://tug.org/mailman/listinfo/texhax
> Human mailing list managers: postmaster at tug.org

from the memoir class source:

\newcommand*{\sourceatright}[2][2em]{{%
   \unskip\nobreak\hfil\penalty50
   \hskip#1\hbox{}\nobreak\hfil{#2}
   \parfillskip\z@\finalhyphendemerits=0\par}}

might be helpful




-- 

/daleif


More information about the texhax mailing list