Math & ScienceVertical Addition/Multiplication in MathJax (Math Latex)

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
otrai
Posts: 2
Joined: Wed Nov 30, 2022 11:08 pm

Vertical Addition/Multiplication in MathJax (Math Latex)

Post by otrai »

How do I enter the calculation below in MathJax (Math verison of Latex)? I can enter the Latex with or without the document capabilities, but it's easier with just the Math part of Latex.

First Step:
54 -> (50 + 4)
x7
/hline

Second Step:
50 x 7 = 350
4 x 7 = +28
\hline
+378

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
MjK
Posts: 89
Joined: Fri Jan 28, 2022 6:09 pm

Vertical Addition/Multiplication in MathJax (Math Latex)

Post by MjK »

MathJax is not LaTeX! It is a JavaScript library to display math in a similar language, but it is not the same. It is not TeX based. And therefore it is mostly off-topic here.

However, maybe you can use \matrix or \array (two examples, where LaTeX would provide an environment instead of a command and so differs from MathJax). See, e.g. https://www.onemathematicalcat.org/Math ... Syntax.htm for more information. You also could use a mixture of HTML and MathJax to do only the math with MathJax and the text and lines with HTML.

Disclaimer: I've never used MathJax. I've only read some MathJax forums long time ago.
My main topics are KOMA-Script and other questions related to my packages. If I reply to any other topic or if you've not yet added a minimal working example, please do not expect any further response. And please don't forget to tag examples as code.
otrai
Posts: 2
Joined: Wed Nov 30, 2022 11:08 pm

Vertical Addition/Multiplication in MathJax (Math Latex)

Post by otrai »

MjK wrote:MathJax is not LaTeX! It is a JavaScript library to display math in a similar language, but it is not the same. It is not TeX based. And therefore it is mostly off-topic here.

However, maybe you can use \matrix or \array (two examples, where LaTeX would provide an environment instead of a command and so differs from MathJax). See, e.g. https://www.onemathematicalcat.org/Math ... Syntax.htm for more information. You also could use a mixture of HTML and MathJax to do only the math with MathJax and the text and lines with HTML.

Disclaimer: I've never used MathJax. I've only read some MathJax forums long time ago.
How would I use array in LaTeX to solve the problem? I've tried to do it on my own before coming here, but it won't work.

Where would I go to find the answer?
Post Reply