How to Create Tables with MathJax/LaTeX

Includes PGF, TikZ, PSTricks, and platforms/distributions: Kile, TeXstudio, TeXmaker, TeXnicCenter, MiKTeX, LyX
Post Reply
User avatar
Eli
Senior Expert Member
Reactions: 183
Posts: 5334
Joined: 9 years ago
Location: Tanzania
Has thanked: 75 times
Been thanked: 88 times
Contact:

#1

We can easily create tables, such as this one,

\[
\begin{array}{|c|c|c|}
\hline
\text{Set} & \text{Operation} & \text{Identity} \\
\hline
\mathbb{Z} & + & 0 \\
\hline
\mathbb{Q} & + & 0 \\
\hline
\mathbb{R} & + & 0 \\
\hline
\mathbb{Z} & \times & 1 \\
\hline
\mathbb{Q} & \times & 1 \\
\hline
\mathbb{R} & \times & 1 \\
\hline
\end{array}
\]

by using LaTeX/MathJax.

The code that produces this table is:

  1. \[
  2. \begin{array}{|c|c|c|}
  3. \hline
  4.  \text{Set} & \text{Operation} & \text{Identity} \\
  5. \hline
  6.   \mathbb{Z} & + & 0 \\
  7. \hline
  8.   \mathbb{Q} & + & 0 \\
  9. \hline
  10.   \mathbb{R} & + & 0 \\
  11. \hline
  12.   \mathbb{Z} & \times & 1 \\
  13. \hline
  14.   \mathbb{Q} & \times & 1 \\
  15. \hline
  16.   \mathbb{R} & \times & 1 \\
  17. \hline
  18. \end{array}
  19. \]


Enjoy.
1
1 Image
TSSFL -- A Creative Journey Towards Infinite Possibilities!
Post Reply

Return to “LaTeX and MathJax”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest