Latex brackets with subscript11/23/2023 This explanation would not be complete without stating how to restore the underscore to its original category code. If you need to subset text in math mode, the macro \sb can still be used in math mode for subscript. I presume you are in math mode and I assume you want to have both superscript and subscript horizontally aligned next to the symbol you are super-/subscripting. In LaTeX equations, a single caret indicates the superscript. Note: this can be confusing, because the R Markdown language delimits superscripts with two carets. To indicate a superscript, use a single caret character. This way, you can go on about your happy life using the underscore as you normally would. To indicate a subscript, use the underscore character. \catcode`_=12 % alphabetic constant syntax Choose one of the following syntaxes according to your preference: \catcode`\_=12 % alphabetic constant syntax Here, we assign the underscore the same category code that most punctuation has. \usepackage givesįor those not interested the functionality of the underscore in LaTeX and just want it to function like any other character, the category code of the underscore can be changed to make it work as might be expected.\char`_ is tedious to write and looks confusing,. Something else to note when using and opening and closing indicators, everything will be put on one line, so the code being put on several lines will not impact the end result. The solution I like best is to put \chardef\_=`_ in the preamble and use \_ to typeset an underscore. Even though superscripts and subscripts are called on a regular object with the sigma operator, it is automatically aligned.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |