{"id":21755,"date":"2012-12-17T12:00:08","date_gmt":"2012-12-17T16:00:08","guid":{"rendered":"http:\/\/mathgradblog.williams.edu\/?p=21755"},"modified":"2012-12-17T12:00:08","modified_gmt":"2012-12-17T16:00:08","slug":"latex-commands","status":"publish","type":"post","link":"https:\/\/blogs.ams.org\/mathgradblog\/2012\/12\/17\/latex-commands\/","title":{"rendered":"LaTeX Commands"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-2765 alignright\" alt=\"AMSBlog\" src=\"http:\/\/blogs.ams.org\/mathgradblog\/files\/2012\/03\/AMSBlog.jpg\" width=\"120\" height=\"120\" srcset=\"https:\/\/blogs.ams.org\/mathgradblog\/files\/2012\/03\/AMSBlog.jpg 200w, https:\/\/blogs.ams.org\/mathgradblog\/files\/2012\/03\/AMSBlog-150x150.jpg 150w\" sizes=\"auto, (max-width: 120px) 100vw, 120px\" \/>In light of the popularity of my post entitled\u00a0<em><a href=\"http:\/\/mathgradblog.williams.edu\/top-latex-mistakes\/\" target=\"_blank\">Top LaTeX Mistakes<\/a><\/em>, I thought it might be nice to list some helpful commands that make typesetting quicker. If you are not familiar with defining commands, you would define them in your preamble as follows:\u00a0newcommand{COMMANDNAME}[Number of expected arguments]{Command Info}<\/p>\n<p>For example, you could use \u00a0newcommand{bb}[1]{mathbb{#1}}. This command allows you to type bb{R}$ to make a blackboard bold R (<img decoding=\"async\" src=\"https:\/\/s0.wp.com\/latex.php?latex=mathbb%7BR%7D&#038;bg=ffffff&#038;fg=000&#038;s=0&#038;c=20201002\" alt=\"mathbb{R}\" class=\"latex\" \/>) rather than mathbb{R}.<\/p>\n<p>Below are my favorite commands.<\/p>\n<p><!--more--><\/p>\n<ol>\n<li><strong>bb{}\u00a0<\/strong>&#8211; Explained above. You can also define a command R, N, Z, Q, etc. to make these letters blackboard bold.<\/li>\n<li><strong>newcommand{ip}[1]{langle #1 rangle}<\/strong> &#8211; For example, ip{v,w} would produce\u00a0<img decoding=\"async\" src=\"https:\/\/s0.wp.com\/latex.php?latex=langle+v%2Cw+rangle&#038;bg=ffffff&#038;fg=000&#038;s=0&#038;c=20201002\" alt=\"langle v,w rangle\" class=\"latex\" \/>.<\/li>\n<li><strong>newcommand{bignorm}[1]{left| #1 right|}<\/strong> &#8211; This will allow you to type bignorm{dfrac{a}{b}} to produce <img decoding=\"async\" src=\"https:\/\/s0.wp.com\/latex.php?latex=+left%7C+dfrac%7Ba%7D%7Bb%7D+right%7C+&#038;bg=ffffff&#038;fg=000&#038;s=0&#038;c=20201002\" alt=\" left| dfrac{a}{b} right| \" class=\"latex\" \/>. Notice that similar commands can be defined for inner products, absolute values, curly brackets, square brackets, parentheses, etc.<\/li>\n<li><strong>newcommand{dint}[4]{displaystyleint_{#1}^{#2} ! #3 , operatorname{d} ! #4}<\/strong> &#8211; This will allow you to type dint{a}{b}{f(x)}{x} to produce <img decoding=\"async\" src=\"https:\/\/s0.wp.com\/latex.php?latex=+displaystyleint_a%5Eb+f%28x%29+%2C+textrm%7Bd%7D+%21+x+&#038;bg=ffffff&#038;fg=000&#038;s=0&#038;c=20201002\" alt=\" displaystyleint_a^b f(x) , textrm{d} ! x \" class=\"latex\" \/>.<\/li>\n<\/ol>\n<p>What commands do you use?<\/p>\n<div style=\"margin-top: 0px; margin-bottom: 0px;\" class=\"sharethis-inline-share-buttons\" ><\/div>","protected":false},"excerpt":{"rendered":"<p>In light of the popularity of my post entitled\u00a0Top LaTeX Mistakes, I thought it might be nice to list some helpful commands that make typesetting quicker. If you are not familiar with defining commands, you would define them in your &hellip; <a href=\"https:\/\/blogs.ams.org\/mathgradblog\/2012\/12\/17\/latex-commands\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n<div style=\"margin-top: 0px; margin-bottom: 0px;\" class=\"sharethis-inline-share-buttons\" data-url=https:\/\/blogs.ams.org\/mathgradblog\/2012\/12\/17\/latex-commands\/><\/div>\n","protected":false},"author":22,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[2,8,21],"tags":[],"class_list":["post-21755","post","type-post","status-publish","format-standard","hentry","category-advice","category-general","category-technology-math"],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p3gbww-5ET","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/blogs.ams.org\/mathgradblog\/wp-json\/wp\/v2\/posts\/21755","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.ams.org\/mathgradblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.ams.org\/mathgradblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.ams.org\/mathgradblog\/wp-json\/wp\/v2\/users\/22"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.ams.org\/mathgradblog\/wp-json\/wp\/v2\/comments?post=21755"}],"version-history":[{"count":0,"href":"https:\/\/blogs.ams.org\/mathgradblog\/wp-json\/wp\/v2\/posts\/21755\/revisions"}],"wp:attachment":[{"href":"https:\/\/blogs.ams.org\/mathgradblog\/wp-json\/wp\/v2\/media?parent=21755"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.ams.org\/mathgradblog\/wp-json\/wp\/v2\/categories?post=21755"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.ams.org\/mathgradblog\/wp-json\/wp\/v2\/tags?post=21755"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}