Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I had two different lines into a block flushright.it is so:

           Foo
Hello Everyone

I would align these two lines in this way:

Foo
Hello Everyone

Edit:

\begin{flushright}
Foo
Hello Everyone
\end{flushright}

I would align Foo to the second line

share|improve this question
1  
Please add a minimal working example (MWE) that illustrates your problem. It should include your existing code using the flushright environment. Have you tried flushleft? –  Werner Sep 7 '12 at 22:17
    
Edited and insert an example –  Mazzy Sep 7 '12 at 22:24
    
Use \begin{flushright} Foo \par Hello Everyone \end{flushright} or \begin{flushleft} Foo \par Hello Everyone \end{flushleft} or use \\ instead of \par. It depends on your usage/implementation. –  Werner Sep 7 '12 at 22:27

2 Answers 2

up vote 6 down vote accepted

Use a tabular:

\begin{flushright}
\begin{tabular}{@{}l@{}}
Foo \\
Hello everyone
\end{tabular}
\end{flushright}

With @{} we remove the default space that's inserted also at the left and right of a tabular.

share|improve this answer
    
yeah it worked...thanks so much –  Mazzy Sep 7 '12 at 22:54

I want to ask a question to egreg's answer. You answer is actually correct, but the vertical space between Foo and Hello everyone is increased. Do you have any way to solve this situation? Thanks

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.