Issue With Table In Mathjax

58 views
Skip to first unread message

Shubham Hadawale

unread,
Feb 17, 2024, 2:52:47 AM2/17/24
to MathJax Users
                Want to show table but I have Latex like: \\begin{tabular}{|l|c|c|c|c|c|c|}\n\\hline count & \\( 30-50 \\) & \\( 50-70 \\) & \\( 70-90 \\) & \\( 90-110 \\) & \\( 110-130 \\) & \\( 130-150 \\) \\\\\n\\hline Number of Employees & 7 & 15 & 30 & 24 & 18 & 11 \\\\\n\\hline\n\\end{tabular}

but tabular not support in mathjax...what i should do

Davide Cervone

unread,
Feb 17, 2024, 10:53:15 AM2/17/24
to mathja...@googlegroups.com
MathJax only implements math-mode macros and environments, not text-mode ones, in general.  Since the tabular environment is a text environment, it is not in MathJax's scope of operation.  MathJax expects you to use HTML constructs to handle text formatting, so a table like this is better handled via an HTML <table> tag.  That is especially true in your case, since the table doesn't contain any actual mathematics (you are misusing \(30-50\), as this means "30 minus 50" whereas you are using it where I suspect you mean "30 through 50".  So this whole thing should just be an HTML table, not a table generated by MathJax.

But if you must use MathJax, you can use an array environment rather than tabular:

\begin{array}{|l|c|c|c|c|c|c|}
\hline
\text{count} & 30-50 & 50-70 & 70-90 & 90-110 & 110-130 & 130-150 \\
\hline
\text{Number of Employees} & 7 & 15 & 30 & 24 & 18 & 11 \\
\hline
\end{array}

which will probably get you what you are looking for.

Davide

On Feb 17, 2024, at 2:52 AM, Shubham Hadawale <shubhamh...@gmail.com> wrote:

                Want to show table but I have Latex like: \\begin{tabular}{|l|c|c|c|c|c|c|}\n\\hline count & \\( 30-50 \\) & \\( 50-70 \\) & \\( 70-90 \\) & \\( 90-110 \\) & \\( 110-130 \\) & \\( 130-150 \\) \\\\\n\\hline Number of Employees & 7 & 15 & 30 & 24 & 18 & 11 \\\\\n\\hline\n\\end{tabular}

but tabular not support in mathjax...what i should do

--
You received this message because you are subscribed to the Google Groups "MathJax Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mathjax-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mathjax-users/d95e9a5e-fa2e-4f08-bfda-f34aed8257e6n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages