使用 minipage 在表格中浮动表格

使用 minipage 在表格中浮动表格

我可以很好地构建 tex,并且使用 minipage 可以让右侧的内容正确浮动在给定的“空白区域”上,我试图通过这样做来利用这一点,但左侧的内容仍然受到此影响。

我的目标是让“杂项”多列浮动在整个整体多列上,这样我就可以利用这个浪费的空间。这是有问题的部分。我对 latex 还不熟悉。

****编辑,我已按要求附上整个文档

\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

答案1

有点难以理解您到底想做什么。我现在假设您想将稍宽的“杂项”部分挤压到“逆三角函数”下方,即“三角函数”最后几行的右侧。您遇到的问题是 太高,minipage增加了单元格的总高度,从而将所有其他行向下推,包括“三角函数”这一行。[t]和 的(顶部)选项minipagetabular控制基线的绘制位置,即总高度的哪一部分作为高度,哪一部分作为深度。在这种情况下,您只是有一个很大的深度,这对您没有多大帮助。

为了解决这个问题,您需要减小或删除 的垂直尺寸minipage。这可以通过将其放在 内部来实现\raisebox{0pt}[0pt][0pt]{<content>}。这会将其增加 0pt(强制参数),并将高度和深度设置为 0pt(第一个和第二个可选参数):

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

使用adjustbox带有一些正确设置的包/环境trim也可以达到同样的效果:

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

这会削减整个深度(替换\raisebox),并将宽度缩小到 2 英寸(替换{minipage}[t]{2in})。但这只是逐字内容所必需的。无论如何,它可能会在此过程中避免一些“盒子过满”警告。

相关内容