Latex for Long-Division: Displaying Code

  • Context: LaTeX 
  • Thread starter Thread starter jackmell
  • Start date Start date
  • Tags Tags
    Latex
Click For Summary
SUMMARY

The forum discussion centers on the challenges of displaying long-division using LaTeX, specifically within the context of MathJax. User Jack reports difficulties in rendering a long-division code snippet from a reference link, stating that MathJax does not support the \multicolumn command. The discussion highlights the need for alternative methods to achieve the desired formatting in LaTeX for long-division.

PREREQUISITES
  • Familiarity with LaTeX syntax and commands
  • Understanding of MathJax rendering capabilities
  • Knowledge of long-division formatting in mathematical typesetting
  • Basic troubleshooting skills for LaTeX code
NEXT STEPS
  • Research alternatives to \multicolumn in LaTeX for long-division
  • Explore MathJax documentation for supported LaTeX commands
  • Learn about using arrays in LaTeX for complex formatting
  • Investigate community forums for shared LaTeX solutions and examples
USEFUL FOR

Mathematicians, educators, and students who need to display long-division in LaTeX, as well as developers working with MathJax for rendering mathematical expressions on web platforms.

jackmell
Messages
1,806
Reaction score
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.

<br /> \begin{array}{rc@{}c}&amp;\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}}&amp;\multicolumn{1}{l}{\hspace*{-5.6pt}\Big)\hspace*{4.6pt}z} \\ &amp;\multicolumn{2}{l}{\,\,\, z-\frac{z^3}{3}+ \frac{2z^5}{45}-\dotsb}\\ \vspace{1mm} \cline{2-3}\vspace{1mm}&amp;\multicolumn{2}{l}{\,\,\,\phantom{1{}-{}} \frac{z^3}{3}-\frac{2z^5}{45}+\dotsb}\\ &amp;\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}&amp;\multicolumn{2}{l}{\,\,\,\phantom{z{}-{}\frac{z^3}{3}{}-{}}\frac{z^5}{15}- \dotsb}\end{array} <br />

Thanks,
Jack
 
Last edited:
Physics news on Phys.org

Similar threads

  • · Replies 0 ·
Replies
0
Views
3K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 5 ·
Replies
5
Views
1K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 11 ·
Replies
11
Views
1K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 9 ·
Replies
9
Views
7K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 16 ·
Replies
16
Views
4K