How do I draw this table on LaTeX?

  • LaTeX
  • Thread starter Guest2
  • Start date
  • Tags
    Latex Table
In summary: Here's a summary of the conversation:In summary, the individual is asking how to draw a table on $\LaTeX$. The conversation then includes a code for a table with a multiplication operation and variables as headers and rows. The expert responder suggests starting with a simpler table and provides a helpful resource for table creation.
  • #1
Guest2
193
0
How do I draw this table on $\LaTeX$?

\begin{aligned} \begin{array}{cc|c|c|c|}
* && e & r & r^2& r^3& r^4& r^5& f& rf& r^2f& r^3f& r^{4}f& r^{5}f\\
\\
\hline
e && e & r & r^2& r^3& r^4& r^5& f& rf& r^2f& r^3f& r^{4}f& r^{5}f \\
\hline
r && r & r^2 & r^3& r^4& r^5& f& rf& r^2f& r^3f& r^{4}f& r^{5}f & f \\
\hline
r^2 && r^2 & r^3& r^4& r^5& f& rf& r^2f& r^3f& r^{4}f& r^{5}f & f & rf \\
\hline
r^3 && r^3& r^4& r^5& f& rf& r^2f& r^3f& r^{4}f& r^{5}f & f & rf & r^2f \\
\hline
r^4 && r^4& r^5& f& rf& r^2f& r^3f& r^{4}f& r^{5}f & f & rf & r^2f & r^3f\\
\hline
r^5 && r^5& f& rf& r^2f& r^3f& r^{4}f& r^{5}f & f & rf & r^2f & r^3f &r^4f \\
\hline
f && f& rf& r^2f& r^3f& r^{4}f& r^{5}f & f & rf & r^2f & r^3f &r^4f & r^5f \\
\hline
rf && rf& r^2f& r^3f& r^{4}f& r^{5}f & f & rf & r^2f & r^3f &r^4f & r^5f &e \\
\hline
r^2f && r^2f& r^3f& r^{4}f& r^{5}f & f & rf & r^2f & r^3f &r^4f & r^5f &e & r\\
\hline
r^3f && r^3f& r^{4}f& r^{5}f & f & rf & r^2f & r^3f &r^4f & r^5f &e & r & rf \\
\hline
r^4f && r^{4}f& r^{5}f & f & rf & r^2f & r^3f &r^4f & r^5f &e & r & rf & r^2f \\
\hline
r^{5}f && r^{5}f & f & rf & r^2f & r^3f &r^4f & r^5f &e & r & rf & r^2f & r^3f \\
\hline
&& & &
\hline
\end{array} \end{aligned}$$Code:

$$
Code:
\begin{aligned} \begin{array}{cc|c|c|c|} 
* && e & r & r^2& r^3& r^4& r^5& f& rf& r^2f& r^3f& r^{4}f& r^{5}f\\ 
\\ 
\hline 
e && e & r & r^2& r^3& r^4& r^5& f& rf& r^2f& r^3f& r^{4}f& r^{5}f \\ 
\hline 
r && r & r^2 & r^3& r^4& r^5& f& rf& r^2f& r^3f& r^{4}f& r^{5}f & f \\ 
\hline 
r^2 && r^2 & r^3& r^4& r^5& f& rf& r^2f& r^3f& r^{4}f& r^{5}f & f & rf \\ 
\hline 
r^3 && r^3& r^4& r^5& f& rf& r^2f& r^3f& r^{4}f& r^{5}f & f & rf & r^2f \\
\hline 
r^4 && r^4& r^5& f& rf& r^2f& r^3f& r^{4}f& r^{5}f & f & rf & r^2f & r^3f\\ 
\hline 
r^5 && r^5& f& rf& r^2f& r^3f& r^{4}f& r^{5}f & f & rf & r^2f & r^3f &r^4f \\ 
\hline 
f && f& rf& r^2f& r^3f& r^{4}f& r^{5}f & f & rf & r^2f & r^3f &r^4f & r^5f \\ 
\hline 
rf && rf& r^2f& r^3f& r^{4}f& r^{5}f & f & rf & r^2f & r^3f &r^4f & r^5f &e \\ 
\hline 
r^2f && r^2f& r^3f& r^{4}f& r^{5}f & f & rf & r^2f & r^3f &r^4f & r^5f &e & r\\ 
\hline 
r^3f && r^3f& r^{4}f& r^{5}f & f & rf & r^2f & r^3f &r^4f & r^5f &e & r & rf \\ 
\hline 
r^4f && r^{4}f& r^{5}f & f & rf & r^2f & r^3f &r^4f & r^5f &e & r & rf & r^2f \\ 
\hline 
r^{5}f && r^{5}f & f & rf & r^2f & r^3f &r^4f & r^5f &e & r & rf & r^2f & r^3f \\ 
\hline 
 && & &  
\hline 
\end{array} \end{aligned}

If I enter just the way it's on $\LaTeX$ I get lines all over the place. Unfortunately my knowledge of $\LaTeX$ doesn't extend beyond using Mathjax.
 
Physics news on Phys.org
  • #2
Try this for a start:

\begin{array}{c|c|c|}
* & e & r \\
\hline e & e & r \\
\hline r & r & r^2
\end{array}

-DanView attachment 5281
 

Attachments

  • CodeCogsEqn.gif
    CodeCogsEqn.gif
    639 bytes · Views: 86
  • #3
topsquark said:
...

-Dan
This worked nicely, thank you! :)
 
  • #4
Sometimes I find this site to be helpful as well when I want to draw a quick table without much customization.
 

FAQ: How do I draw this table on LaTeX?

How do I create a table in LaTeX?

To create a table in LaTeX, you can use the "tabular" environment. This environment allows you to define the number of columns and the alignment of the content within each column. You can also add borders and merge cells using specific commands within this environment.

How do I add data to my table in LaTeX?

To add data to your table, you will need to use the "ampersand" (&) symbol to separate the content of each cell. You can also use the "double backslash" (\\) to start a new row in your table. Additionally, you can align the content of each cell using the "ampersand" (&) symbol and the "left", "right", or "center" commands.

How do I label and caption my table in LaTeX?

To label and caption your table in LaTeX, you can use the "label" and "caption" commands within the "table" environment. The "label" command allows you to give your table a unique identifier, which can be used for referencing within your document. The "caption" command allows you to add a title or description for your table.

How do I resize my table in LaTeX?

To resize your table in LaTeX, you can use the "scalebox" command within the "table" environment. This command allows you to specify a scaling factor for your table, making it bigger or smaller. You can also use the "resizebox" command to define specific dimensions for your table.

How do I add color to my table in LaTeX?

To add color to your table in LaTeX, you will need to use the "color" package and the "cellcolor" command within the "tabular" environment. This will allow you to change the background color of specific cells or entire rows/columns. You can also use the "rowcolor" command to color alternate rows in your table.

Back
Top