Senin, 14 April 2025

Long Division In Latex 3

1. Open your Latex editor.
2. type this following latex code in your latex editor for typing a Long Division equation in latex:
% !TEX TS-program = pdflatex
% !TEX encoding = UTF-8 Unicode
%Typeset/Build program
%-LongDivision2.tex--
\documentclass[margin=2mm, preview, varwidth]{standalone}
\usepackage{amsmath}
\usepackage{array}
\usepackage{siunitx}
\usepackage{fourier}

\usepackage{scalerel}

% macro command to type long division
\newcommand{\ldsym}{$\left.\mathstrut\right)$}% unbalanced )
\newlength{\ldwidth}

\newcommand{\longdivide}[2]% #1 = divisor/denominator, #2 = dividend/numerator
{\settowidth{\ldwidth}{\ldsym}
$#1\,\raisebox{2.1pt}{\ldsym}\hspace*{-.75\ldwidth}\overline{
\mathstrut\hspace*{.35\ldwidth}\ #2}$}

\begin{document}
% configuration for digit separator
\sisetup{group-separator={.},group-minimum-digits=3}
\renewcommand\arraystretch{1.2} %specify the vertical stretch

\begin{center}
\begin{tabular}{rr}
% Quotient
$\num{7000000}$ \\
% 5 is Divisor, 35000000 is Dividend
\longdivide{5}{\num{35000000}}\\
\underline{\num{35000000}} &\kern-2.4ex -\\
0
\end{tabular}
\end{center}

\end{document}
3. Save as LongDivision2.tex
4. Build Typeset or Compile the latex code

Output


< Previous Number Place Value 

Next to learn  Vertical Multiply Equation  >

< Previous lesson of latex Equation Long Division In Latex 2

to learn other Latex draw topics, click 
Study About Draw In Latex >>


Related Post

Tidak ada komentar:

Posting Komentar