{"id":90,"date":"2016-10-25T20:46:31","date_gmt":"2016-10-26T00:46:31","guid":{"rendered":"https:\/\/openbooks.macewan.ca\/authorsguide\/chapter\/math-and-science-formulas-using-latex\/"},"modified":"2026-01-13T16:36:17","modified_gmt":"2026-01-13T21:36:17","slug":"math-and-science-formulas-using-latex","status":"publish","type":"chapter","link":"https:\/\/openbooks.macewan.ca\/authorsguide\/chapter\/math-and-science-formulas-using-latex\/","title":{"raw":"Math and Science Formulas Using LaTeX","rendered":"Math and Science Formulas Using LaTeX"},"content":{"raw":"Pressbooks supports LaTeX code, a typesetting language that is often used to format complex science and math equations, using <a href=\"https:\/\/www.mathjax.org\">MathJax<\/a>\u00a0built into the software.\r\n<h2>How to Add LaTeX Equations<\/h2>\r\nLaTeX can be added using the LaTeX option in the visual text editor when editing a chapter or section, or by writing out shortcodes as shown.\r\n\r\nNote: The LaTeX shortcodes below are <span style=\"background-color: #ff99cc;\">coloured<\/span> to show examples. Actual formulas and shortcodes have to be the same color and style.\r\n<ul>\r\n \t<li><span style=\"background-color: #ff99cc;\">[la\u200btex]<\/span>latex code here<span style=\"background-color: #ff99cc;\">[\/lat\u200bex]<\/span><\/li>\r\n \t<li><span style=\"background-color: #ff99cc;\">$<\/span>latex latex code here<span style=\"background-color: #ff99cc;\">$<\/span><\/li>\r\n<\/ul>\r\n<h3>Example 1:<\/h3>\r\n<span style=\"background-color: #ff99cc;\">[latex]<\/span>\\left(1+x\\right)^n=1+\\frac{nx}{1!}+\\frac{n\\left(n-1\\right)x^2}{2!}+\\ldots<span style=\"background-color: #ff99cc;\">[\/latex]<\/span>\r\n\r\n[latex]\\left(1+x\\right)^n=1+\\frac{nx}{1!}+\\frac{n\\left(n-1\\right)x^2}{2!}+\\ldots[\/latex]\r\n<h3>Example 2:<\/h3>\r\n<span style=\"background-color: #ff99cc;\">$<\/span>latex \\left(1+x\\right)^n=1+\\frac{nx}{1!}+\\frac{n\\left(n-1\\right)x^2}{2!}+\\ldots<span style=\"background-color: #ff99cc;\">$<\/span>\r\n\r\n$latex \\left(1+x\\right)^n=1+\\frac{nx}{1!}+\\frac{n\\left(n-1\\right)x^2}{2!}+\\ldots$\r\n<h2>Using LaTeX syntax in H5P elements<\/h2>\r\n<div class=\"textbox\">If you would like to use LaTeX in H5P elements, email us at <a href=\"mailto:digitalscholarship@macewan.ca\">digitalscholarship@macewan.ca<\/a> and we will activate this option for you.<\/div>\r\nYou can draft equations inside of H5P elements in Pressbooks with MathJax LaTeX.\r\n\r\nFor H5P elements, use these LaTeX shortcodes:\r\n<ul>\r\n \t<li><span style=\"background-color: #ff99cc;\">\\(<\/span>some LaTeX<span style=\"background-color: #ff99cc;\">\\)<\/span><\/li>\r\n \t<li><span style=\"background-color: #ff99cc;\">$$<\/span>some LaTeX<span style=\"background-color: #ff99cc;\">$$<\/span><\/li>\r\n \t<li><span style=\"background-color: #ff99cc;\">\\[<\/span>some LaTeX<span style=\"background-color: #ff99cc;\">\\]\u00a0<\/span><\/li>\r\n<\/ul>\r\n[h5p id=\"1\"]\r\n<h2><strong>Additional Resources<\/strong><\/h2>\r\n<ul>\r\n \t<li><a href=\"https:\/\/wordpress.org\/plugins\/latex\/\">LaTex in WordPress<\/a><\/li>\r\n \t<li><a href=\"http:\/\/www.latex-project.org\/guides\/\" target=\"_blank\" rel=\"noopener noreferrer\">LaTeX reference guides<\/a><\/li>\r\n \t<li><a href=\"https:\/\/spscc.pressbooks.pub\/tutorial\/chapter\/chapter-1-4\/\">MathJax<\/a> (SPSCC Pressbooks Tutorial)<\/li>\r\n<\/ul>\r\n<div class=\"textbox shaded\">Content adapted from \"Math and Science Formulas Using LaTeX\" from the <a href=\"https:\/\/web.archive.org\/web\/20170701215004\/https:\/\/opentextbc.ca\/opentextbook\/\"><em>B.C. Open Textbook Authoring Guide<\/em><\/a> (archived version) by Lauri Aesoph and Amanda Coolidge, and from the SPSCC Pressbooks Tutorial on <a href=\"https:\/\/spscc.pressbooks.pub\/tutorial\/chapter\/chapter-1-4\/\">MathJax<\/a> by Alaka Pradhan, each licensed under a <a href=\"https:\/\/creativecommons.org\/licenses\/by\/4.0\/\" rel=\"license\">Creative Commons Attribution 4.0 International License<\/a>,<\/div>","rendered":"<p>Pressbooks supports LaTeX code, a typesetting language that is often used to format complex science and math equations, using <a href=\"https:\/\/www.mathjax.org\">MathJax<\/a>\u00a0built into the software.<\/p>\n<h2>How to Add LaTeX Equations<\/h2>\n<p>LaTeX can be added using the LaTeX option in the visual text editor when editing a chapter or section, or by writing out shortcodes as shown.<\/p>\n<p>Note: The LaTeX shortcodes below are <span style=\"background-color: #ff99cc;\">coloured<\/span> to show examples. Actual formulas and shortcodes have to be the same color and style.<\/p>\n<ul>\n<li><span style=\"background-color: #ff99cc;\">[la\u200btex]<\/span>latex code here<span style=\"background-color: #ff99cc;\">[\/lat\u200bex]<\/span><\/li>\n<li><span style=\"background-color: #ff99cc;\">$<\/span>latex latex code here<span style=\"background-color: #ff99cc;\">$<\/span><\/li>\n<\/ul>\n<h3>Example 1:<\/h3>\n<p><span style=\"background-color: #ff99cc;\">[latex]<\/span>\\left(1+x\\right)^n=1+\\frac{nx}{1!}+\\frac{n\\left(n-1\\right)x^2}{2!}+\\ldots<span style=\"background-color: #ff99cc;\">[\/latex]<\/span><\/p>\n<p>[latex]\\left(1+x\\right)^n=1+\\frac{nx}{1!}+\\frac{n\\left(n-1\\right)x^2}{2!}+\\ldots[\/latex]<\/p>\n<h3>Example 2:<\/h3>\n<p><span style=\"background-color: #ff99cc;\">$<\/span>latex \\left(1+x\\right)^n=1+\\frac{nx}{1!}+\\frac{n\\left(n-1\\right)x^2}{2!}+\\ldots<span style=\"background-color: #ff99cc;\">$<\/span><\/p>\n<p>[latex]\\left(1+x\\right)^n=1+\\frac{nx}{1!}+\\frac{n\\left(n-1\\right)x^2}{2!}+\\ldots[\/latex]<\/p>\n<h2>Using LaTeX syntax in H5P elements<\/h2>\n<div class=\"textbox\">If you would like to use LaTeX in H5P elements, email us at <a href=\"mailto:digitalscholarship@macewan.ca\">digitalscholarship@macewan.ca<\/a> and we will activate this option for you.<\/div>\n<p>You can draft equations inside of H5P elements in Pressbooks with MathJax LaTeX.<\/p>\n<p>For H5P elements, use these LaTeX shortcodes:<\/p>\n<ul>\n<li><span style=\"background-color: #ff99cc;\">\\(<\/span>some LaTeX<span style=\"background-color: #ff99cc;\">\\)<\/span><\/li>\n<li><span style=\"background-color: #ff99cc;\">$$<\/span>some LaTeX<span style=\"background-color: #ff99cc;\">$$<\/span><\/li>\n<li><span style=\"background-color: #ff99cc;\">\\[<\/span>some LaTeX<span style=\"background-color: #ff99cc;\">\\]\u00a0<\/span><\/li>\n<\/ul>\n<div id=\"h5p-1\">\n<div class=\"h5p-iframe-wrapper\"><iframe id=\"h5p-iframe-1\" class=\"h5p-iframe\" data-content-id=\"1\" style=\"height:1px\" src=\"about:blank\" frameBorder=\"0\" scrolling=\"no\" title=\"H5P LaTeX Examples\"><\/iframe><\/div>\n<\/div>\n<h2><strong>Additional Resources<\/strong><\/h2>\n<ul>\n<li><a href=\"https:\/\/wordpress.org\/plugins\/latex\/\">LaTex in WordPress<\/a><\/li>\n<li><a href=\"http:\/\/www.latex-project.org\/guides\/\" target=\"_blank\" rel=\"noopener noreferrer\">LaTeX reference guides<\/a><\/li>\n<li><a href=\"https:\/\/spscc.pressbooks.pub\/tutorial\/chapter\/chapter-1-4\/\">MathJax<\/a> (SPSCC Pressbooks Tutorial)<\/li>\n<\/ul>\n<div class=\"textbox shaded\">Content adapted from &#8220;Math and Science Formulas Using LaTeX&#8221; from the <a href=\"https:\/\/web.archive.org\/web\/20170701215004\/https:\/\/opentextbc.ca\/opentextbook\/\"><em>B.C. Open Textbook Authoring Guide<\/em><\/a> (archived version) by Lauri Aesoph and Amanda Coolidge, and from the SPSCC Pressbooks Tutorial on <a href=\"https:\/\/spscc.pressbooks.pub\/tutorial\/chapter\/chapter-1-4\/\">MathJax<\/a> by Alaka Pradhan, each licensed under a <a href=\"https:\/\/creativecommons.org\/licenses\/by\/4.0\/\" rel=\"license\">Creative Commons Attribution 4.0 International License<\/a>,<\/div>\n","protected":false},"author":4,"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-90","chapter","type-chapter","status-publish","hentry"],"part":33,"_links":{"self":[{"href":"https:\/\/openbooks.macewan.ca\/authorsguide\/wp-json\/pressbooks\/v2\/chapters\/90","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/openbooks.macewan.ca\/authorsguide\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/openbooks.macewan.ca\/authorsguide\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/openbooks.macewan.ca\/authorsguide\/wp-json\/wp\/v2\/users\/4"}],"version-history":[{"count":1,"href":"https:\/\/openbooks.macewan.ca\/authorsguide\/wp-json\/pressbooks\/v2\/chapters\/90\/revisions"}],"predecessor-version":[{"id":91,"href":"https:\/\/openbooks.macewan.ca\/authorsguide\/wp-json\/pressbooks\/v2\/chapters\/90\/revisions\/91"}],"part":[{"href":"https:\/\/openbooks.macewan.ca\/authorsguide\/wp-json\/pressbooks\/v2\/parts\/33"}],"metadata":[{"href":"https:\/\/openbooks.macewan.ca\/authorsguide\/wp-json\/pressbooks\/v2\/chapters\/90\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/openbooks.macewan.ca\/authorsguide\/wp-json\/wp\/v2\/media?parent=90"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/openbooks.macewan.ca\/authorsguide\/wp-json\/pressbooks\/v2\/chapter-type?post=90"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/openbooks.macewan.ca\/authorsguide\/wp-json\/wp\/v2\/contributor?post=90"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/openbooks.macewan.ca\/authorsguide\/wp-json\/wp\/v2\/license?post=90"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}