Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [ textcolor{green}{sum}_{k=0}^n ]
- newcommand*{opcolor}[2]{mathop{textcolor{#1}{#2}}}
- documentclass{article}
- usepackage{xcolor}
- newcommand*{opcolor}[2]{mathop{textcolor{#1}{#2}}}
- newcommand*{csum}[1]{opcolor{#1}sum}
- begin{document}
- [ mathop{textcolor{green}{sum}}_{k=0}^n ]
- [ csum{green}_{k=0}^n ]
- [ opcolor{green}{sum}_{k=0}^n ]
- end{document}
- documentclass{article}
- usepackage{amsmath}
- usepackage{xcolor}
- begin{document}
- [ mathop{textcolor{green}{sum}}_{k=0}^n ]
- end{document}
- documentclass{article}
- usepackage{xcolor}
- colorlet{mygreen}{green!80!black}% a littler darker
- makeatletter
- newcommand*{mathcolor}{}
- % Catch an optional argument in #1
- defmathcolor#1#{math@color{#1}}%
- newcommand*{math@color}[3]{%
- % #1: empty or optional argument including brackets
- % #2: mandatory color argument
- % #3: stuff to be colored
- begingroupcolor#1{#2}#3endgroup
- }
- makeatother
- begin{document}
- [
- mathcolor{mygreen}{
- int_{mathcolor{black}{k=0}}^{mathcolor{black}{n}}
- }
- mathcolor{red}{=}
- mathcolor{mygreen}{
- intlimits_{mathcolor{black}{k=0}}^{mathcolor{black}{n}}
- }
- ]
- end{document}
Add Comment
Please, Sign In to add comment