LaTeX forum ⇒ Graphics, Figures & TablesMinipage Alignment

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

Minipage Alignment

Postby mdk31 » Thu Jun 24, 2010 7:34 pm

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.

  1. \begin{minipage}{0.5\textwidth}
  2. \begin{flushleft}
  3. \normalsize
  4. \textbf{Industry Mentors:}\\
  5. Person #1 \\
  6. Person #2\\
  7. Person #3 \\
  8. \end{flushleft}
  9. \end{minipage}
  10. \begin{minipage}{0.5\textwidth}
  11. \begin{flushright}
  12. \normalsize
  13. \textbf{Academic Mentor}\\
  14. Person #4
  15. \end{flushright}
  16. \end{minipage}
  17.  
  18. \vspace{0.5cm}
  19. \begin{minipage}[c]{0.5\textwidth}
  20. \begin{flushleft}
  21. { \normalsize \textbf{Student Researchers:}\\
  22. Person #5 (project manager)
  23. Person #6\\
  24. Person #7\\
  25. Person #8\\
  26. \end{flushleft}
  27. \end{minipage}

Link:
BBcode:
HTML:
Hide post links
Show post links

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

Postby frabjous » Thu Jun 24, 2010 10:16 pm

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:

  1. \documentclass{article}
  2. \begin{document}
  3. \noindent%
  4. \begin{minipage}[t]{0.5\textwidth}
  5. \begin{flushleft}
  6. \normalsize
  7. \textbf{Industry Mentors:}\\
  8. Person \#1 \\
  9. Person \#2\\
  10. Person \#3 \\
  11. \end{flushleft}
  12. \end{minipage}
  13. \begin{minipage}[t]{0.5\textwidth}
  14. \begin{flushright}
  15. \normalsize
  16. \textbf{Academic Mentor}\\
  17. Person \#4
  18. \end{flushright}
  19. \end{minipage}
  20.  
  21. \vspace{0.5cm}%
  22. \noindent%
  23. \begin{minipage}[t]{0.5\textwidth}
  24. \begin{flushleft}
  25. \normalsize \textbf{Student Researchers:}\\
  26. Person \#5 (project manager)\\
  27. Person \#6\\
  28. Person \#7\\
  29. Person \#8\\
  30. \end{flushleft}
  31. \end{minipage}
  32. \end{document}


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.)

Link:
BBcode:
HTML:
Hide post links
Show post links

mdk31
Posts: 20
Joined: Wed Mar 11, 2009 4:38 am

Postby mdk31 » Thu Jun 24, 2010 10:29 pm

Bless you, thanks, this works perfectly! I can't tell you how many times this forum has helped me with a LaTeX problem.

Link:
BBcode:
HTML:
Hide post links
Show post links

User avatar
Stefan Kottwitz
Site Admin
Posts: 7801
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:

Postby Stefan Kottwitz » Fri Jun 25, 2010 12:01 pm

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
Site admin

Link:
BBcode:
HTML:
Hide post links
Show post links


Return to “Graphics, Figures & Tables”

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 6 guests