4
\section{Change the improper fractions to a mixed number.}
\begin{tabularx}{\linewidth}{|X|X|} \hline
$\dfrac{29}{3}$ & $\dfrac{30}{4}$ \\ \hline
$\dfrac{22}{5}$ & $\dfrac{48}{5}$ \\ \hline
$\dfrac{47}{8}$ & $\dfrac{73}{8}$  \\ \hline
$\dfrac{29}{9}$  & $\dfrac{55}{9}$  \\ \hline
$\dfrac{31}{6}$& $\dfrac{57}{6}$ \\ \hline
\end{tabularx}

This works great to stretch the table horizontally to fit the page width, but I also want empty space for the student to work so, how can I stretch it to fit the remaining vertical space on the page? I am currently using the document class article and tabularx package, but those can be changed if something else is appropriate.

edit: I do not need to have the elements contained in boxes, but I think the boxes help the students keep their work neat (or at least contained). I do need to have the elements lined up properly which doesn't happen when I use columns.

edit: I have looked at the tabularht, but I still have to guess and check to get the boxes to be the right size. I was hoping for something more automatic similar to the \linewidth of tabular. I also would like the question to be at the top left of the box.

2
  • Do you need to have the elements contained in boxes?
    – Werner
    Commented Aug 7, 2013 at 22:53
  • See the edited answer Commented Aug 8, 2013 at 6:17

1 Answer 1

6

Try the following code, made with tabularht package:

\documentclass{article}
\usepackage{amsmath}
\usepackage{calc}
\usepackage{tabularx}
\usepackage[vlines]{tabularht}

\begin{document}
\section{Change the improper fractions to a mixed number.}
\begin{tabularhtx}{\textheight-0.55in}{\linewidth}{|X|X|}
\hline
\interrowfill
$\dfrac{29}{3}$ & $\dfrac{30}{4}$\\
\interrowfill
\hline
\interrowfill
$\dfrac{22}{5}$ & $\dfrac{48}{5}$\\
\interrowfill
\hline
\interrowfill
$\dfrac{47}{8}$ & $\dfrac{73}{8}$\\
\interrowfill
\hline
\interrowfill
$\dfrac{29}{9}$  & $\dfrac{55}{9}$\\
\interrowfill
\hline
\interrowfill
$\dfrac{31}{6}$ & $\dfrac{57}{6}$\\
\interrowfill
\hline
\end{tabularhtx}
\end{document} 

enter image description here

EDIT

Seeing the edited question, the following can be a solution, using the lenght \pagetotal to determine the exact position in the page before the table (note that you have to put a \clearpage before a new page):

\documentclass{article}
\usepackage{amsmath}
\usepackage{calc}
\usepackage{tabularx}
\usepackage[vlines]{tabularht}

\begin{document}

\section{Change the improper fractions to a mixed number.}
\begin{tabularhtx}{\textheight-\the\pagetotal-10pt}{\linewidth}{|X|X|}
\hline
\interrowspace{5pt}
$\dfrac{29}{3}$ & $\dfrac{30}{4}$\\
\interrowfill
\hline
\interrowspace{5pt}
$\dfrac{22}{5}$ & $\dfrac{48}{5}$\\
\interrowfill
\hline
\interrowspace{5pt}
$\dfrac{47}{8}$ & $\dfrac{73}{8}$\\
\interrowfill
\hline
\interrowspace{5pt}
$\dfrac{29}{9}$  & $\dfrac{55}{9}$\\
\interrowfill
\hline
\interrowspace{5pt}
$\dfrac{31}{6}$ & $\dfrac{57}{6}$\\
\interrowfill
\hline
\end{tabularhtx}

\clearpage

\section{Do whatever you want here.}
\begin{tabularhtx}{\textheight-\the\pagetotal-10pt}{\linewidth}{|X|X|}
\hline
\interrowspace{5pt}
$\dfrac{29}{3}$ & $\dfrac{30}{4}$\\
\interrowfill
\hline
\interrowspace{5pt}
$\dfrac{22}{5}$ & $\dfrac{48}{5}$\\
\interrowfill
\hline
\interrowspace{5pt}
$\dfrac{47}{8}$ & $\dfrac{73}{8}$\\
\interrowfill
\hline
\interrowspace{5pt}
$\dfrac{29}{9}$  & $\dfrac{55}{9}$\\
\interrowfill
\hline
\interrowspace{5pt}
$\dfrac{31}{6}$ & $\dfrac{57}{6}$\\
\interrowfill
\hline
\end{tabularhtx}

\end{document} 

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .