{"id":3416,"date":"2023-01-10T17:29:14","date_gmt":"2023-01-10T17:29:14","guid":{"rendered":"https:\/\/opentextbc.ca\/pressbooks\/?post_type=chapter&#038;p=3416"},"modified":"2023-01-17T20:15:19","modified_gmt":"2023-01-17T20:15:19","slug":"how-do-i-write-long-division","status":"publish","type":"chapter","link":"https:\/\/opentextbc.ca\/pressbooks\/chapter\/how-do-i-write-long-division\/","title":{"raw":"How do I create a long division equation in LaTeX?","rendered":"How do I create a long division equation in LaTeX?"},"content":{"raw":"<div class=\"textbox textbox--sidebar\">Last update: Jan 16\/23<\/div>\r\nLong division requires a LaTeX extension. To load the extension, use the <code>\\require<\/code> command to load the <code>\\enclose<\/code> extension that allows you to access MathML elements, including long division <code>\\longdiv<\/code>. An extension only needs to be loaded once, then it would be available for the entire book in Pressbooks.\r\n\r\nFor the first time, write <code>\\require{enclose}5\\enclose{longdiv}{25}<\/code>. It looks like:\r\n<p style=\"text-align: center;\">[latex]\\require{enclose}5\\enclose{longdiv}{25}[\/latex]<\/p>\r\nAfter that, write as <code>divisor\\enclose{longdiv}{dividend}.<\/code> Using the same example 20 \u00f7 5, write <code>5\\enclose{longdiv}{20}<\/code>. It looks like:\r\n<p style=\"text-align: center;\">[latex]5\\enclose{longdiv}{20}[\/latex]<\/p>\r\nIf you need to include the quotient and the process of long division, combine with the <code>\\begin{array}<\/code> or <code>\\begin{align}<\/code> command (for more information, see <a href=\"https:\/\/opentextbc.ca\/pressbooks\/chapter\/arrays\/\">How do I create an array using LaTeX?<\/a>)\r\n<p style=\"text-align: center;\">[latex]\\begin{array}{r}\\text{quotient}\\\\ \\text{divisor}\\enclose{longdiv}{\\text{dividend}}\\end{array}[\/latex]<\/p>\r\nThe process of 20 \u00f7 5 = 4 with the remainder of 0 would be written as <code>\\begin{array}{r}4\\\\ 5\\enclose{longdiv}{20}\\\\20\\\\ \\hline 0\\end{array}<\/code>.\r\n<p style=\"text-align: center;\">[latex]\\begin{array}{r}4\\\\ 5\\enclose{longdiv}{20}\\\\-20\\,\\\\ \\hline0\\,\\end{array}[\/latex]<\/p>\r\nHere is an example of a long division question solved that has a remainder:\r\n<p style=\"text-align: center;\">[latex]\\begin{array}{l}\\hspace{0.7cm}32\\text{ R}3\\\\8 \\enclose{longdiv}{259}\\\\\\hspace{0.1cm}-24\\\\\\hline\\hspace{0.8cm}19\\\\\\hspace{0.4cm}-16\\\\\\hline\\hspace{1cm}3\\end{array}[\/latex]<\/p>","rendered":"<div class=\"textbox textbox--sidebar\">Last update: Jan 16\/23<\/div>\n<p>Long division requires a LaTeX extension. To load the extension, use the <code>\\require<\/code> command to load the <code>\\enclose<\/code> extension that allows you to access MathML elements, including long division <code>\\longdiv<\/code>. An extension only needs to be loaded once, then it would be available for the entire book in Pressbooks.<\/p>\n<p>For the first time, write <code>\\require{enclose}5\\enclose{longdiv}{25}<\/code>. It looks like:<\/p>\n<p style=\"text-align: center;\">[latex]\\require{enclose}5\\enclose{longdiv}{25}[\/latex]<\/p>\n<p>After that, write as <code>divisor\\enclose{longdiv}{dividend}.<\/code> Using the same example 20 \u00f7 5, write <code>5\\enclose{longdiv}{20}<\/code>. It looks like:<\/p>\n<p style=\"text-align: center;\">[latex]5\\enclose{longdiv}{20}[\/latex]<\/p>\n<p>If you need to include the quotient and the process of long division, combine with the <code>\\begin{array}<\/code> or <code>\\begin{align}<\/code> command (for more information, see <a href=\"https:\/\/opentextbc.ca\/pressbooks\/chapter\/arrays\/\">How do I create an array using LaTeX?<\/a>)<\/p>\n<p style=\"text-align: center;\">[latex]\\begin{array}{r}\\text{quotient}\\\\ \\text{divisor}\\enclose{longdiv}{\\text{dividend}}\\end{array}[\/latex]<\/p>\n<p>The process of 20 \u00f7 5 = 4 with the remainder of 0 would be written as <code>\\begin{array}{r}4\\\\ 5\\enclose{longdiv}{20}\\\\20\\\\ \\hline 0\\end{array}<\/code>.<\/p>\n<p style=\"text-align: center;\">[latex]\\begin{array}{r}4\\\\ 5\\enclose{longdiv}{20}\\\\-20\\,\\\\ \\hline0\\,\\end{array}[\/latex]<\/p>\n<p>Here is an example of a long division question solved that has a remainder:<\/p>\n<p style=\"text-align: center;\">[latex]\\begin{array}{l}\\hspace{0.7cm}32\\text{ R}3\\\\8 \\enclose{longdiv}{259}\\\\\\hspace{0.1cm}-24\\\\\\hline\\hspace{0.8cm}19\\\\\\hspace{0.4cm}-16\\\\\\hline\\hspace{1cm}3\\end{array}[\/latex]<\/p>\n","protected":false},"author":123,"menu_order":14,"template":"","meta":{"pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":[],"pb_section_license":""},"chapter-type":[],"contributor":[],"license":[],"class_list":["post-3416","chapter","type-chapter","status-publish","hentry"],"part":2754,"_links":{"self":[{"href":"https:\/\/opentextbc.ca\/pressbooks\/wp-json\/pressbooks\/v2\/chapters\/3416","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/opentextbc.ca\/pressbooks\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/opentextbc.ca\/pressbooks\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/opentextbc.ca\/pressbooks\/wp-json\/wp\/v2\/users\/123"}],"version-history":[{"count":10,"href":"https:\/\/opentextbc.ca\/pressbooks\/wp-json\/pressbooks\/v2\/chapters\/3416\/revisions"}],"predecessor-version":[{"id":3456,"href":"https:\/\/opentextbc.ca\/pressbooks\/wp-json\/pressbooks\/v2\/chapters\/3416\/revisions\/3456"}],"part":[{"href":"https:\/\/opentextbc.ca\/pressbooks\/wp-json\/pressbooks\/v2\/parts\/2754"}],"metadata":[{"href":"https:\/\/opentextbc.ca\/pressbooks\/wp-json\/pressbooks\/v2\/chapters\/3416\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/opentextbc.ca\/pressbooks\/wp-json\/wp\/v2\/media?parent=3416"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/opentextbc.ca\/pressbooks\/wp-json\/pressbooks\/v2\/chapter-type?post=3416"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/opentextbc.ca\/pressbooks\/wp-json\/wp\/v2\/contributor?post=3416"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/opentextbc.ca\/pressbooks\/wp-json\/wp\/v2\/license?post=3416"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}