Tabular Why wouldn't this work?

  • Context: MHB 
  • Thread starter Thread starter Dustinsfl
  • Start date Start date
  • Tags Tags
    Work
Click For Summary

Discussion Overview

The discussion revolves around issues related to the use of the LaTeX tabular environment for creating tables. Participants are exploring the reasons why certain tabular instances may not render correctly and discussing potential solutions or adjustments needed for proper formatting.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • Some participants present examples of tabular environments, questioning why their specific instances did not work as intended.
  • There is a suggestion to check whether the tabular environment is being used in a math or text context, as this may affect rendering.
  • A participant proposes trying a simpler tabular example to troubleshoot the issue.
  • One participant mentions that enclosing the LaTeX data in dollar signs resolved their rendering issue.

Areas of Agreement / Disagreement

Participants do not appear to reach a consensus on the specific cause of the rendering issues, as there are multiple suggestions and approaches presented without a definitive resolution.

Contextual Notes

There may be limitations related to the specific LaTeX packages or environments being used, which are not fully explored in the discussion.

Dustinsfl
Messages
2,217
Reaction score
5
Code:
\begin{tabular}{|c|c|c|c|c|c|}
\hline
\ell & m = -2 & m = -1 & m = 0 & m = 1 & m = 2\\
\hline
0 & - & - & 50\sqrt{\pi} & - & -\\
\hline
1 & - & 25\sqrt{3\pi} & 0 & 25\sqrt{3\pi} & -\\
\hline
2 & 100\sqrt{\frac{5}{6\pi}} & 0 & 0 & 0 & 100\sqrt{\frac{5}{6\pi}}
\hline
\end{tabular}
 
Physics news on Phys.org
Code:
\begin{tabular}{|c|c|c|c|c|c|}
\hline
\ell & m = -2 & m = -1 & m = 0 & m = 1 & m = 2\\
\hline
0 & - & - & 50\sqrt{\pi} & - & -\\
\hline
1 & - & 25\sqrt{3\pi} & 0 & 25\sqrt{3\pi} & -\\
\hline
2 & 100\sqrt{\frac{5}{6\pi}} & 0 & 0 & 0 & 100\sqrt{\frac{5}{6\pi}}\\
\hline
\end{tabular}

Try the above.
 
Ackbach said:
Code:
\begin{tabular}{|c|c|c|c|c|c|}
\hline
\ell & m = -2 & m = -1 & m = 0 & m = 1 & m = 2\\
\hline
0 & - & - & 50\sqrt{\pi} & - & -\\
\hline
1 & - & 25\sqrt{3\pi} & 0 & 25\sqrt{3\pi} & -\\
\hline
2 & 100\sqrt{\frac{5}{6\pi}} & 0 & 0 & 0 & 100\sqrt{\frac{5}{6\pi}}\\
\hline
\end{tabular}

Try the above.

This didn't work as well. Is there a special preamble package needed for tabular?
 
dwsmith said:
This didn't work as well. Is there a special preamble package needed for tabular?

Not usually. Are you trying to use tabular in a math or text environment? The tabular is a text environment. Can you try a really simple tabular instance like this:

Code:
\begin{tabular}{|l|r|r|r|}
\hline
Name &1 &2 &3 \\ \hline
Peter &2.45 &34.12 &1.00 \\ \hline
John &0.00 &12.89 &3.71 \\ \hline
David &2.00 &1.85 &0.71 \\ \hline
\end{tabular}

This example is straight out of Math Into $\LaTeX$, by George Gratzer, on page 146. It http://quicklatex.com/cache3/ql_0bd7f0ac3264265cc9e963e6fbd12d5a_l3.png.
 
Ackbach said:
Not usually. Are you trying to use tabular in a math or text environment? The tabular is a text environment. Can you try a really simple tabular instance like this:

Code:
\begin{tabular}{|l|r|r|r|}
\hline
Name &1 &2 &3 \\ \hline
Peter &2.45 &34.12 &1.00 \\ \hline
John &0.00 &12.89 &3.71 \\ \hline
David &2.00 &1.85 &0.71 \\ \hline
\end{tabular}

This example is straight out of Math Into $\LaTeX$, by George Gratzer, on page 146. It http://quicklatex.com/cache3/ql_0bd7f0ac3264265cc9e963e6fbd12d5a_l3.png.

From this information, I just tried dollar signing all the tex data and that worked.
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 0 ·
Replies
0
Views
3K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 19 ·
Replies
19
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
10
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K