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.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have this problem:

Basically on the second line "Matricola: XXXXXX" isn't right aligned.

My latex is:

\begin{minipage}[t]{7cm}
\textsc{Relator}

Prof. NameName\\
\end{minipage}
\hfill
\begin{minipage}[t]{7cm}
\hfill \textsc{Candidato}

\hfill Name Name\\
\hfill Matricola: XXXXX
\end{minipage}

is there any way to fix this?

share|improve this question
up vote 17 down vote accepted

Don't use \hfill for the alignment, use \flushleft and \flushright:

\begin{minipage}[t]{7cm}
\flushleft
\textsc{Relator}

Prof. NameName\\
\end{minipage}
\hfill
\begin{minipage}[t]{7cm}
\flushright
\textsc{Candidato}

Name Name\\
Matricola: XXXXX
\end{minipage}
share|improve this answer
    
it sounds good!.. – dynamic Oct 3 '12 at 11:14

A \hfill that occurs at the start of a line will be ignored. To avoid this, use \null\hfill in place of \hfill.

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.