Written divison

21 views
Skip to first unread message

FileEX

unread,
Dec 29, 2021, 12:02:52 PM12/29/21
to MathJax Users
Hello, how can I achieve this effect? Exactly the same

obraz_2021-12-29_180128.png

obraz_2021-12-29_180206.png

I use MathJax in HTML

Murray

unread,
Dec 30, 2021, 3:04:46 AM12/30/21
to MathJax Users
This Stackoverflow post has close to what you are looking for. Hopefully you could modify it for your purposes. 


Regards
Murray

FileEX

unread,
Dec 30, 2021, 11:09:56 AM12/30/21
to MathJax Users
I don't want a "long division" symbol. I want the same syntax like on screens

Davide Cervone

unread,
Jan 7, 2022, 12:38:07 PM1/7/22
to mathja...@googlegroups.com
Here's one hack that would do it, if you are using LaTeX input.

$$
\def\S{\kern .5em}
\def\top#1{\rlap{\raise1.5em{\underline{\S\, #1\S\,\mathstrut}}}}
\def\row#1#2{\phantom{\S#1 00}\llap{#2}}
\def\urow#1#2{\row{#1}{\underline{\S#2\S\mathstrut}}}
\def\rows#1#2#3{\row{#1}{#2\S}\\\urow{#1}{#3}\\}

\frac{1}{8}=
\begin{array}[t]{l}
\top{0{,}125}
\rows{-}{1\rlap{{}:8}}{-0}
\rows{-0}{10}{-8}
\rows{-00}{20}{-16}
\rows{-000}{40}{-40}
\row{-00}{==}
\end{array}
$$

The first argument to the \rows, \urow, and \row macros is an indentation amount, and the second (and third) are the contents of the various rows.  You don't need to provide the definitions more than once, as long as they are done before the first array that uses them.  You could add these to your MathJax configuration using the tex.macros object, if you wanted to have them available all the time (though they would have to be converted to the proper format for that).

Davide



-- 
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/d2761c55-3e63-4799-b99f-2db9e66c9b25n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages