Quantcast
Channel: Redefine a letter in mathmode - TeX - LaTeX Stack Exchange
Viewing all articles
Browse latest Browse all 2

Redefine a letter in mathmode

$
0
0

I'd like to do the same thing that is been done to the greek letter \chi in this post to the letter g. In particular I'd like to redefine g in mathmode to work as \chi here:

   \makeatletter   \renewcommand\chi{\@ifnextchar_\sub@chi\latexchi}   \newcommand{\sub@chi}[2]{% #1 is _, #2 is the subscript     \@ifnextchar^{\subsup@chi{#2}}{\latexchi^{}_{#2}}%   }   \newcommand{\subsup@chi}[3]{% #1 is the subscript, #2 is ^, #3 is the superscript     \latexchi_{#1}^{#3}%   }   \makeatother

Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images