{"id":304,"date":"2021-06-04T17:36:11","date_gmt":"2021-06-05T00:36:11","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/math-in-office\/?p=304"},"modified":"2021-06-04T17:36:11","modified_gmt":"2021-06-05T00:36:11","slug":"switching-from-latex-to-unicodemath-input-mode","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/math-in-office\/switching-from-latex-to-unicodemath-input-mode\/","title":{"rendered":"Switching from LaTeX to UnicodeMath Input Mode"},"content":{"rendered":"<p>Here\u2019s a bit of a puzzle. When the user enters \u201ca\/b\u201d in <a href=\"https:\/\/docs.microsoft.com\/en-us\/archive\/blogs\/murrays\/latex-math-in-office\">LaTeX mode<\/a> and formats it with the Enter key, the \u2018\/\u2019 is marked as \u201cnobuildup\u201d. If the user then switches to <a href=\"https:\/\/www.unicode.org\/notes\/tn28\/UTN28-PlainTextMath-v3.1.pdf\">UnicodeMath<\/a> input mode and enters a space after the linear fraction containing the \u2018\/\u2019, the fraction won\u2019t build up, by design. If you delete the \/ and reenter it, it\u2019ll build up as usual in UnicodeMath mode. A problem is that the user cannot easily detect that the \u2018\/\u2019 has the nobuildup attribute since the math ribbon doesn\u2019t display that attribute.<\/p>\n<p>One might conclude that when switching from LaTeX to UnicodeMath input mode, Word should remove the nobuildup effect from all \u2018\/\u2019 in the current math zone. But the intent in LaTeX is not to build up a fraction with a \u2018\/\u2019 since built-up fractions are entered in TeX and LaTeX using the special constructs \\over and \\frac, respectively. The only way the user can build up a nobuildup \u2018\/\u2019 is to delete the \u2018\/\u2019 and reenter it. \u2018\/\u2019 is the only operator that\u2019s marked as nobuildup automatically in LaTeX input mode. A \u2018\/\u2019 that\u2019s not marked as nobuildup in LaTeX mode is actually used in building up the TeX {&lt;numerator&gt;\\over &lt;denominator&gt;} construct. The build-up engine supports TeX as well as LaTeX constructs, since users might use either.<\/p>\n<p>In UnicodeMath input mode, you can mark an operator as \u201cnobuildup\u201d by preceding it with a \\. So \u201ca\\\/b\u201d produces \ud835\udc4e\/\ud835\udc4f and you can try to build it up with a space, but, by design, it won\u2019t build up. It\u2019s fairly common to want to have a simple linear fraction and that\u2019s how it\u2019s done. You can \u201cquote\u201d other operators to prevent them from building up. For example, you might want to quote delimiters, e.g., \\{ and \\}, which won\u2019t then build up to fit their content.<\/p>\n<p>Perhaps the math ribbons should display the \u201cnobuildup\u201d attribute. Then the user could see a difference. It\u2019d also be handy for the math ribbon to display the bold and italic attributes, since these are commonly used in math zones for math-bold and math-italic characters.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here\u2019s a bit of a puzzle. When the user enters \u201ca\/b\u201d in LaTeX mode and formats it with the Enter key, the \u2018\/\u2019 is marked as \u201cnobuildup\u201d. If the user then switches to UnicodeMath input mode and enters a space after the linear fraction containing the \u2018\/\u2019, the fraction won\u2019t build up, by design. If [&hellip;]<\/p>\n","protected":false},"author":40611,"featured_media":55,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-304","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-math-in-office"],"acf":[],"blog_post_summary":"<p>Here\u2019s a bit of a puzzle. When the user enters \u201ca\/b\u201d in LaTeX mode and formats it with the Enter key, the \u2018\/\u2019 is marked as \u201cnobuildup\u201d. If the user then switches to UnicodeMath input mode and enters a space after the linear fraction containing the \u2018\/\u2019, the fraction won\u2019t build up, by design. If [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/math-in-office\/wp-json\/wp\/v2\/posts\/304","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/math-in-office\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/math-in-office\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/math-in-office\/wp-json\/wp\/v2\/users\/40611"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/math-in-office\/wp-json\/wp\/v2\/comments?post=304"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/math-in-office\/wp-json\/wp\/v2\/posts\/304\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/math-in-office\/wp-json\/wp\/v2\/media\/55"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/math-in-office\/wp-json\/wp\/v2\/media?parent=304"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/math-in-office\/wp-json\/wp\/v2\/categories?post=304"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/math-in-office\/wp-json\/wp\/v2\/tags?post=304"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}