Text Formatting ⇒ Right aligning a left-aligned block of text
Right aligning a left-aligned block of text
I want to have a left aligned block of left aligned text on one side of the page and a right aligned block of left aligned text on the other. I have tried using a tabular environment, but I can't get exactly what I want without resorting to manually inputting column spacings (not ideal). Any ideas?
Thanks in Advance!!
Matt
Thanks in Advance!!
Matt
Last edited by Matt_Fl on Thu May 27, 2010 9:34 pm, edited 1 time in total.
NEW: TikZ book now 40% off at Amazon.com for a short time.

Re: Right aligning a left-aligned block of text
I'd help but I don't really understand what it is you want to do. What is a "right aligned block of left aligned text"?
Is the entire document going to be like this, or just a small part? Does one part wrap around to the other? Do you know how large you want these blocks to be? Why can't you use a tabular environment and insert column spacings as a portion of \textwidth?
Is the entire document going to be like this, or just a small part? Does one part wrap around to the other? Do you know how large you want these blocks to be? Why can't you use a tabular environment and insert column spacings as a portion of \textwidth?
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Right aligning a left-aligned block of text
Similar to frabjous I think that it would help if you describe what you are aiming at. There might be several solutions which can depend on the purpose.
Best regards and welcome to the board
Thorsten
Best regards and welcome to the board
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Right aligning a left-aligned block of text
Sorry, I realize my explanation was a bit confusing. I want something to right align the block of text (which is left aligned within itself) to the right margin. And the same thing on the left margin (this is trivial to do). This is going to be used for only a small section of my document, but maybe a few times throughout. I played around with using an offset to \textwidth, but the only way I could figure out how to do it was to manually input the offset. Is there a way to automate that process?
Right aligning a left-aligned block of text
I still don't have a clear understanding of what you want to do. Is the left aligned box and right aligned box next to each other in the same vertical position? How large do you want these paragraph blocks to be?
Anyway, consider using, e.g., a \parbox with an \hfill to push it to the right:
Anyway, consider using, e.g., a \parbox with an \hfill to push it to the right:
Code: Select all
\documentclass{article}
\begin{document}
\noindent\parbox{0.4\textwidth}{\raggedright Here is the text that goes on the left and I'm just filling it out a little so that it will take up multiple lines.}\hfill%
\parbox{0.4\textwidth}{\raggedright Here is the text that goes on the right and I'm just filling it out a little so that it will take up multiple lines.}
\bigskip
Here is some normal paragraph text so you can see what the above looks like in comparison.
\end{document}
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Right aligning a left-aligned block of text
I still have difficulties in getting involved with that because I can't figure out precisely how this is going to look like. So I can only suggest to take a look at the parallels or parcolumns package.
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Right aligning a left-aligned block of text
The parbox with hfill does what I want at the moment. I will check out the two packages if I want to do something more sophisticated in the future. Thank you!