Take the 2-minute tour ×
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.

I'm new here. I just have a problem with the minipage environment. The problem is that the tables aren't horizontally aligned. I want these table aligned one by one, but I don't know what's wrong. Here is the code.

\centering
    \begin{table}[h]
        \begin{minipage}[c]{.2\linewidth}       
            \begin{tabular}{|cc|}
\hline
$n$ & $\theta(º)$ \\ \hline
1   & 13.558      \\ \rowcolor[gray]{0.7}
2   & 27.959      \\
3   & 44.690      \\ \rowcolor[gray]{0.7}
4   & 69.668      \\ \hline
            \end{tabular}
            \subcaption{Predicción teórica.} \label{kbrteo}
        \end{minipage}%

        \begin{minipage}[c]{.8\linewidth}
            \begin{tabular}{|cccccccc|}
\hline
                $n$ & $\theta(º)$ & $\delta \theta(º)$& $\theta(rad)$   & $\delta \theta(rad)$ & $sin\theta$ &$\delta sin\theta$ & $\frac{n\lambda}{2}$(\AA) \rule{0in}{10pt}\\ \hline

\cellcolor[gray]{0.2}& 12.2       & 0.01              & 0.213           & 0.002                & 0.211       & 0.002             & \cellcolor[gray]{0.2} \\
1                    & 13.6       & 0.01              & 0.237           & 0.002                & 0.235       & 0.002             & 0.771 \\ \rowcolor[gray]{0.7}
2                    & 27.9       & 0.01              & 0.487           & 0.002                & 0.468       & 0.002             & 1.542 \\
3                    & 44.5       & 0.01              & 0.777           & 0.002                & 0.701       & 0.001             & 2.314 \\ \rowcolor[gray]{0.7}
4                    & 69.1       & 0.01              & 1.206           & 0.002                & 0.934       & 0.001             & 3.085 \\\hline


            \end{tabular}
            \subcaption{Posiciones observadas.} \label{kbrexp}
        \end{minipage}%
    \caption{Estudio de las posiciones de los máximos de difracción para el KBr.}\label{kbr}
    \end{table}
share|improve this question
    
Welcome to TeX.SX! –  Kevin C Dec 14 '13 at 19:34
1  
You have a blank line between the two minipages. –  John Kormylo Dec 14 '13 at 19:36
    
Thank you...how fool!! Thanks! –  daro Dec 15 '13 at 0:23

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.