Graphics, Figures & TablesProblem with minipage margins

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
ivan_hr
Posts: 18
Joined: Fri Dec 10, 2010 12:32 pm

Problem with minipage margins

Post by ivan_hr »

Hi,
I'm having a problem with minipage margins. I have defined 2 minipages, one of which is a table (i.e. tabular environment) and the other one is a picture. Below is my code.

Code: Select all

\documentclass[12pt]{article}

\usepackage{latexsym,amssymb}
\usepackage{amsmath,array}
\usepackage[pdftex]{graphicx}
\usepackage[croatian]{babel}
\usepackage[margin=1in,headsep=2.5cm]{geometry}
\usepackage{setspace}


\setlength{\textwidth}{500pt}
\setlength{\textheight}{8in}
\setlength{\voffset}{-1.5cm}
\setlength{\hoffset}{-0.5cm}

\begin{document}

\begin{figure}[h]
\setstretch{1.5}
\begin{minipage}[t]{0.2\textwidth}
\begin{tabular}{l}
$c=14$ cm\\
$v_a=8$ cm\\
$\alpha=65^\circ$\\
\hline
$b=$?
\end{tabular}
\end{minipage}
\begin{minipage}[t]{0.2\textwidth}
\includegraphics[scale=0.2]{triangle.png}
\end{minipage}
\end{figure}

\end{document}
I don't understand why is the "table" much lower than the triangle picture? I can align them verticaly using the vspace command which solves my problem but I'm sure there must be a better way to do it?
Attachments
output.png
output.png (16 KiB) Viewed 8122 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
Post Reply