{"id":2888,"date":"2021-07-30T20:47:53","date_gmt":"2021-07-30T20:47:53","guid":{"rendered":"https:\/\/opentextbc.ca\/pressbooks\/?post_type=chapter&#038;p=2888"},"modified":"2022-07-12T20:30:38","modified_gmt":"2022-07-12T20:30:38","slug":"cross-out","status":"publish","type":"chapter","link":"https:\/\/opentextbc.ca\/pressbooks\/chapter\/cross-out\/","title":{"raw":"How do I cross something out?","rendered":"How do I cross something out?"},"content":{"raw":"<div class=\"textbox textbox--sidebar\">Last update: Jul 12\/22<\/div>\r\nIf you're working with conversion factors, or any other kind of math that involves showing that something has been removed or cancelled out, crossing things out is essential.\r\n\r\nLuckily, it's very easy to cross something out in a LaTeX expression.\r\n<h1>The <code>\\cancel{}<\/code> command<\/h1>\r\nSimply use the <code>\\cancel{x}<\/code> command, where <em>x<\/em> is whatever you want to cross out. This looks like:\r\n<p style=\"text-align: center;\">[latex]\\cancel{x}[\/latex]<\/p>\r\nLet's put this command to use in the conversion of 10 metres to millimetres.\r\n\r\nFirst, determine the conversion factor. Since there are 1000 mm in 1 m, our conversion factor will be [latex]\\frac{1000\\text{ mm}}{1\\text{ m}}[\/latex].\r\n\r\nNext, multiply the conversion factor by the original measurement of 10 m. Following the rules of cancelling out in fractions, we end up with:\r\n<p style=\"text-align: center;\">[latex]10\\cancel{\\text{ m}}\\times\\dfrac{1000\\text{ mm}}{1\\cancel{\\text{ m}}}=10,000\\text{ mm}[\/latex]<\/p>\r\nBy crossing out the metres, it is easier to illustrate how we go from metres to millimetres.\r\n\r\nWhile this example was very simple and easy to understand, the <code>\\cancel{}<\/code> command is especially useful when converting between many different units. To demonstrate, here is an example from chemistry:\r\n<p style=\"text-align: center;\">[latex]45.3\\cancel{\\text{ g }\\ce{SO2}}\\times \\dfrac{1\\cancel{\\text{ mol }\\ce{SO2}}}{64.06\\cancel{\\text{ g }\\ce{SO2}}}\\times \\dfrac{2\\cancel{\\text{ mol }\\ce{SO3}}}{2\\cancel{\\text{ mol }\\ce{SO2}}}\\times \\dfrac{80.06\\text{ g }\\ce{SO3}}{1\\cancel{\\text{ mol }\\ce{SO3}}}=56.6\\text{ g }\\ce{SO3}[\/latex]<\/p>\r\nWhile the <code>\\cancel{}<\/code> command is most useful when using numerals, it can also be used to cancel out words:\r\n<p style=\"text-align: center;\">[latex]9\\cancel{\\text{ c pancake mix}}\\times \\dfrac{1\\text{ egg}}{2\\cancel{\\text{ c pancake mix}}}=4.5\\text{ eggs}[\/latex]<\/p>\r\n\r\n<h1>Cancelling out spaces<\/h1>\r\nIn a prior example, we had [latex]10\\cancel{\\text{ m}}[\/latex], which is written as <code>10\\cancel{\\text{ m}}<\/code>. You'll notice that the command is cancelling out the metre symbol as well as the space before it. But wouldn't it be better to only cancel out the metre symbol?\r\n\r\nYes, it would be better \u2014 but this can be difficult.\r\n\r\nSince LaTeX doesn't recognize spaces written between its commands, the only way to insert a space is to use <code>\\text{ }<\/code>. If you have a numeral, then a unit of measurement, like in the case of 10 m, you need a space between the two.\r\n\r\nThe simplest way to write this in LaTeX is <code>10\\text{ m}<\/code>, in which the space and the m are created using the same <code>\\text{}<\/code> command.\r\n\r\nIf you try to put the <code>\\cancel{}<\/code> command within the <code>\\text{}<\/code> command so that only the m is cancelled, this is what happens:[footnote]You can right-click this expression and go to <strong>Math Settings &gt; Math Renderer &gt; Plain Source<\/strong> and then back to <strong>Common HTML<\/strong> to switch between seeing the original LaTeX markup and the expression in display form.[\/footnote]\r\n<p style=\"text-align: center;\">[latex]10\\text{ \\cancel{m}}[\/latex]<\/p>\r\nThe <code>\\text{}<\/code> command prints out exactly what you write in its curly brackets. Therefore, if you try to insert a <code>\\cancel{m}<\/code> command within a <code>\\text{}<\/code> command, you'll just print out \"\\cancel{m}\".\r\n\r\nIf you really want to make sure that the space isn't cancelled out, you can use two separate <code>\\text{}<\/code> commands to write the space and the m:\r\n<p style=\"text-align: center;\">[latex]10\\text{ }\\cancel{\\text{m}}[\/latex]<\/p>\r\nCompare this to the original way we wrote it:\r\n<p style=\"text-align: center;\">[latex]10\\cancel{\\text{ m}}[\/latex]<\/p>\r\nYou can see that the difference is minute and that using two separate <code>\\text{}<\/code> commands for the space and the m is cumbersome.\r\n\r\nYou can use two <code>\\text{}<\/code> commands if you prefer, but when you're writing a ton of conversion factors (like in a chapter on conversion factors in a math or chemistry textbook), this extra work will quickly add up.\r\n\r\nGenerally, we recommend writing <code>10\\cancel{\\text{ m}}<\/code>, because it's a little simpler, and it's doubtful that anyone would be able to tell the difference.","rendered":"<div class=\"textbox textbox--sidebar\">Last update: Jul 12\/22<\/div>\n<p>If you&#8217;re working with conversion factors, or any other kind of math that involves showing that something has been removed or cancelled out, crossing things out is essential.<\/p>\n<p>Luckily, it&#8217;s very easy to cross something out in a LaTeX expression.<\/p>\n<h1>The <code>\\cancel{}<\/code> command<\/h1>\n<p>Simply use the <code>\\cancel{x}<\/code> command, where <em>x<\/em> is whatever you want to cross out. This looks like:<\/p>\n<p style=\"text-align: center;\">[latex]\\cancel{x}[\/latex]<\/p>\n<p>Let&#8217;s put this command to use in the conversion of 10 metres to millimetres.<\/p>\n<p>First, determine the conversion factor. Since there are 1000 mm in 1 m, our conversion factor will be [latex]\\frac{1000\\text{ mm}}{1\\text{ m}}[\/latex].<\/p>\n<p>Next, multiply the conversion factor by the original measurement of 10 m. Following the rules of cancelling out in fractions, we end up with:<\/p>\n<p style=\"text-align: center;\">[latex]10\\cancel{\\text{ m}}\\times\\dfrac{1000\\text{ mm}}{1\\cancel{\\text{ m}}}=10,000\\text{ mm}[\/latex]<\/p>\n<p>By crossing out the metres, it is easier to illustrate how we go from metres to millimetres.<\/p>\n<p>While this example was very simple and easy to understand, the <code>\\cancel{}<\/code> command is especially useful when converting between many different units. To demonstrate, here is an example from chemistry:<\/p>\n<p style=\"text-align: center;\">[latex]45.3\\cancel{\\text{ g }\\ce{SO2}}\\times \\dfrac{1\\cancel{\\text{ mol }\\ce{SO2}}}{64.06\\cancel{\\text{ g }\\ce{SO2}}}\\times \\dfrac{2\\cancel{\\text{ mol }\\ce{SO3}}}{2\\cancel{\\text{ mol }\\ce{SO2}}}\\times \\dfrac{80.06\\text{ g }\\ce{SO3}}{1\\cancel{\\text{ mol }\\ce{SO3}}}=56.6\\text{ g }\\ce{SO3}[\/latex]<\/p>\n<p>While the <code>\\cancel{}<\/code> command is most useful when using numerals, it can also be used to cancel out words:<\/p>\n<p style=\"text-align: center;\">[latex]9\\cancel{\\text{ c pancake mix}}\\times \\dfrac{1\\text{ egg}}{2\\cancel{\\text{ c pancake mix}}}=4.5\\text{ eggs}[\/latex]<\/p>\n<h1>Cancelling out spaces<\/h1>\n<p>In a prior example, we had [latex]10\\cancel{\\text{ m}}[\/latex], which is written as <code>10\\cancel{\\text{ m}}<\/code>. You&#8217;ll notice that the command is cancelling out the metre symbol as well as the space before it. But wouldn&#8217;t it be better to only cancel out the metre symbol?<\/p>\n<p>Yes, it would be better \u2014 but this can be difficult.<\/p>\n<p>Since LaTeX doesn&#8217;t recognize spaces written between its commands, the only way to insert a space is to use <code>\\text{ }<\/code>. If you have a numeral, then a unit of measurement, like in the case of 10 m, you need a space between the two.<\/p>\n<p>The simplest way to write this in LaTeX is <code>10\\text{ m}<\/code>, in which the space and the m are created using the same <code>\\text{}<\/code> command.<\/p>\n<p>If you try to put the <code>\\cancel{}<\/code> command within the <code>\\text{}<\/code> command so that only the m is cancelled, this is what happens:<a class=\"footnote\" title=\"You can right-click this expression and go to Math Settings &gt; Math Renderer &gt; Plain Source and then back to Common HTML to switch between seeing the original LaTeX markup and the expression in display form.\" id=\"return-footnote-2888-1\" href=\"#footnote-2888-1\" aria-label=\"Footnote 1\"><sup class=\"footnote\">[1]<\/sup><\/a><\/p>\n<p style=\"text-align: center;\">[latex]10\\text{ \\cancel{m}}[\/latex]<\/p>\n<p>The <code>\\text{}<\/code> command prints out exactly what you write in its curly brackets. Therefore, if you try to insert a <code>\\cancel{m}<\/code> command within a <code>\\text{}<\/code> command, you&#8217;ll just print out &#8220;\\cancel{m}&#8221;.<\/p>\n<p>If you really want to make sure that the space isn&#8217;t cancelled out, you can use two separate <code>\\text{}<\/code> commands to write the space and the m:<\/p>\n<p style=\"text-align: center;\">[latex]10\\text{ }\\cancel{\\text{m}}[\/latex]<\/p>\n<p>Compare this to the original way we wrote it:<\/p>\n<p style=\"text-align: center;\">[latex]10\\cancel{\\text{ m}}[\/latex]<\/p>\n<p>You can see that the difference is minute and that using two separate <code>\\text{}<\/code> commands for the space and the m is cumbersome.<\/p>\n<p>You can use two <code>\\text{}<\/code> commands if you prefer, but when you&#8217;re writing a ton of conversion factors (like in a chapter on conversion factors in a math or chemistry textbook), this extra work will quickly add up.<\/p>\n<p>Generally, we recommend writing <code>10\\cancel{\\text{ m}}<\/code>, because it&#8217;s a little simpler, and it&#8217;s doubtful that anyone would be able to tell the difference.<\/p>\n<hr class=\"before-footnotes clear\" \/><div class=\"footnotes\"><ol><li id=\"footnote-2888-1\">You can right-click this expression and go to <strong>Math Settings &gt; Math Renderer &gt; Plain Source<\/strong> and then back to <strong>Common HTML<\/strong> to switch between seeing the original LaTeX markup and the expression in display form. <a href=\"#return-footnote-2888-1\" class=\"return-footnote\" aria-label=\"Return to footnote 1\">&crarr;<\/a><\/li><\/ol><\/div>","protected":false},"author":124,"menu_order":11,"template":"","meta":{"pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":[],"pb_section_license":""},"chapter-type":[],"contributor":[],"license":[],"class_list":["post-2888","chapter","type-chapter","status-publish","hentry"],"part":2754,"_links":{"self":[{"href":"https:\/\/opentextbc.ca\/pressbooks\/wp-json\/pressbooks\/v2\/chapters\/2888","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\/124"}],"version-history":[{"count":3,"href":"https:\/\/opentextbc.ca\/pressbooks\/wp-json\/pressbooks\/v2\/chapters\/2888\/revisions"}],"predecessor-version":[{"id":3277,"href":"https:\/\/opentextbc.ca\/pressbooks\/wp-json\/pressbooks\/v2\/chapters\/2888\/revisions\/3277"}],"part":[{"href":"https:\/\/opentextbc.ca\/pressbooks\/wp-json\/pressbooks\/v2\/parts\/2754"}],"metadata":[{"href":"https:\/\/opentextbc.ca\/pressbooks\/wp-json\/pressbooks\/v2\/chapters\/2888\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/opentextbc.ca\/pressbooks\/wp-json\/wp\/v2\/media?parent=2888"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/opentextbc.ca\/pressbooks\/wp-json\/pressbooks\/v2\/chapter-type?post=2888"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/opentextbc.ca\/pressbooks\/wp-json\/wp\/v2\/contributor?post=2888"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/opentextbc.ca\/pressbooks\/wp-json\/wp\/v2\/license?post=2888"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}