LaTeX, KaTeX and equation numbering

"gather" from the the KaTeX online docs:
[math]\begin{gather} a=b \\ e=b+c \end{gather}[/math]
or the same without math environment:

\begin{gather}
a=b \\
e=b+c
\end{gather}

or "align", with "math":

[math]\begin{align} a&=b+c \\ d+e&=f \end{align}[/math]
and without:

\begin{align}
a&=b+c \\
d+e&=f
\end{align}

I have to try every macro/environment before using it because the doc page does not correspond to the actual version of KaTeX.
 
"gather" from the the KaTeX online docs:
[math]\begin{gather} a=b \\ e=b+c \end{gather}[/math]or the same without math environment:
\begin{gather}
a=b \\
e=b+c
\end{gather}
or "align", with "math":
[math]\begin{align} a&=b+c \\ d+e&=f \end{align}[/math]and without:
\begin{align}
a&=b+c \\
d+e&=f
\end{align}

I have to try every macro/environment before using it because the doc page does not correspond to the actual version of KaTeX.
None of those commands that MathType generates for me work on this site.
 
I found version 0.12.0 documentation in Markdown format. It mentions gathered and aligned environments, but none of them produces numbered equations:

[math]\begin{gathered} a=b \\ e=b+c \end{gathered}[/math][math]\begin{aligned} a&=b+c \\ d+e&=f\end{aligned}[/math]
 
Some good news: while \newcommand did not work for me, "macros" using \gdef seem to work:
[math]\gdef\foo#1{#1^7}[/math][math]\foo{B}[/math]
 
I found version 0.12.0 documentation in Markdown format. It mentions gathered and aligned environments, but none of them produces numbered equations:

[math]\begin{gathered} a=b \\ e=b+c \end{gathered}[/math][math]\begin{aligned} a&=b+c \\ d+e&=f\end{aligned}[/math]
gather centers the equations in a group, while aligned lines up the equal signs. Neither is supposed to generate an equation number, not that I've seen.

-Dan
 
Some good news: while \newcommand did not work for me, "macros" using \gdef seem to work:
[math]\gdef\foo#1{#1^7}[/math][math]\foo{B}[/math]
Wait? You did that on two disconnected lines??

I need to play...

-Dan
 
gather centers the equations in a group, while aligned lines up the equal signs. Neither is supposed to generate an equation number, not that I've seen.

-Dan
Version 0.16.9 documentation shows them with equation numbers.
 
I found version 0.12.0 documentation in Markdown format. It mentions gathered and aligned environments, but none of them produces numbered equations:

[math]\begin{gathered} a=b \\ e=b+c \end{gathered}[/math][math]\begin{aligned} a&=b+c \\ d+e&=f\end{aligned}[/math]
The \tag command offers partial solution by allowing assigning "hand-made" labels, but only one per math environment:

[math] \begin{gathered} \tag{e10}a=b \\ e=b+c \end{gathered}[/math][math]\begin{aligned} \tag{f11}a&=b+c \\ d+e&=f\end{aligned}[/math]
[math]\tag{g33} z = e^{i\phi}[/math]
 
Because I used \gdef. Using \def would not work.
That rather implies that the text box, here, is a LaTeX environment itself. If it has it's own built in set of rules, that might be what is limiting you. KaTeX is primarliy just a Math environment, or so I understand.

-Dan
 
(Hopefully my last post in this thread) I converted ver. 0.12.0 of KaTeX documentation from Markdown to HTML format, but the latter relies on some other files. For this reason I then converted HTML to PDF and attached to this post as a public service -- hope some of you might find it useful.
 

Attachments

  • KaTeX Supported Functions.pdf
    272.2 KB · Views: 8
Top