0

I've searched many places and I can't find something close enough to my situation. Basically, I searched on other posts suggesting to use tabu instead of tabular because I would have to use \(content\) everywhere I have mathematical expressions.

How do I add equal spacing so that I can read the text.

Second, I want to split the cell above sin diagonally so that I can insert text that describes the first row and column. Thanks!

\documentclass{article}

\usepackage{mathtools}
\usepackage{tabu}

\newcommand{\degree}{^\circ}

\begin{document}

\(
  \begin{tabu}{|c|c|c|c|} 
    & 30\degree & 45\degree & 60\degree \\ \hline
    \sin \theta & \dfrac{1}{2} & \dfrac{\sqrt{2}}{2} & \dfrac{\sqrt{3}}{2} \\ \hline
    \cos \theta & \dfrac{\sqrt{3}}{2} & \dfrac{\sqrt{2}}{2} & \dfrac{1}{2} \\ \hline
    \tan \theta & \dfrac{\sqrt{3}}{3} & 1\vphantom{\dfrac{\sqrt{2}}{2}} & \dfrac{1}{2} \\ 
  \end{tabu}
\)

\end{document}

image1

Werner
  • 603,163

1 Answers1

0
\documentclass{article}

\usepackage{amsmath}


\begin{document}

\(
  \begin{tabular}{|c|c|c|c|}\hline 
    & 30 & 45 & 60 \\ \hline
    sin $\theta$ & $\frac{1}{2}$ &$ \frac{\sqrt{2}}{2}$ & $\frac{\sqrt{3}}{2}$ \\ \hline
    cos $\theta$ & $\frac{\sqrt{3}}{2}$ & $ \frac{\sqrt{2}}{2}$ & $\frac{1}{2}$ \\ \hline
    tan $ \theta$ & $\frac{\sqrt{3}}{3}$ & 1  &$ \frac{1}{2}$ \\\hline 
  \end{tabular}
\)

\end{document}

This is a simple program. All maths terms should be enclosed in $$ sign.

Mensch
  • 65,388
vaman
  • 81