1 | initial version |
\begin{array}{l|llllll} f & {\alpha_{0 0}} & {\alpha_{0 1}} & {\alpha_{0 2}} & {\alpha_{1 0}} & {\alpha_{1 1}} & {\alpha_{1 2}} \\ \hline \sin & \sin\left({\alpha_{0 0}}\right) & \sin\left({\alpha_{0 1}}\right) & \sin\left({\alpha_{0 2}}\right) & \sin\left({\alpha_{1 0}}\right) & \sin\left({\alpha_{1 1}}\right) & \sin\left({\alpha_{1 2}}\right) \\ \cos & \cos\left({\alpha_{0 0}}\right) & \cos\left({\alpha_{0 1}}\right) & \cos\left({\alpha_{0 2}}\right) & \cos\left({\alpha_{1 0}}\right) & \cos\left({\alpha_{1 1}}\right) & \cos\left({\alpha_{1 2}}\right) \\ \tan & \tan\left({\alpha_{0 0}}\right) & \tan\left({\alpha_{0 1}}\right) & \tan\left({\alpha_{0 2}}\right) & \tan\left({\alpha_{1 0}}\right) & \tan\left({\alpha_{1 1}}\right) & \tan\left({\alpha_{1 2}}\right) \\ \end{array}
2 | No.2 Revision |
It seems that tabular
is not an environment supported by MathJax, as can be seen here. So, a possible solution is to convert the tabular
environment to array
. Assuming that all the cells are in math mode, this can be done by the function to_array
defined as follows:
def to_array(tabular):
return tabular.replace("tabular","array").replace("$","").replace(r"\\",r"\\\\")
Note that backslashes in the \\
commands should be doubled so that Markdown can process them correctly. Let us test it using the table in the question asked here:
variables = [var(f"alpha_{i}_{j}", latex_name=fr"\alpha_{{{i} {j}}}"
for j in [0..2] for i in [0,1]]
table_object = table([[f(v) for v in variables] for f in [sin, cos, tan]],
header_row=variables, header_column=[f, sin, cos, tan])
tabular_env = latex(table_object)
print(to_array(tabular_env))
Now, one can copy the output and paste it in the text box to post or answer a question:
\begin{array}{l|llllll}
f & {\alpha_{0 0}} & {\alpha_{0 1}} & {\alpha_{0 2}} & {\alpha_{1 0}} & {\alpha_{1 1}} & {\alpha_{1 2}} \\ \\\ \hline
\sin & \sin\left({\alpha_{0 0}}\right) & \sin\left({\alpha_{0 1}}\right) & \sin\left({\alpha_{0 2}}\right) & \sin\left({\alpha_{1 0}}\right) & \sin\left({\alpha_{1 1}}\right) & \sin\left({\alpha_{1 2}}\right) \\
\\\
\cos & \cos\left({\alpha_{0 0}}\right) & \cos\left({\alpha_{0 1}}\right) & \cos\left({\alpha_{0 2}}\right) & \cos\left({\alpha_{1 0}}\right) & \cos\left({\alpha_{1 1}}\right) & \cos\left({\alpha_{1 2}}\right) \\
\\\
\tan & \tan\left({\alpha_{0 0}}\right) & \tan\left({\alpha_{0 1}}\right) & \tan\left({\alpha_{0 2}}\right) & \tan\left({\alpha_{1 0}}\right) & \tan\left({\alpha_{1 1}}\right) & \tan\left({\alpha_{1 2}}\right) \\
\\\
\end{array}
3 | No.3 Revision |
It seems that tabular
is not an environment supported by MathJax, as can be seen here. So, a possible solution is to convert the tabular
environment to array
. Assuming that all the cells are in math mode, this can be done by the function to_array
defined as follows:
def to_array(tabular):
return tabular.replace("tabular","array").replace("$","").replace(r"\\",r"\\\\")
Note that backslashes in the \\
commands should be doubled so that Markdown can process them correctly. Let us test it using the table in the question asked here:
variables = [var(f"alpha_{i}_{j}", latex_name=fr"\alpha_{{{i} {j}}}"
for j in [0..2] for i in [0,1]]
table_object = table([[f(v) for v in variables] for f in [sin, cos, tan]],
header_row=variables, header_column=[f, sin, cos, tan])
tabular_env = latex(table_object)
print(to_array(tabular_env))
Now, one can copy the output and paste it in the text box to post or answer a question:
\begin{array}{l|llllll}
$$\begin{array}{l|llllll}
f & {\alpha_{0 0}} & {\alpha_{0 1}} & {\alpha_{0 2}} & {\alpha_{1 0}} & {\alpha_{1 1}} & {\alpha_{1 2}} \\\ \hline
\sin & \sin\left({\alpha_{0 0}}\right) & \sin\left({\alpha_{0 1}}\right) & \sin\left({\alpha_{0 2}}\right) & \sin\left({\alpha_{1 0}}\right) & \sin\left({\alpha_{1 1}}\right) & \sin\left({\alpha_{1 2}}\right) \\\
\cos & \cos\left({\alpha_{0 0}}\right) & \cos\left({\alpha_{0 1}}\right) & \cos\left({\alpha_{0 2}}\right) & \cos\left({\alpha_{1 0}}\right) & \cos\left({\alpha_{1 1}}\right) & \cos\left({\alpha_{1 2}}\right) \\\
\tan & \tan\left({\alpha_{0 0}}\right) & \tan\left({\alpha_{0 1}}\right) & \tan\left({\alpha_{0 2}}\right) & \tan\left({\alpha_{1 0}}\right) & \tan\left({\alpha_{1 1}}\right) & \tan\left({\alpha_{1 2}}\right) \\\
\end{array}
4 | No.4 Revision |
It seems that tabular
is not an environment supported by MathJax, as can be seen here. So, a possible solution is to convert the tabular
environment to array
. Assuming that all the cells are in math mode, this can be done by the function to_array
defined as follows:
def to_array(tabular):
return tabular.replace("tabular","array").replace("$","").replace(r"\\",r"\\\\")
Note that backslashes in the \\
commands should be doubled so that Markdown can process them correctly. Let us test it using the table in the question asked here:
variables = [var(f"alpha_{i}_{j}", latex_name=fr"\alpha_{{{i} {j}}}"
for j in [0..2] for i in [0,1]]
table_object = table([[f(v) for v in variables] for f in [sin, cos, tan]],
header_row=variables, header_column=[f, sin, cos, tan])
tabular_env = latex(table_object)
print(to_array(tabular_env))
Now, one can copy the output and paste it in the text box to post or answer a question:
$$\begin{array}{l|llllll}
f & {\alpha_{0 0}} & {\alpha_{0 1}} & {\alpha_{0 2}} & {\alpha_{1 0}} & {\alpha_{1 1}} & {\alpha_{1 2}} \\\ \\ \hline
\sin & \sin\left({\alpha_{0 0}}\right) & \sin\left({\alpha_{0 1}}\right) & \sin\left({\alpha_{0 2}}\right) & \sin\left({\alpha_{1 0}}\right) & \sin\left({\alpha_{1 1}}\right) & \sin\left({\alpha_{1 2}}\right) \\\
\\
\cos & \cos\left({\alpha_{0 0}}\right) & \cos\left({\alpha_{0 1}}\right) & \cos\left({\alpha_{0 2}}\right) & \cos\left({\alpha_{1 0}}\right) & \cos\left({\alpha_{1 1}}\right) & \cos\left({\alpha_{1 2}}\right) \\\
\\
\tan & \tan\left({\alpha_{0 0}}\right) & \tan\left({\alpha_{0 1}}\right) & \tan\left({\alpha_{0 2}}\right) & \tan\left({\alpha_{1 0}}\right) & \tan\left({\alpha_{1 1}}\right) & \tan\left({\alpha_{1 2}}\right) \\\
\\
\end{array}$$
5 | No.5 Revision |
variables = [var(f"alpha_{i}_{j}", latex_name=fr"\alpha_{{{i} {j}}}"
for j in [0..2] for i in [0,1]]
table_object = table([[f(v) for v in variables] for f in [sin, cos, tan]],
header_row=variables, header_column=[f, sin, cos, tan])
tabular_env = latex(table_object)
print(to_array(tabular_env))
Now, one can copy the output and paste it in the text box to post or answer a question:
$$\begin{array}{l|llllll} f & {\alpha_{0 0}} & {\alpha_{0 1}} & {\alpha_{0 2}} & {\alpha_{1 0}} & {\alpha_{1 1}} & {\alpha_{1 2}} \\ \hline \sin & \sin\left({\alpha_{0 0}}\right) & \sin\left({\alpha_{0 1}}\right) & \sin\left({\alpha_{0 2}}\right) & \sin\left({\alpha_{1 0}}\right) & \sin\left({\alpha_{1 1}}\right) & \sin\left({\alpha_{1 2}}\right) \\ \cos & \cos\left({\alpha_{0 0}}\right) & \cos\left({\alpha_{0 1}}\right) & \cos\left({\alpha_{0 2}}\right) & \cos\left({\alpha_{1 0}}\right) & \cos\left({\alpha_{1 1}}\right) & \cos\left({\alpha_{1 2}}\right) \\ \tan & \tan\left({\alpha_{0 0}}\right) & \tan\left({\alpha_{0 1}}\right) & \tan\left({\alpha_{0 2}}\right) & \tan\left({\alpha_{1 0}}\right) & \tan\left({\alpha_{1 1}}\right) & \tan\left({\alpha_{1 2}}\right) \\ \end{array}$$
6 | No.6 Revision |
Note that backslashes in the \\
commands should be doubled so that Markdown can process them correctly. Let us test it using the table in the question asked here:
variables = [var(f"alpha_{i}_{j}", latex_name=fr"\alpha_{{{i} {j}}}"
for j in [0..2] for i in [0,1]]
table_object = table([[f(v) for v in variables] for f in [sin, cos, tan]],
header_row=variables, header_column=[f, sin, cos, tan])
tabular_env = latex(table_object)
print(to_array(tabular_env))
Now, one can copy the output and paste it in the text box to post or answer a question:
$$\begin{array}{l|llllll}
f & {\alpha_{0 0}} & {\alpha_{0 1}} & {\alpha_{0 2}} & {\alpha_{1 0}} & {\alpha_{1 1}} & {\alpha_{1 2}} \\ \\\ \hline
\sin & \sin\left({\alpha_{0 0}}\right) & \sin\left({\alpha_{0 1}}\right) & \sin\left({\alpha_{0 2}}\right) & \sin\left({\alpha_{1 0}}\right) & \sin\left({\alpha_{1 1}}\right) & \sin\left({\alpha_{1 2}}\right) \\
\\\
\cos & \cos\left({\alpha_{0 0}}\right) & \cos\left({\alpha_{0 1}}\right) & \cos\left({\alpha_{0 2}}\right) & \cos\left({\alpha_{1 0}}\right) & \cos\left({\alpha_{1 1}}\right) & \cos\left({\alpha_{1 2}}\right) \\
\\\
\tan & \tan\left({\alpha_{0 0}}\right) & \tan\left({\alpha_{0 1}}\right) & \tan\left({\alpha_{0 2}}\right) & \tan\left({\alpha_{1 0}}\right) & \tan\left({\alpha_{1 1}}\right) & \tan\left({\alpha_{1 2}}\right) \\
\\\
\end{array}$$
7 | No.7 Revision |
Note It seems that backslashes in the \\
commands should tabular
is not an environment supported by MathJax, as can be doubled so seen here. So, a possible solution is to convert the tabular
environment to array
. Assuming that Markdown all the cells are in math mode, this can process them correctly. be done by the function to_array
defined as follows:
def to_array(tabular):
return tabular.replace("tabular","array").replace("$","").replace(r"\\",r"\\\\")
Let us test it using the table in the question asked here:
variables = [var(f"alpha_{i}_{j}", latex_name=fr"\alpha_{{{i} {j}}}"
for j in [0..2] for i in [0,1]]
table_object = table([[f(v) for v in variables] for f in [sin, cos, tan]],
header_row=variables, header_column=[f, sin, cos, tan])
tabular_env = latex(table_object)
print(to_array(tabular_env))
Now, one can copy the output and paste it in the text box to post or answer a question:
$$\begin{array}{l|llllll}
f & {\alpha_{0 0}} & {\alpha_{0 1}} & {\alpha_{0 2}} & {\alpha_{1 0}} & {\alpha_{1 1}} & {\alpha_{1 2}} \\\ \\ \hline
\sin & \sin\left({\alpha_{0 0}}\right) & \sin\left({\alpha_{0 1}}\right) & \sin\left({\alpha_{0 2}}\right) & \sin\left({\alpha_{1 0}}\right) & \sin\left({\alpha_{1 1}}\right) & \sin\left({\alpha_{1 2}}\right) \\\
\\
\cos & \cos\left({\alpha_{0 0}}\right) & \cos\left({\alpha_{0 1}}\right) & \cos\left({\alpha_{0 2}}\right) & \cos\left({\alpha_{1 0}}\right) & \cos\left({\alpha_{1 1}}\right) & \cos\left({\alpha_{1 2}}\right) \\\
\\
\tan & \tan\left({\alpha_{0 0}}\right) & \tan\left({\alpha_{0 1}}\right) & \tan\left({\alpha_{0 2}}\right) & \tan\left({\alpha_{1 0}}\right) & \tan\left({\alpha_{1 1}}\right) & \tan\left({\alpha_{1 2}}\right) \\\
\\
\end{array}$$
8 | No.8 Revision |
It seems that tabular
is not an environment supported by MathJax, as can be seen here. So, a possible solution is to convert the tabular
environment to array
. Assuming that all the cells are in math mode, this can be done by the function to_array
defined as follows:
def to_array(tabular):
return tabular.replace("tabular","array").replace("$","").replace(r"\\",r"\\\\")
Note that backslashes in the \\\\
commands should be doubled so that Markdown can process them correctly.
Let us test it using the table in the question asked here:
variables = [var(f"alpha_{i}_{j}", latex_name=fr"\alpha_{{{i} {j}}}"
for j in [0..2] for i in [0,1]]
table_object = table([[f(v) for v in variables] for f in [sin, cos, tan]],
header_row=variables, header_column=[f, sin, cos, tan])
tabular_env = latex(table_object)
print(to_array(tabular_env))
Now, one can copy the output and paste it in the text box to post or answer a question:
$$\begin{array}{l|llllll} f & {\alpha_{0 0}} & {\alpha_{0 1}} & {\alpha_{0 2}} & {\alpha_{1 0}} & {\alpha_{1 1}} & {\alpha_{1 2}} \\ \hline \sin & \sin\left({\alpha_{0 0}}\right) & \sin\left({\alpha_{0 1}}\right) & \sin\left({\alpha_{0 2}}\right) & \sin\left({\alpha_{1 0}}\right) & \sin\left({\alpha_{1 1}}\right) & \sin\left({\alpha_{1 2}}\right) \\ \cos & \cos\left({\alpha_{0 0}}\right) & \cos\left({\alpha_{0 1}}\right) & \cos\left({\alpha_{0 2}}\right) & \cos\left({\alpha_{1 0}}\right) & \cos\left({\alpha_{1 1}}\right) & \cos\left({\alpha_{1 2}}\right) \\ \tan & \tan\left({\alpha_{0 0}}\right) & \tan\left({\alpha_{0 1}}\right) & \tan\left({\alpha_{0 2}}\right) & \tan\left({\alpha_{1 0}}\right) & \tan\left({\alpha_{1 1}}\right) & \tan\left({\alpha_{1 2}}\right) \\ \end{array}$$
9 | No.9 Revision |
It seems that tabular
is not an environment supported by MathJax, as can be seen here. So, a possible solution is to convert the tabular
environment to array
. Assuming that all the cells are in math mode, this can be done by the function to_array
defined as follows:
def to_array(tabular):
return tabular.replace("tabular","array").replace("$","").replace(r"\\",r"\\\\")
Note that backslashes in the
commands should be doubled so that Markdown can process them correctly.
Let us test it using the table in the question asked here:\\\\\\\
variables = [var(f"alpha_{i}_{j}", latex_name=fr"\alpha_{{{i} {j}}}"
for j in [0..2] for i in [0,1]]
table_object = table([[f(v) for v in variables] for f in [sin, cos, tan]],
header_row=variables, header_column=[f, sin, cos, tan])
tabular_env = latex(table_object)
print(to_array(tabular_env))
Now, one can copy the output and paste it in the text box to post or answer a question:
$$\begin{array}{l|llllll}
f & {\alpha_{0 0}} & {\alpha_{0 1}} & {\alpha_{0 2}} & {\alpha_{1 0}} & {\alpha_{1 1}} & {\alpha_{1 2}} \\ \\\ \hline
\sin & \sin\left({\alpha_{0 0}}\right) & \sin\left({\alpha_{0 1}}\right) & \sin\left({\alpha_{0 2}}\right) & \sin\left({\alpha_{1 0}}\right) & \sin\left({\alpha_{1 1}}\right) & \sin\left({\alpha_{1 2}}\right) \\
\\\
\cos & \cos\left({\alpha_{0 0}}\right) & \cos\left({\alpha_{0 1}}\right) & \cos\left({\alpha_{0 2}}\right) & \cos\left({\alpha_{1 0}}\right) & \cos\left({\alpha_{1 1}}\right) & \cos\left({\alpha_{1 2}}\right) \\
\\\
\tan & \tan\left({\alpha_{0 0}}\right) & \tan\left({\alpha_{0 1}}\right) & \tan\left({\alpha_{0 2}}\right) & \tan\left({\alpha_{1 0}}\right) & \tan\left({\alpha_{1 1}}\right) & \tan\left({\alpha_{1 2}}\right) \\
\\\
\end{array}$$
10 | No.10 Revision |
It seems that tabular
is not an environment supported by MathJax, as can be seen here. So, a possible solution is to convert the tabular
environment to array
. Assuming that all the cells are in math mode, this can be done by the function to_array
defined as follows:
def to_array(tabular):
return tabular.replace("tabular","array").replace("$","").replace(r"\\",r"\\\\")
Note that backslashes in the commands should be doubled so that Markdown can process them correctly.
Let us test it using the table in the question asked here:\\\
variables = [var(f"alpha_{i}_{j}", latex_name=fr"\alpha_{{{i} {j}}}"
for j in [0..2] for i in [0,1]]
table_object = table([[f(v) for v in variables] for f in [sin, cos, tan]],
header_row=variables, header_column=[f, sin, cos, tan])
tabular_env = latex(table_object)
print(to_array(tabular_env))
Now, one can copy the output and paste it in the text box to post or answer a question:
$$\begin{array}{l|llllll}
f & {\alpha_{0 0}} & {\alpha_{0 1}} & {\alpha_{0 2}} & {\alpha_{1 0}} & {\alpha_{1 1}} & {\alpha_{1 2}} \\\ \\ \hline
\sin & \sin\left({\alpha_{0 0}}\right) & \sin\left({\alpha_{0 1}}\right) & \sin\left({\alpha_{0 2}}\right) & \sin\left({\alpha_{1 0}}\right) & \sin\left({\alpha_{1 1}}\right) & \sin\left({\alpha_{1 2}}\right) \\\
\\
\cos & \cos\left({\alpha_{0 0}}\right) & \cos\left({\alpha_{0 1}}\right) & \cos\left({\alpha_{0 2}}\right) & \cos\left({\alpha_{1 0}}\right) & \cos\left({\alpha_{1 1}}\right) & \cos\left({\alpha_{1 2}}\right) \\\
\\
\tan & \tan\left({\alpha_{0 0}}\right) & \tan\left({\alpha_{0 1}}\right) & \tan\left({\alpha_{0 2}}\right) & \tan\left({\alpha_{1 0}}\right) & \tan\left({\alpha_{1 1}}\right) & \tan\left({\alpha_{1 2}}\right) \\\
\\
\end{array}$$
11 | No.11 Revision |
It seems that tabular
is not an environment supported by MathJax, as can be seen here. So, a possible solution is to convert the tabular
environment to array
. Assuming that all the cells are in math mode, this can be done by the function to_array
defined as follows:
def to_array(tabular):
return tabular.replace("tabular","array").replace("$","").replace(r"\\",r"\\\\")
Note that backslashes \\
in the commands should be doubled so that Markdown can process them correctly.
Let us test it using the table in the question asked here:
variables = [var(f"alpha_{i}_{j}", latex_name=fr"\alpha_{{{i} {j}}}"
for j in [0..2] for i in [0,1]]
table_object = table([[f(v) for v in variables] for f in [sin, cos, tan]],
header_row=variables, header_column=[f, sin, cos, tan])
tabular_env = latex(table_object)
print(to_array(tabular_env))
Now, one can copy the output and paste it in the text box to post or answer a question:
$$\begin{array}{l|llllll}
f & {\alpha_{0 0}} & {\alpha_{0 1}} & {\alpha_{0 2}} & {\alpha_{1 0}} & {\alpha_{1 1}} & {\alpha_{1 2}} \\ \\\ \hline
\sin & \sin\left({\alpha_{0 0}}\right) & \sin\left({\alpha_{0 1}}\right) & \sin\left({\alpha_{0 2}}\right) & \sin\left({\alpha_{1 0}}\right) & \sin\left({\alpha_{1 1}}\right) & \sin\left({\alpha_{1 2}}\right) \\
\\\
\cos & \cos\left({\alpha_{0 0}}\right) & \cos\left({\alpha_{0 1}}\right) & \cos\left({\alpha_{0 2}}\right) & \cos\left({\alpha_{1 0}}\right) & \cos\left({\alpha_{1 1}}\right) & \cos\left({\alpha_{1 2}}\right) \\
\\\
\tan & \tan\left({\alpha_{0 0}}\right) & \tan\left({\alpha_{0 1}}\right) & \tan\left({\alpha_{0 2}}\right) & \tan\left({\alpha_{1 0}}\right) & \tan\left({\alpha_{1 1}}\right) & \tan\left({\alpha_{1 2}}\right) \\
\\\
\end{array}$$
12 | No.12 Revision |
It seems that tabular
is not an environment supported by MathJax, as can be seen here. So, a possible solution is to convert the tabular
environment to array
. Assuming that all the cells are in math mode, this can be done by the function to_array
defined as follows:
def to_array(tabular):
return tabular.replace("tabular","array").replace("$","").replace(r"\\",r"\\\\")
Note that backslashes
in the commands should be doubled so that Markdown can process them correctly.
Let us test it using the table in the question asked here:\\\ \
variables = [var(f"alpha_{i}_{j}", latex_name=fr"\alpha_{{{i} {j}}}"
for j in [0..2] for i in [0,1]]
table_object = table([[f(v) for v in variables] for f in [sin, cos, tan]],
header_row=variables, header_column=[f, sin, cos, tan])
tabular_env = latex(table_object)
print(to_array(tabular_env))
Now, one can copy the output and paste it in the text box to post or answer a question:
$$\begin{array}{l|llllll}
f & {\alpha_{0 0}} & {\alpha_{0 1}} & {\alpha_{0 2}} & {\alpha_{1 0}} & {\alpha_{1 1}} & {\alpha_{1 2}} \\\ \\ \hline
\sin & \sin\left({\alpha_{0 0}}\right) & \sin\left({\alpha_{0 1}}\right) & \sin\left({\alpha_{0 2}}\right) & \sin\left({\alpha_{1 0}}\right) & \sin\left({\alpha_{1 1}}\right) & \sin\left({\alpha_{1 2}}\right) \\\
\\
\cos & \cos\left({\alpha_{0 0}}\right) & \cos\left({\alpha_{0 1}}\right) & \cos\left({\alpha_{0 2}}\right) & \cos\left({\alpha_{1 0}}\right) & \cos\left({\alpha_{1 1}}\right) & \cos\left({\alpha_{1 2}}\right) \\\
\\
\tan & \tan\left({\alpha_{0 0}}\right) & \tan\left({\alpha_{0 1}}\right) & \tan\left({\alpha_{0 2}}\right) & \tan\left({\alpha_{1 0}}\right) & \tan\left({\alpha_{1 1}}\right) & \tan\left({\alpha_{1 2}}\right) \\\
\\
\end{array}$$
13 | No.13 Revision |
It seems that tabular
is not an environment supported by MathJax, as can be seen here. So, a possible solution is to convert the tabular
environment to array
. Assuming that all the cells are in math mode, this can be done by the function to_array
defined as follows:
def to_array(tabular):
return tabular.replace("tabular","array").replace("$","").replace(r"\\",r"\\\\")
Note that backslashes in the newline commands should be doubled so that Markdown can process them correctly.
Let us test it using the table in the question asked here:\ \
in the
variables = [var(f"alpha_{i}_{j}", latex_name=fr"\alpha_{{{i} {j}}}"
for j in [0..2] for i in [0,1]]
table_object = table([[f(v) for v in variables] for f in [sin, cos, tan]],
header_row=variables, header_column=[f, sin, cos, tan])
tabular_env = latex(table_object)
print(to_array(tabular_env))
Now, one can copy the output and paste it in the text box to post or answer a question:
$$\begin{array}{l|llllll} f & {\alpha_{0 0}} & {\alpha_{0 1}} & {\alpha_{0 2}} & {\alpha_{1 0}} & {\alpha_{1 1}} & {\alpha_{1 2}} \\ \hline \sin & \sin\left({\alpha_{0 0}}\right) & \sin\left({\alpha_{0 1}}\right) & \sin\left({\alpha_{0 2}}\right) & \sin\left({\alpha_{1 0}}\right) & \sin\left({\alpha_{1 1}}\right) & \sin\left({\alpha_{1 2}}\right) \\ \cos & \cos\left({\alpha_{0 0}}\right) & \cos\left({\alpha_{0 1}}\right) & \cos\left({\alpha_{0 2}}\right) & \cos\left({\alpha_{1 0}}\right) & \cos\left({\alpha_{1 1}}\right) & \cos\left({\alpha_{1 2}}\right) \\ \tan & \tan\left({\alpha_{0 0}}\right) & \tan\left({\alpha_{0 1}}\right) & \tan\left({\alpha_{0 2}}\right) & \tan\left({\alpha_{1 0}}\right) & \tan\left({\alpha_{1 1}}\right) & \tan\left({\alpha_{1 2}}\right) \\ \end{array}$$
14 | No.14 Revision |
It seems that tabular
is not an environment supported by MathJax, as can be seen here. So, a possible solution is to convert the tabular
environment to array
. Assuming that all the cells are in math mode, this can be done by the function to_array
defined as follows:
def to_array(tabular):
return tabular.replace("tabular","array").replace("$","").replace(r"\\",r"\\\\")
Note that backslashes in the newline commands should be doubled so that Markdown can process them correctly. Let us test it using the table in the question asked here:
variables = [var(f"alpha_{i}_{j}", flatten([[var(f"alpha_{i}_{j}", latex_name=fr"\alpha_{{{i} {j}}}"
{j}}}")
for j in [0..2] [0..2]] for i in [0,1]]
[0,1]])
table_object = table([[f(v) for v in variables] for f in [sin, cos, tan]],
header_row=variables, header_column=[f, sin, cos, tan])
tabular_env = latex(table_object)
print(to_array(tabular_env))
Now, one can copy the output and paste it in the text box to post or answer a question:
$$\begin{array}{l|llllll} f & {\alpha_{0 0}} & {\alpha_{0 1}} & {\alpha_{0 2}} & {\alpha_{1 0}} & {\alpha_{1 1}} & {\alpha_{1 2}} \\ \hline \sin & \sin\left({\alpha_{0 0}}\right) & \sin\left({\alpha_{0 1}}\right) & \sin\left({\alpha_{0 2}}\right) & \sin\left({\alpha_{1 0}}\right) & \sin\left({\alpha_{1 1}}\right) & \sin\left({\alpha_{1 2}}\right) \\ \cos & \cos\left({\alpha_{0 0}}\right) & \cos\left({\alpha_{0 1}}\right) & \cos\left({\alpha_{0 2}}\right) & \cos\left({\alpha_{1 0}}\right) & \cos\left({\alpha_{1 1}}\right) & \cos\left({\alpha_{1 2}}\right) \\ \tan & \tan\left({\alpha_{0 0}}\right) & \tan\left({\alpha_{0 1}}\right) & \tan\left({\alpha_{0 2}}\right) & \tan\left({\alpha_{1 0}}\right) & \tan\left({\alpha_{1 1}}\right) & \tan\left({\alpha_{1 2}}\right) \\ \end{array}$$
15 | No.15 Revision |
It seems that tabular
is not an environment supported by MathJax, as can be seen here. So, a possible solution is to convert the tabular
environment to array
. Assuming that all the cells are in math mode, this can be done by the function to_array
defined as follows:
def to_array(tabular):
return tabular.replace("tabular","array").replace("$","").replace(r"\\",r"\\\\")
Note that backslashes in the newline commands should be doubled so that Markdown can process them correctly. Let us test it using the table in the question asked here:
variables = flatten([[var(f"alpha_{i}_{j}", latex_name=fr"\alpha_{{{i} {j}}}")
for j in [0..2]] for i in [0,1]])
table_object = table([[f(v) for v in variables] for f in [sin, cos, tan]],
header_row=variables, header_column=[f, sin, cos, tan])
tabular_env = latex(table_object)
print(to_array(tabular_env))
Now, one can copy the output and paste it in the text box to post or answer a question:
$$\begin{array}{l|llllll} f & {\alpha_{0 0}} & {\alpha_{0 1}} & {\alpha_{0 2}} & {\alpha_{1 0}} & {\alpha_{1 1}} & {\alpha_{1 2}} \\ \hline \sin & \sin\left({\alpha_{0 0}}\right) & \sin\left({\alpha_{0 1}}\right) & \sin\left({\alpha_{0 2}}\right) & \sin\left({\alpha_{1 0}}\right) & \sin\left({\alpha_{1 1}}\right) & \sin\left({\alpha_{1 2}}\right) \\ \cos & \cos\left({\alpha_{0 0}}\right) & \cos\left({\alpha_{0 1}}\right) & \cos\left({\alpha_{0 2}}\right) & \cos\left({\alpha_{1 0}}\right) & \cos\left({\alpha_{1 1}}\right) & \cos\left({\alpha_{1 2}}\right) \\ \tan & \tan\left({\alpha_{0 0}}\right) & \tan\left({\alpha_{0 1}}\right) & \tan\left({\alpha_{0 2}}\right) & \tan\left({\alpha_{1 0}}\right) & \tan\left({\alpha_{1 1}}\right) & \tan\left({\alpha_{1 2}}\right) \\ \end{array}$$
16 | No.16 Revision |
It seems that tabular
is not an environment supported by MathJax, as can be seen here. So, a possible solution is to convert the tabular
environment to array
. Assuming that all the cells are in math mode, this can be done by the function to_array
defined as follows:
def to_array(tabular):
return tabular.replace("tabular","array").replace("$","").replace(r"\\",r"\\\\")
Note that backslashes in the newline commands should be doubled so that Markdown can process them correctly. Let us test it using the table in the question asked here:
variables = flatten([[var(f"alpha_{i}_{j}", latex_name=fr"\alpha_{{{i} {j}}}")
for j in [0..2]] for i in [0,1]])
table_object = table([[f(v) for v in variables] for f in [sin, cos, tan]],
header_row=variables, header_column=[f, header_column=[function("f"), sin, cos, tan])
tabular_env = latex(table_object)
print(to_array(tabular_env))
Now, one can copy the output and paste it in the text box to post or answer a question:
$$\begin{array}{l|llllll} f & {\alpha_{0 0}} & {\alpha_{0 1}} & {\alpha_{0 2}} & {\alpha_{1 0}} & {\alpha_{1 1}} & {\alpha_{1 2}} \\ \hline \sin & \sin\left({\alpha_{0 0}}\right) & \sin\left({\alpha_{0 1}}\right) & \sin\left({\alpha_{0 2}}\right) & \sin\left({\alpha_{1 0}}\right) & \sin\left({\alpha_{1 1}}\right) & \sin\left({\alpha_{1 2}}\right) \\ \cos & \cos\left({\alpha_{0 0}}\right) & \cos\left({\alpha_{0 1}}\right) & \cos\left({\alpha_{0 2}}\right) & \cos\left({\alpha_{1 0}}\right) & \cos\left({\alpha_{1 1}}\right) & \cos\left({\alpha_{1 2}}\right) \\ \tan & \tan\left({\alpha_{0 0}}\right) & \tan\left({\alpha_{0 1}}\right) & \tan\left({\alpha_{0 2}}\right) & \tan\left({\alpha_{1 0}}\right) & \tan\left({\alpha_{1 1}}\right) & \tan\left({\alpha_{1 2}}\right) \\ \end{array}$$
Edit. Corrected the header_column
option.