Why Doesn't My LaTeX Table Compile Properly?

  • Context: LaTeX 
  • Thread starter Thread starter Saladsamurai
  • Start date Start date
  • Tags Tags
    Latex
Click For Summary

Discussion Overview

The discussion revolves around issues related to compiling LaTeX tables, specifically within the context of MathJax, which is used on the forum. Participants explore alternatives to the tabular environment and share experiences with formatting tables.

Discussion Character

  • Technical explanation, Conceptual clarification, Debate/contested

Main Points Raised

  • One participant expresses difficulty in getting a LaTeX table to compile, questioning if something is missing in their code.
  • Another participant notes that the tabular environment is not supported by MathJax and suggests using alternative environments.
  • A different participant reiterates the issue with the tabular environment, mentioning that MathJax supports LaTeX markup but not the tabular structure.
  • One participant reports successfully using an array instead of a tabular environment, but expresses a desire for the ability to use the \hline command.
  • Another participant confirms that \hline can be used within the array environment and provides an example of its application.

Areas of Agreement / Disagreement

Participants generally agree that the tabular environment is not supported by MathJax and that alternatives like the array can be used. However, there is a lack of consensus on the preferred methods and features available in these alternatives.

Contextual Notes

Some limitations include the specific environments supported by MathJax and the differences in functionality between LaTeX and MathJax, particularly regarding table formatting.

Saladsamurai
Messages
3,009
Reaction score
7
Can seem to make it work? Am I missing something?

[tex] \begin{tablular}{c c c} <br /> P & Q & R \\<br /> S & T & V <br /> \end{tablular}[/tex]
 
Physics news on Phys.org
The tabular environment is currently not supported by mathjax. So you'll have to use another environment for this.

See http://www.mathjax.org/docs/1.1/tex.html#supported-latex-commands for all currently supported commands and environment.

See https://www.physicsforums.com/showthread.php?t=546968 for alternatives to the tabular environment.
 
Last edited by a moderator:
Saladsamurai said:
Can seem to make it work? Am I missing something?

[tex] \begin{tablular}{c c c} <br /> P & Q & R \\<br /> S & T & V <br /> \end{tablular}[/tex]

fyi, we don't use LaTeX anymore. We use MathJax which supports LaTeX markup. Sometimes you can create a table structure using array.
 
Thanks folks! I just used an array. I miss being able to add an \hline though :frown:
 
\hline works in array. For example:

Code:
[tex]\begin{array}{c|cc}
\hline
A & B & C\\
\hline
D & E & F\\
\hline
\end{array}
[/tex]

gives

[tex]\begin{array}{c|cc}<br /> \hline<br /> A & B & C\\<br /> \hline<br /> D & E & F\\<br /> \hline<br /> \end{array}[/tex]
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 12 ·
Replies
12
Views
4K
  • · Replies 5 ·
Replies
5
Views
1K
  • · Replies 0 ·
Replies
0
Views
3K
  • · Replies 36 ·
2
Replies
36
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 2 ·
Replies
2
Views
6K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
4K