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 have been using tabularx to arrange practice exercises on the page, like this:

\documentclass[12pt]{exam}
\usepackage{amsmath}
\usepackage{kpfonts}
\usepackage{tabularx}
\usepackage{titlesec}

\footer{}{}{}
\parindent=0in
\titleformat{\section}[block]{\large\bfseries\filcenter}{}{1em}{}
\setcounter{secnumdepth}{0}

\begin{document}

\section{More Practice With Trig Identities}
Establish each identity.
\begin{questions}
\newlength{\spacer}
\setlength{\spacer}{1in}

\begin{tabularx}{\textwidth}{ XX }
    \question $\left(\sec\theta+\tan\theta\right)\left(\sec\theta-\tan\theta\right)=1$ 
        & \question $\dfrac{1-\sin\theta}{1+\sin\theta} = \left(\sec\theta-\tan\theta\right)^2 $     \\ [\spacer]
    \question $\tan^2\theta\cos^2\theta+\cot^2\theta\sin^2\theta=1 $ 
        & \question $\sec^4\theta - \sec^2\theta= \tan^4\theta + \tan^2\theta $  \\ [\spacer]
    \question $\sec\theta-\tan\theta=\dfrac{\cos\theta}{1+\sin\theta} $ 
        & \question $3\sin^2\theta+4\cos^2\theta=\cos^2\theta+3 $    \\ [\spacer]
    \question $1-\dfrac{\sin^2\theta}{1+\cos\theta} = \cos\theta $ 
        &    \question $\cos^2\theta\left(1+\tan^2\theta\right)=1$ \\ [\spacer]
\end{tabularx}
\end{questions}
\end{document}

layout of exercises on page

I know that this is not what tabular environments were designed for, and it's obviously less than ideal, especially when things have different heights. But what should I be using instead of tabular?

share|improve this question
    
tabularx isn't needed there you just have XX so tex sets the teable multiple times and does lots of calculations just to work out the width of X which you know in advance is half \textwidth -2\tabcolsep) so you could just use p{(\textwidth-2\tabcolsep)/2} (calc package), or you could simply use two minipages and no tabular at all. your equations would be better in display mode so [] rather than $ –  David Carlisle Aug 17 '13 at 11:13
    
@DavidCarlisle However, using two minipages will change how exercises are numbered (column-wise rather than row-wise, as desired). –  Jubobs Aug 17 '13 at 11:17
    
@Jubobs why? two X is two minipages more or less, it is the same thing. –  David Carlisle Aug 17 '13 at 11:18
    
p{(\textwidth-4\tabcolsep)/2} (correction to what I wrote above:-) –  David Carlisle Aug 17 '13 at 11:20
1  
@kmacinnis you really want the equation numbers on each row to be aligned, hang on I'll post some code in an answer –  David Carlisle Aug 17 '13 at 11:33

3 Answers 3

up vote 6 down vote accepted

Here's another proposal using my exsheets package:

\documentclass[12pt]{article}
\usepackage{exsheets}
\usepackage{amsmath}
\usepackage{kpfonts}
\usepackage{titlesec}

\setlength\parindent{0in}

\titleformat{\section}[block]{\large\bfseries\filcenter}{}{1em}{}
\setcounter{secnumdepth}{0}

\newlength{\spacer}
\setlength{\spacer}{1in}

\begin{document}

\section{More Practice With Trig Identities}

Establish each identity.
\begin{tasks}[counter-format=tsk.](2)
  \task $(\sec\theta+\tan\theta)(\sec\theta-\tan\theta)=1$
  \task $\dfrac{1-\sin\theta}{1+\sin\theta} = (\sec\theta-\tan\theta)^2 $
    \vspace{\spacer}
  \task $\tan^2\theta\cos^2\theta+\cot^2\theta\sin^2\theta=1 $
  \task $\sec^4\theta - \sec^2\theta= \tan^4\theta + \tan^2\theta $
    \vspace{\spacer}
  \task $\sec\theta-\tan\theta=\dfrac{\cos\theta}{1+\sin\theta} $ 
  \task $3\sin^2\theta+4\cos^2\theta=\cos^2\theta+3 $
    \vspace{\spacer}
  \task $1-\dfrac{\sin^2\theta}{1+\cos\theta} = \cos\theta $ 
  \task $\cos^2\theta(1+\tan^2\theta)=1$
\end{tasks}

\end{document}

enter image description here

share|improve this answer
    
+1 for also getting rid of the unneeded \left and \right directives. :-) –  Mico Aug 17 '13 at 13:27
    
exsheets looks great! I'm going to check it out. –  Jubobs Aug 17 '13 at 15:00
    
@Jubobs this answer doesn't actually use it, though, but only its sub-package tasks... –  cgnieder Aug 17 '13 at 16:46
    
Wow-- exsheets (and tasks), where have you been all my life?! After reviewing the documentation, it's even better-- I can set after-item-skip instead of doing the \spacer nonsense. Thank you! –  kmacinnis Aug 17 '13 at 17:09

Although I, too, would opt for exsheets, this is a solution that exploits the \question command of the exam class you're using already and minipages.

You must use, in this case, the new defined environment myquestion

\documentclass[12pt,leqno]{exam}
\usepackage{amsmath}
\usepackage{kpfonts}

\usepackage{titlesec}

\footer{}{}{}
\parindent=0in
\titleformat{\section}[block]{\large\bfseries\filcenter}{}{1em}{}
\setcounter{secnumdepth}{0}

\newlength{\spacer}
\setlength{\spacer}{0.5in}

\newenvironment{myquestion}{%
  \begin{minipage}{0.45\textwidth}
  \question
}{%
  \end{minipage}
  \vspace{\spacer}
}

\begin{document}

\section{More Practice With Trig Identities}
Establish each identity.

\raggedright

\begin{questions}
\begin{myquestion}
  \((\sec\theta+\tan\theta)(\sec\theta-\tan\theta)=1\)
\end{myquestion}
\begin{myquestion}
  \(\dfrac{1-\sin\theta}{1+\sin\theta} = (\sec\theta-\tan\theta)^2\)
\end{myquestion}
\begin{myquestion}
  \(\tan^2\theta\cos^2\theta+\cot^2\theta\sin^2\theta=1\)
\end{myquestion}
\begin{myquestion}
  \(\sec^4\theta - \sec^2\theta= \tan^4\theta + \tan^2\theta\)
\end{myquestion}
\begin{myquestion}
  \(\sec\theta-\tan\theta=\dfrac{\cos\theta}{1+\sin\theta}\)
\end{myquestion}
\begin{myquestion}
  \(3\sin^2\theta+4\cos^2\theta=\cos^2\theta+3\)
\end{myquestion}
\begin{myquestion}
  \(1-\dfrac{\sin^2\theta}{1+\cos\theta} = \cos\theta\)
\end{myquestion}
\begin{myquestion}
  \(\cos^2\theta(1+\tan^2\theta)=1\)
\end{myquestion}
\end{questions}

\end{document} 

enter image description here

share|improve this answer

An alternative to tables, just set the whole thing as a paragraph:

enter image description here

\documentclass[12pt,leqno]{exam}
\usepackage{amsmath}
\usepackage{kpfonts}

\usepackage{titlesec}

\footer{}{}{}
\parindent=0in
\titleformat{\section}[block]{\large\bfseries\filcenter}{}{1em}{}
\setcounter{secnumdepth}{0}

\begin{document}

\section{More Practice With Trig Identities}
Establish each identity.

\raggedright
\setlength\baselineskip{1in plus \fill}

\begin{minipage}{.45\textwidth}
\begin{equation}
\left(\sec\theta+\tan\theta\right)\left(\sec\theta-\tan\theta\right)=1
\end{equation}
\end{minipage}
\begin{minipage}{.45\textwidth}
\begin{equation}
\dfrac{1-\sin\theta}{1+\sin\theta} = \left(\sec\theta-\tan\theta\right)^2
\end{equation}
\end{minipage}
\begin{minipage}{.45\textwidth}
\begin{equation}
\tan^2\theta\cos^2\theta+\cot^2\theta\sin^2\theta=1
\end{equation}
\end{minipage}
\begin{minipage}{.45\textwidth}
\begin{equation}
\sec^4\theta - \sec^2\theta= \tan^4\theta + \tan^2\theta
\end{equation}
\end{minipage}
\begin{minipage}{.45\textwidth}
\begin{equation}
\sec\theta-\tan\theta=\dfrac{\cos\theta}{1+\sin\theta}
\end{equation}
\end{minipage}
\begin{minipage}{.45\textwidth}
\begin{equation}
3\sin^2\theta+4\cos^2\theta=\cos^2\theta+3
\end{equation}
\end{minipage}
\begin{minipage}{.45\textwidth}
\begin{equation}
1-\dfrac{\sin^2\theta}{1+\cos\theta} = \cos\theta 
\end{equation}
\end{minipage}
\begin{minipage}{.45\textwidth}
\begin{equation}
\cos^2\theta\left(1+\tan^2\theta\right)=1
\end{equation}
\end{minipage}


\end{document}
share|improve this answer

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.