11/24/2023 0 Comments Latex brackets with subscriptSubscripts: Insert an underscore () before a subscript to indicate a subscript. For a multivariable function, like f ( x, y ) x 2 y f(x, y) x2y f(x,y)x2yf, left parenthesis, x, comma, y, right parenthesis, equals, x, squared, y. If the exponent or superscript includes multiple characters or is an expression, surround the expression with parentheses. Note that the g argument type is not listed at the top because it is only included for backwards compatibility as it “should largely be avoided nowadays as using them in packages leads to inconsistent user interfaces” (from the documentation). Exponents or superscripts: Insert a caret () before an exponent or superscript. ![]() Although the two commands are the same in terms of spelling, they are completely different in terms of functional work because LaTeX is case-sensitive. Latex has braket packages that contain two separate commands, braket, and Braket to represent this symbol. \IfValueT is used to test if an optional argument was provided and to then act accordingly. Braket package for the bra-ket notation in LaTeX. ![]() I'm not sure if this is such a good idea, however, since an optional brace-delimited argument is very un-LaTeX and it's easy to accidentally pass something in as an argument when you didn't mean to. You could do this with the xparse package by using \NewDocumentCommand. Since I've always been bugged by the fact that LaTeX's sscripts need math mode (setting normal text inside math mode have issues with LuaTeX's directionality), motivated by this question, I 'stole' the subscript/superscript code from ConTeXt which is set entirely in text mode, with quick hacks to get it work with plain TeX (needs pdftex/luatex though), it is here for now, if there is interest.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |