Generalright and left aligned on the same line?

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
akvik
Posts: 5
Joined: Mon Jan 07, 2008 6:58 pm

right and left aligned on the same line?

Post by akvik »

Hi,

I need to have some text that are both right- and left-aligned on the same line. (it's for a dictionary, and the right-aligned text is in arabic)

the \begin{flushright} makes a new paragraph, so it automatically creates a new line - does anyone know how to circumvent this, or is there another solution?

Thanks!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

right and left aligned on the same line?

Post by localghost »

Take a look at the parallel package. It lets you typeset text blocks side by side.


Best regards
Thorsten¹
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
akvik
Posts: 5
Joined: Mon Jan 07, 2008 6:58 pm

right and left aligned on the same line?

Post by akvik »

Thanks for a hyper-fast response! Will check the paralell package, but while reading about it, it seems that it makes two separate columns. The most ideal thing would be to have:

Code: Select all

SOME WORD HERE RIGHT ALIGNED TEXT
THAT CONTINUES BELOW THE WORD ON THE NEW LINES
WHILE STILL BEING RIGHT-ALIGNED
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Is that possible, you think? Ignore to reply if paralell fixes this, I can read the manual :)
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

right and left aligned on the same line?

Post by Stefan Kottwitz »

Hi akvik,

without parallel, a simple solution could be using \hfill:

Code: Select all

Code, edit and compile here:
SOME WORD \hfill RIGHT ALIGNED TEXT
\hfill THAT CONTINUES BELOW THE WORD ON THE NEW LINES
\hfill WHILE STILL BEING RIGHT-ALIGNED
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
\parindent could be set to 0pt to begin the text at the left margin.

Stefan
User avatar
Juanjo
Posts: 657
Joined: Sat Jan 27, 2007 12:46 am

right and left aligned on the same line?

Post by Juanjo »

... or even with the help of \parbox:

Code: Select all

Some word\hfill\parbox[t]{0.7\textwidth}{\raggedleft Right aligned text that
continues below the word on the new lines while still being right-aligned}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
akvik
Posts: 5
Joined: Mon Jan 07, 2008 6:58 pm

Re: right and left aligned on the same line?

Post by akvik »

Thanks! That works :)
Post Reply