[OS X TeX] writing twice to the same line

Samuel Lelievre samuel.lelievre.tex at free.fr
Sun Dec 13 18:49:19 CET 2009


Florian,

I solved a similar problem thanks to the commands \llap,
\rlap and \clap, described / introduced in the very nice
document "A complement to \smash, \llap, and \rlap", by
Alexander R. Perlis, available at

   http://math.arizona.edu/~aprl/publications/mathclap/

These commands should help you do exactly what you need.

Best wishes,
SL


-----
From: Florian Grammel <grammel at gmx.net>
Date: Sun, 13 Dec 2009 11:51:38 +0100

Dear list-members

I need to do quite a peculiar setup for section-headers,
where a part of the heading has to be aligned to both
sides and another part centered *in the same line*.
Until now I've tried something like:

\section[]{%
left text%
\hfill %
right text%
\\\vspace{-1.5\baselineskip}
\begin{center}center text\end{center}%
}

That gives me more or less the layout I want, but the
negative vspace can't really account for the \\ because
the amout of the lineskip varies by context and by page.
And as I need this type of section-heading a lot of
times, I'd hate to fiddle with this by hand for every
occurence.

Is there any (context-insensitive) way to make LaTeX put
text in the same line two times independently? Or should
I try a completely different approach?

Thanks in advance and best regards
Florian.

Florian Grammel
Gentofte, Denmark




More information about the macostex-archives mailing list