如何填补剩余空间

如何填补剩余空间

我正在制作一个占用大量空间的 LaTeX “备忘单”。目前,我添加了一个表格,如下所示:

在此处输入图片描述

但是,如果可能的话,我想用几个方程式填充此表格右侧的一大空白。我该怎么做呢?我看过其他备忘单 LaTeX 示例,但它们都有列,这对我来说不起作用,因为各种表格和方程式列表的长度和宽度各不相同。

这是我当前的代码:

\documentclass{article}

\usepackage[margin=0.25in]{geometry}
\usepackage{tabu}
\usepackage{colortbl}
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage{hhline}
\usepackage{boxedminipage}

\usepackage{graphicx}

\setlength\parindent{0pt}


\begin{document}

{\tabulinesep=3pt
\begin{tabu}{|c | c | c| c| c|}
\hline
\multicolumn{5}{|c|}{\bf \large Temperature Conversions} \\\hline

\bf  & \bf To K & \bf To C & \bf To F & \bf To R\\
\bf From K  &   --------    &   $C = K - 273.15$    &  $F = \frac{9}{5} K - 459.67$  &  $R = \frac{9}{5} K$ \\
\bf From C & $K = C + 273.15$ & -------- & \cellcolor{Goldenrod} $F = \frac{9}{5} C + 32$ & $R = \frac{9}{5} (C + 273.15)$\\
\bf From F & $K = \frac{5}{9} (F - 459.67)$ & \cellcolor{Goldenrod} $C = \frac{5}{9}(F - 32)$ & -------- & $R = F - 459.67$\\
\bf From R & $K = \frac{5}{9} R$ & $C = \frac{5}{9}(R - 491.67)$ & $F = R + 459.67$ & --------\\\hline
\end{tabu}
}   

\end{document}

答案1

以下是您可以执行的操作的示例。调整\thistablewidth和传递的距离\vspace可能需要反复试验。

\documentclass{article}

\usepackage[margin=0.25in]{geometry}
\usepackage{tabu}
\usepackage{colortbl}
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage{hhline}
\usepackage{boxedminipage}
\usepackage{graphicx}
\usepackage{calc}
\usepackage{amsmath}

\setlength\parindent{0pt}


\begin{document}
\newlength{\thistablewidth}
\setlength{\thistablewidth}{0.7\textwidth}
\begin{minipage}[t]{\thistablewidth}
\tabulinesep=3pt
\begin{tabu}{|c | c | c| c| c|}
\hline
\multicolumn{5}{|c|}{\bf \large Temperature Conversions} \\\hline

\bf  & \bf To K & \bf To C & \bf To F & \bf To R\\
\bf From K  &   --------    &   $C = K - 273.15$    &  $F = \frac{9}{5} K - 459.67$  &  $R = \frac{9}{5} K$ \\
\bf From C & $K = C + 273.15$ & -------- & \cellcolor{Goldenrod} $F = \frac{9}{5} C + 32$ & $R = \frac{9}{5} (C + 273.15)$\\
\bf From F & $K = \frac{5}{9} (F - 459.67)$ & \cellcolor{Goldenrod} $C = \frac{5}{9}(F - 32)$ & -------- & $R = F - 459.67$\\
\bf From R & $K = \frac{5}{9} R$ & $C = \frac{5}{9}(R - 491.67)$ & $F = R + 459.67$ & --------\\\hline
\end{tabu}   
\end{minipage}
\hfill
\begin{minipage}[t]{\textwidth-\thistablewidth}
\vspace{-5em}
\begin{gather*}
a=b\\
b=c\\
c=a\\
e = mc^2\\
\omega^2 = gk \tanh {kh}
\end{gather*}

\end{minipage}

\end{document}

在此处输入图片描述

相关内容