[OS X TeX] writing twice to the same line

Samuel Lelievre samuel.lelievre.tex at free.fr
Sun Dec 13 13:13:35 EST 2009

Following my earlier post - an example ... and questions.

An example illustrating the use of \rlap, \clap and \llap
in section titles, to answer Florian's question.  I hoped
that would solve it perfectly, but I have to admit I note
the following flaws in the output:

1. In the titles produced this way, the spaces around the
center bit aren't quite equal - the one on the left being
slightly larger.

2. If section numbers get to 10, the center bit will move
slightly right - because the width for the section number
gets bigger and the width for the section title shorter.

Not sure how to explain (1) nor how to solve (2) - I'd be
interested in any hints!

%%%%% rlap-clap-llap-in-sec-titles.tex %%%%%




\def\clap#1{\hbox to 0pt{\hss#1\hss}}

\title{\texttt{\string\rlap}, \texttt{\string\clap}
and \texttt{\string\llap} in section titles}





\section[]{\rlap{longer leftbit}\hfill\clap{centerbit}%


\section[]{\rlap{leftbit}\hfill\clap{longer centerbit}%


\hfill\llap{longer rightbit}}



More information about the MacOSX-TeX mailing list