Graphics, Figures & TablesMinipage Alignment

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
mdk31
Posts: 20
Joined: Wed Mar 11, 2009 4:38 am

Minipage Alignment

Post by mdk31 »

I'm trying to get three minipages to align properly on my custom titlepage, the first two vertically aligned along the first line and the third one lying below the first. But it's not coming out quite right, the first two won't align along the "Mentors" line and the third minipage comes out below the third but it's indented. But if I don't put the \vspace command in, it runs right below the minipage, which I think looks awkward.

Code: Select all

Code, edit and compile here:
\begin{minipage}{0.5\textwidth}
\begin{flushleft}
\normalsize
\textbf{Industry Mentors:}\\
Person #1 \\
Person #2\\
Person #3 \\
\end{flushleft}
\end{minipage}
\begin{minipage}{0.5\textwidth}
\begin{flushright}
\normalsize
\textbf{Academic Mentor}\\
Person #4
\end{flushright}
\end{minipage}
\vspace{0.5cm}
\begin{minipage}[c]{0.5\textwidth}
\begin{flushleft}
{ \normalsize \textbf{Student Researchers:}\\
Person #5 (project manager)
Person #6\\
Person #7\\
Person #8\\
\end{flushleft}
\end{minipage}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Minipage Alignment

Post by frabjous »

To make the first two minipages line up, use the [t] option to align them both at the top vertically.

I wasn't exactly sure what you meant about the third one being indented. If I had to guess though, it's probably that a space is being put in because you didn't comment out the linefeed at the end of the \vspace command. Might as well put in the \noindent command as well.

Try something like:

Code: Select all

Code, edit and compile here:
\documentclass{article}
\begin{document}
\noindent%
\begin{minipage}[t]{0.5\textwidth}
\begin{flushleft}
\normalsize
\textbf{Industry Mentors:}\\
Person \#1 \\
Person \#2\\
Person \#3 \\
\end{flushleft}
\end{minipage}
\begin{minipage}[t]{0.5\textwidth}
\begin{flushright}
\normalsize
\textbf{Academic Mentor}\\
Person \#4
\end{flushright}
\end{minipage}
\vspace{0.5cm}%
\noindent%
\begin{minipage}[t]{0.5\textwidth}
\begin{flushleft}
\normalsize \textbf{Student Researchers:}\\
Person \#5 (project manager)\\
Person \#6\\
Person \#7\\
Person \#8\\
\end{flushleft}
\end{minipage}
\end{document}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
However, since you didn't provide a full, compiliable example, it may well be that there are differences between what I have here and what you had in mind. (Your code used # where it needs \#, and there's a stray { or a missing } on one of the lines.)
mdk31
Posts: 20
Joined: Wed Mar 11, 2009 4:38 am

Re: Minipage Alignment

Post by mdk31 »

Bless you, thanks, this works perfectly! I can't tell you how many times this forum has helped me with a LaTeX problem.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10323
Joined: Mon Mar 10, 2008 9:44 pm

Re: Minipage Alignment

Post by Stefan Kottwitz »

Hi mdk31,

great to hear that it's working.
Generally if a problem has been solved please the topic as "solved". This can be done by editing the initial post changing the topic icon to the green checkmark.

Kind regards,

Stefan
LaTeX.org admin
Post Reply