[OS X TeX] writing twice to the same line
Chris Goedde
cgg.lists at gmail.com
Sun Dec 13 15:08:14 CET 2009
On Dec 13, 2009, at 4:51 AM, Florian Grammel wrote:
> 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?
I think something like this works, but maybe someone can improve upon
it:
\documentclass{article}
\newlength{\widthleft}
\newlength{\widthright}
\newcommand{\sectest}[3]{%
\noindent%
\settowidth{\widthleft}{#1}%
\settowidth{\widthright}{#3}%
#1%
\hspace{-\widthleft}
\hspace{\widthright}\hfill#2\hfill#3%
\\%
}
\begin{document}
\sectest{Left text}{Center text}{Right text}
\sectest{More Left text}{Center text}{Right text}
\end{document}
Chris
More information about the macostex-archives
mailing list