# floating a tabular in a tabular using minipage

I am able to build the tex just fine, and using the minipage allowed the content on the right to float correctly over the given "blank space" that I was trying to take advantage of by doing this but the content on the left is still getting being affected by this.

My goal would be to have the "Miscellaneous" mutlicolumn float over the whole integral multicolumn, so I can take advantage of this wasted space. Here is the section in question. I am also still new to latex fwiw.

**edit, I've included the entire document as per requested

\documentclass[8pt,letterpaper]{extarticle}
\usepackage[utf8x]{inputenc}
\usepackage{ucs}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{multirow}
\usepackage{array}
\usepackage{tikz}
\usepackage{graphicx}
\usepackage[hmargin={0in,0in},vmargin={0in,0in},portrait]{geometry}
\usepackage{setspace}
\usepackage{float}
\DeclareMathOperator{\sech}{sech}
\DeclareMathOperator{\csch}{csch}
\author{Jon}
\begin{document} % Beginning of Document
\begin{spacing}{1.3}

\begin{flushright}%unit circle
\begin{tabular}{c}
\multicolumn{1}{c}{Trig} \\
\scalebox{0.43}{
\begin{tabular}{c}
\begin{tikzpicture}
[scale=3.8,cap=round,>=latex]
% draw the coordinates
\draw[->] (-1.5cm,0cm) -- (1.5cm,0cm) node[right,fill=white] {$x$};
\draw[->] (0cm,-1.5cm) -- (0cm,1.5cm) node[above,fill=white] {$y$};

% draw the unit circle
\draw[thick] (0cm,0cm) circle(1cm);

\foreach \x in {0,30,...,360} {
% lines from center to point
\draw[gray] (0cm,0cm) -- (\x:1cm);
% dots at each point
\filldraw[black] (\x:1cm) circle(0.4pt);
% draw each angle in degrees
\draw (\x:0.6cm) node[fill=white] {$\x^\circ$};
}

% draw each angle in radians
\foreach \x/\xtext in {
30/\frac{\pi}{6},
45/\frac{\pi}{4},
60/\frac{\pi}{3},
90/\frac{\pi}{2},
120/\frac{2\pi}{3},
135/\frac{3\pi}{4},
150/\frac{5\pi}{6},
180/\pi,
210/\frac{7\pi}{6},
225/\frac{5\pi}{4},
240/\frac{4\pi}{3},
270/\frac{3\pi}{2},
300/\frac{5\pi}{3},
315/\frac{7\pi}{4},
330/\frac{11\pi}{6},
360/2\pi}
\draw (\x:0.85cm) node[fill=white] {$\xtext$};

\foreach \x/\xtext/\y in {
% the coordinates for the first quadrant
30/\frac{\sqrt{3}}{2}/\frac{1}{2},
45/\frac{\sqrt{2}}{2}/\frac{\sqrt{2}}{2},
60/\frac{1}{2}/\frac{\sqrt{3}}{2},
% the coordinates for the second quadrant
150/-\frac{\sqrt{3}}{2}/\frac{1}{2},
135/-\frac{\sqrt{2}}{2}/\frac{\sqrt{2}}{2},
120/-\frac{1}{2}/\frac{\sqrt{3}}{2},
% the coordinates for the third quadrant
210/-\frac{\sqrt{3}}{2}/-\frac{1}{2},
225/-\frac{\sqrt{2}}{2}/-\frac{\sqrt{2}}{2},
240/-\frac{1}{2}/-\frac{\sqrt{3}}{2},
% the coordinates for the fourth quadrant
330/\frac{\sqrt{3}}{2}/-\frac{1}{2},
315/\frac{\sqrt{2}}{2}/-\frac{\sqrt{2}}{2},
300/\frac{1}{2}/-\frac{\sqrt{3}}{2}}
\draw (\x:1.25cm) node[fill=white] {$\left(\xtext,\y\right)$};

% draw the horizontal and vertical coordinates
% the placement is better this way
\draw (-1.25cm,0cm) node[above=1pt] {$(-1,0)$}
(1.25cm,0cm)  node[above=1pt] {$(1,0)$}
(0cm,-1.25cm) node[fill=white] {$(0,-1)$}
(0cm,1.25cm)  node[fill=white] {$(0,1)$};
\end{tikzpicture}
\end{tabular}
} \\
\end{tabular}
\end{flushright}%End unit circle

\begin{tabular}{l l l l} %Derivates
\multicolumn{4}{c}{\textbf {\underline {Derivatives}}} \\
\textbf {\underline {Trig}} & \textbf {\underline {Inverse Trig}} & \textbf {\underline {Hyperbolic Trig}} & \textbf {\underline {Exponential/Log}}  \\
$\frac{d}{dx}\left(\sin x\right)=\cos x$
& $\frac{d}{dx}\left(\sin^{-1} x\right)=\frac{1}{\sqrt{1-x^2}}$
& $\frac{d}{dx}\left(\sinh x\right)=\cosh x$
& $\frac{d}{dx}\left(a^x\right)=a^x \ln a$
\\ %end row1

$\frac{d}{dx}\left(\cos x\right)=-\sin x$
& $\frac{d}{dx}\left(\cos^{-1} x\right)=\frac{1}{\sqrt{1-x^2}}$
& $\frac{d}{dx}\left(\cosh x\right)=\sinh x$
& $\frac{d}{dx}\left(e^x\right)=e^x$
\\ % end row2

$\frac{d}{dx}\left(\tan x\right)=\sec^2 x$
& $\frac{d}{dx}\left(\tan^{-1} x\right)=\frac{1}{\sqrt{1+x^2}}$
& $\frac{d}{dx}\left(\tanh x\right)=\sech^2 x$
& $\frac{d}{dx}\left(\ln x\right)=\frac1 x , x > 0$
\\ %end row3

$\frac{d}{dx}\left(\sec x\right)=\sec x \tan x$
& $\frac{d}{dx}\left(\sec^{-1} x\right)=\frac{1}{|x|\sqrt{x^2-1}}$
& $\frac{d}{dx}\left(\sech x\right)=-\sech x \tanh x$
& $\frac{d}{dx}\left(\ln |x|\right)=\frac1 x , x \neq 0$
\\%end row4

$\frac{d}{dx}\left(\csc x\right)=-\csc x \cot x$
& $\frac{d}{dx}\left(\sec^{-1} x\right)=\frac{1}{|x|\sqrt{x^2-1}}$
& $\frac{d}{dx}\left(\csch x\right)=-\csch x \coth x$
&
\\%end row5

$\frac{d}{dx}\left(\cot x\right)=-\csc^2 x$
& $\frac{d}{dx}\left(\cot^{-1} x\right)=\frac{1}{\sqrt{1+x^2}}$
& $\frac{d}{dx}\left(\coth x\right)=-\csch^2 x$
&
%end row6
\end{tabular} %end of Derivates
%\begin{doublespace}
%emptyspace
%\end{doublespace}
\begin{tabular}[!htp]{l l} % Identities/Substitution
\multicolumn{2}{c}{\textbf {\underline {Identities/Substitution}}} \\
\textbf {\underline {Trig/Hyperbolic Trig}} & \textbf {\underline {Exp/log}} \\
$\sqrt{a^2-b^2x^2} \Rightarrow x=\frac{a}{b} \sin \theta$
&$e^{- \infty} =0$
\\

$\sqrt{a^2+b^2x^2} \Rightarrow x=\frac{a}{b} \tan \theta$
&$\pm \ln 0= \mp \infty$
\\

$\sqrt{b^2x^2-a^2} \Rightarrow x=\frac{a}{b} \sec \theta$
& $\ln e = 1$
\\

$\sinh = \frac{1}{2} \left( e^x - e^{-x} \right)$
&$\sum\limits_{n=0}^{\infty} = \frac{x^n}{n!}$
\\

$\cosh = \frac{1}{2} \left( e^x + e^{-x} \right)$
&
\\

$\sin^2 \theta + \cos^2 \theta = 1$
&
\\

$\tan^2 \theta + 1 = \sec^2 \theta$
&
\\

$\cot^2 \theta +1 = \csc^2 \theta$
&
\\

\end{tabular} %end identities/Substitution

\begin{tabular}{l l l l} %Integrals
\multicolumn{4}{c}{\textbf {\underline {Integrals}}} \\
\textbf {\underline {Trig}} & \textbf {\underline {Inverse Trig}} & \textbf {\underline {Hyperbolic Trig }}& \textbf {\underline {Exponential/Log}}\\

$\int \cos u du = \sin u +c$
& $\int \frac{1}{\sqrt{a^2+u^2}}du = \frac1 a \sin^{-1} \left( \frac u a \right) +c$
&$\int \sinh u du=\cosh u+c$
& $\int \frac1 x dx \equiv \int x^{-1} =\ln|x|+c$
\\%end row1

$\int \sin u du = -\cos u +c$
&$\int \frac{1}{a^2+u^2}du = \frac1 a \tan^{-1} \left( \frac u a \right) +c$
&$\int \cosh u du=\sinh u+c$
& $\int \frac{1}{ax+b}dx=\frac1 a \ln |ax+b|+c$
\\%end row2

$\int \tan u du = \ln |\sec u| +c$
&$\int \frac{1}{u \sqrt{u^2-a^2}}du = \frac1 a \sec^{-1} \left( \frac u a \right) +c$
&$\int \tanh u du=\ln (\cosh u)+c$
&$\int a^u du= \frac{a^u}{\ln a}+c$
\\%end row3

$\int \sec u du = \ln |\sec u + \tan u|+c$
&
&$\int \sech u du=\tan^{-1}| \sinh u| +c$
&$\int e^u du =e^u +c$
\\%end row4

$\int \csc u du = \ln |\csc u - \cot u|+c$
&
&$\int \sech u \tanh u du=-\sech u +c$
&$\int ue^u du =(u-1)e^u +c$
\\%end row5

$\int cot u du = \ln |\sin u |+c$
&
&$\int \csch u \coth u du=-\csch u +c$
&$\int \ln u du = u \ln (u) - u+c$
\\%end row6

$\int \sec u \tan u du = \sec u +c$
&
&$\int \sech^2 du=\tanh u +c$
&$\int \frac{1}{u \ln u}du = \ln| \ln u |+c$
\\%end row7

$\int \csc u \cot u du =-\csc u +c$
& \begin{minipage}[t]{2in}
\begin{tabular}[t]{l}
\multicolumn{1}{l}{\textbf {\underline {Miscellaneous}} }\\
$\int \frac{1}{a^2-u^2}du = \frac{1}{2a}\ln | \frac{u+a}{u-a}|+c$
\\
$\int \frac{1}{u^2-a^2}du = \frac{1}{2a}\ln | \frac{u-a}{u+a}|+c$
\\
$\int \sqrt{a^2+u^2}du =\frac{u}{2} \sqrt{a^2+u^2}+ \frac{a^2}{2} \ln|u+ \sqrt{a^2+u^2}|+c$
\\
$\int \sqrt{u^2-a^2}du =\frac{u}{2} \sqrt{u^2-a^2}- \frac{a^2}{2} \ln|u+ \sqrt{u^2-a^2}|+c$
\\
$\int \sqrt{a^2-u^2}du =\frac{u}{2} \sqrt{a^2-u^2}+ \sin^{-1} \left( \frac{u}{a} \right)+c$
\end{tabular}
\end{minipage}
&$\int \csch^2 du=-\coth u +c$
&
\\%end row8

$\int \sec^2 u du = \tan u +c$
&
&
&
\\%end row9

$\int \csc^2 u du = -\cot u +c$
&
&
&
\\%end row10

$\int \cot^2u du = -x - \cot u +c$
&
&
&
\\%end row11

&
&
&
\\ %end row 12

&
&
&
\\%end row13

&
&
&
\\%end row14

\end{tabular} %end integrals

\end{spacing}
\end{document} % End of Document

-
In general: for math the array environment is better suited than tabular. The both are more or less identical but array places the cells in mathmode automatically. – Martin Scharrer Jul 1 '11 at 7:42
I don't quite understand the problem. Also it would be helpful to add a complete compilable example including \documentclass thru \end{document}. I don't have the hyperbolic functions deifned in {amsmath}. – Peter Grill Jul 1 '11 at 7:57
I've updated my original post with my entire document. – Jonathan Jul 1 '11 at 8:19
Welcome to TeX.sx! Thanks for the code. Often adding a minimal working example (MWE) that illustrates the problem helps a great deal. – Martin Scharrer Jul 1 '11 at 10:16

It is a little hard to understand what exactly you trying to do. I assume now that you want to squeeze the a little wider section "Miscellaneous" below "Inverse Trig" to the right of the last lines of "Trig". The issue you experience is that the minipage is to high and increases the total height of the cell which pushes all further rows down, including the one sin "Trig". The [t] (top) option of minipage and tabular only controls where the baseline is drawn, i.e. which part of the total height is taken as height and what as depth. In this case you simply have a large depth which doesn't help you much.

To solve this you need to reduce or remove the vertical size of the minipage. This can be done by placing it inside \raisebox{0pt}[0pt][0pt]{<content>}. Which raises it by 0pt (mandatory argument) and sets the height and depth to 0pt (first and second optional argument):

\raisebox{0pt}[0pt][0pt]{%
\begin{minipage}[t]{2in}%
\begin{tabular}[t]{..}
columns ...
\end{tabular}%
\end{minipage}%
}


Using the adjustbox package/environment with some correct trim settings would also do the trick:

\begin{adjustbox}{trim=0pt {\depth} {\width-2in} 0pt}
\begin{tabular}[t]{..}
..
\end{tabular}

This trims the whole depth away (replacing \raisebox) and also the width down to 2in (replacing {minipage}[t]{2in}). But this is just required for verbatim content. Anyway, it might avoid some "overfull box" warnings in the process.