I'd like left- and right-justified text on the same line. e.g.
Some text here And some text over here
I've tried tabularx and TabularC, but they are not precise enough to
line
up the text with the margins. Any suggestions?
Thanks,
Mark
>Hi,
>I'd like left- and right-justified text on the same line. e.g.
>Some text here And some text over here
If it's only for a line or so, try something like
Some text here \hspace{\stretch{1}} And some text over here
This setting is referred to as a "spring margin". Very few systems
allow for it.
> I've tried tabularx and TabularC, but they are not precise enough to
> line
> up the text with the margins. Any suggestions?
How much of the textwidth do you want to allocate to each side?
50%-50%? or 60%-40%? You need to decide this first.
\documentclass{article}
\newcommand{\spring}[2]{\par\noindent\hbox to\columnwidth{%
\vtop{\hsize=.45\columnwidth\flushleft#1\par}\hss
\vtop{\hsize=.45\columnwidth\flushright#2\par}}}
\begin{document}
\spring{Hi, I'd like left- and right-justified text on the same line.
e.g.\ some text here\dots}{\dots and some text over here. I've tried
\textsf{tabularx} and \textsf{TabularC}, but they are not precise
enough to line up the text with the margins. Any
suggestions? Thanks, Mark}
\end{document}
///Peter
I'd probably do it like Tim or Peter suggested. However, a tabular
certainly is precise enough. The trick is to suppress the extra padding
on the left and right of the extreme columns using @{} (and probably also
a \noindent):
\noindent
\begin{tabular*}{\columnwidth}{@{\extracolsep{\fill}}lr@{}}
Some text here & And some text over here \\
\end{tabular*}
-- Scott