Latex for Long-Division: Displaying Code

  • LaTeX
  • Thread starter jackmell
  • Start date
  • Tags
    Latex
In summary, the conversation is about displaying long division using MathJax. The person tried copying code from a reference but it did not work. They asked if MathJax can support this type of code, but it is not possible due to limitations with the \multicolumn command.
  • #1
jackmell
1,807
54
Hi,

Can we display a long-division? I tried copying the code in this reference (post 6) and it's not working:

http://www.artofproblemsolving.com/...084071&hilit=latex+for+long+division#p1084071

Someone in the Homework forum was asking a question about long
division and I think it's helpful if they see what it looks like.
Can PF display this code? I did try copying it to here, add tex delimiters and also spaces every 30 or so characters as per a FAQ I think.
But it did not work.

[tex]
\begin{array}{rc@{}c}&\multicolumn{2}{l}{\,\,\,\frac{1}{z}+ \frac{z}{3}+\frac{z^3}{15}-\dotsb}\vspace*{0.12cm}\\ \cline{2-3}\multicolumn{1}{r}{z^2-\frac{z^4}{3}+\frac{2z^6}{45}- \dotsb\hspace*{-4.8pt}}&\multicolumn{1}{l}{\hspace*{-5.6pt}\Big)\hspace*{4.6pt}z} \\ &\multicolumn{2}{l}{\,\,\, z-\frac{z^3}{3}+ \frac{2z^5}{45}-\dotsb}\\ \vspace{1mm} \cline{2-3}\vspace{1mm}&\multicolumn{2}{l}{\,\,\,\phantom{1{}-{}} \frac{z^3}{3}-\frac{2z^5}{45}+\dotsb}\\ &\multicolumn{2}{l}{\,\,\,\phantom{1{}-{}} \frac{z^3}{3}-\frac{z^5}{9}+ \frac{2z^7}{135}+\dotsb}\vspace*{0.12cm}\\ \vspace{1mm}\cline{2-3} \vspace{1mm}&\multicolumn{2}{l}{\,\,\,\phantom{z{}-{}\frac{z^3}{3}{}-{}}\frac{z^5}{15}- \dotsb}\end{array}
[/tex]

Thanks,
Jack
 
Last edited:
Physics news on Phys.org
  • #2
MathJax does not support \multicolumn
 

1. What is Latex for Long-Division?

Latex for Long-Division is a code display feature in the Latex document preparation system that allows for the clear and organized display of long division equations.

2. How do I use Latex for Long-Division?

To use Latex for Long-Division, you will need to include the amsmath package in your Latex document and use the \longdiv{} command to display your long division equation.

3. Can I customize the display of my long division equation using Latex?

Yes, Latex for Long-Division allows for customization of the display, including changing the size and color of the equation and adding labels or annotations.

4. Does Latex for Long-Division work for all types of long division equations?

Yes, Latex for Long-Division can be used for all types of long division equations, including multi-digit numbers, decimals, and fractions.

5. Are there any tips for using Latex for Long-Division efficiently?

It is recommended to use the align environment in Latex to align the long division equation with other equations in your document. Additionally, using the \phantom{} command can help with spacing and alignment within the long division equation.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
350
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
272
  • MATLAB, Maple, Mathematica, LaTeX
Replies
0
Views
1K
Replies
0
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
9K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
16
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
3K
Back
Top