# How to align two boxes?

I found the following template for my master thesis and this is the preview for the cover:

• candidate

The problem is that I would the box "Candidato" aligned with "Relatore" but I don't know how to modify the following section (there are two different boxes, BoxRelatori and BoxCandidati, defined with the tabular command, the first aligned with "l" and the second with "r"):

     \def\BoxRelatori{%
\begin{tabular}[t]{l}%
\hbox{\ifclassica\else\large\fi
\textbf{\protect\@nomerelatore}}\\[.6ex]
\ifclassica
\\[1.5ex]\textbf{\Correlatore:}%
\fi
\else
\\[1.5ex]\textbf{\Correlatori:}%
\fi
\fi
\fi
\fi
\end{tabular}%
}%
\def\BoxCandidati{%
\begin{tabular}[t]{r}%
\hbox{\unless\ifclassica\large\fi
\textbf{\protect\@nomecandidato}}\\[.6ex]
\hbox{\large\textrm{\protect\@author}}%
\ifx\@secondauthor\empty
\else
\\\hbox{\large\textrm{\protect\@secondauthor}}%
\fi
\ifx\@thirdauthor\empty
\else
\\\hbox{\large\textrm{\protect\@thirdauthor}}%
\fi
\end{tabular}%


line 341-376: see the file here https://pastebin.com/xHYTr0Th

main .tex file here: https://pastebin.com/rraW1jaj

• Welcome to TeX SX! Could you post a code which produces a result likes in your image? – Bernard Jan 3 '18 at 14:08
• Of course, but there are several files. If it helps, this is the link where I downloaded it nl.sharelatex.com/templates/thesis/… – Alessandro Jan 3 '18 at 14:12
• Just a small file, and the macro/class file(s). – Bernard Jan 3 '18 at 14:21
• Linked two paste text – Alessandro Jan 3 '18 at 14:40
• Tip for the future: Do not hide name parts using an external program, just replace the names. How about Francesco Frankenstein, or Alessandro Antman? – Johannes_B Jan 6 '18 at 8:28

Something like this?

\documentclass{article}
\begin{document}

\noindent
\begin{minipage}[t]{0.49\textwidth}
\textbf{Relatore:}\\
Ch.mo Prof.\,Ing.\,Francesco da Assisi

\medskip
\textbf{Correlatore:}\\
Ing.\ Umberto Eco
\end{minipage}
\hfill
\begin{minipage}[t]{0.49\textwidth}
\raggedleft
\textbf{Candidato:}\\
Alessandro da Macedonia\\
Persepolis
\end{minipage}

\end{document}


I don't think it's necessary to construct an elaborate template. Two minipage environments, the first with ragged-right contents, the second with ragged-left contents, should suffice.

It wasn't clear to me if the minipages should be stacked horizontally or vertically. The following screenshot shows solutions for both possibilities.

\documentclass{article}
\begin{document}

\noindent
\begin{minipage}{\textwidth}
\obeylines
\raggedright
\textbf{Relatore:}
Ch.mo Prof.\ Ing.\ Francesco da Assisi

\medskip
\textbf{Correlatore:}
Ing.\ Umberto Eco
\end{minipage}
\begin{minipage}{\textwidth}
\raggedleft
\obeylines
\textbf{Candidato:}
Alessandro da Macedonia
Persepolis
\end{minipage}

\bigskip\bigskip

\noindent
\begin{minipage}[t]{0.5\textwidth}
\obeylines
\raggedright
\textbf{Relatore:}
Ch.mo Prof.\ Ing.\ Francesco da Assisi

\medskip
\textbf{Correlatore:}
Ing.\ Umberto Eco
\end{minipage}%
\begin{minipage}[t]{0.5\textwidth}
\raggedleft
\obeylines
\textbf{Candidato:}
Alessandro da Macedonia
Babylon
\end{minipage}

\end{document}