3

I have colored my fences \right( and \left( by grouping my fences into the same scope by following a comment here by @Bardaigorl.

Is there a better way to accomplish my goal of getting the fences the same color?

\documentclass[11pt]{amsart}
\usepackage{amsmath,amssymb} 
\usepackage{graphicx}
\usepackage{tikz}   % Loads the xcolor package.

\newcommand{\N}{\mathbb{N}}  % The natural numbers.
\newcommand{\eu}{\ensuremath{\mathrm{e}}}   % The Euler number, `e'.
\newcommand{\iu}{\ensuremath{\mathrm{i}}}   % The imaginary unit `i'.
\newcommand{\du}{\ensuremath{\mathop{}\!\textnormal{\slshape d}}}   % A slant roman differential operator.

%%% The following redefinition of \textcolor [from stackexchange] preserves the spacing around binary operators in mathmode.
\makeatletter
\renewcommand*{\@textcolor}[3]{%
  \protect\leavevmode
  \begingroup
    \color#1{#2}#3%
  \endgroup
}
\makeatother

\begin{document}
Let's see what we can do with Euler's formula, $\eu^{\vartheta \iu } = \cos{\vartheta} + \iu \sin{\vartheta}$ when we think in terms of a very, very long polynomial, and include appropriate substitutions for each occurrence of $\iu^{n }$ for $n \in \N$.

\[
\eu^{\vartheta \iu } = 1  \textcolor{red}{-} \frac{\vartheta^2}{2!} + \frac{\vartheta^4}{4!}  \textcolor{red}{-} \frac{\vartheta^6 }{6!} + \frac{\vartheta^8}{8!} \textcolor{red}{-} \frac{\vartheta^{10}}{10!}+ \cdots + \textcolor{green!65!black}{\iu} {\color{green!65!black}\left( {\color{black}\vartheta \textcolor{red}{-} \frac{\vartheta^3}{3!} + \frac{\vartheta^5}{5!} \textcolor{red}{-} \frac{\vartheta^7}{7!} + \frac{\vartheta^9}{9!}  \textcolor{red}{-} \frac{\vartheta^{11}}{11!} + \cdots} \right)}.
\]
\end{document}
Bryan H-M
  • 397
  • 1
  • 11
  • Thank you all for pointing out the existing solutions to my question. Please close this question. The links you provided, as well as those in the links, highlight several different solutions. I am unclear on the pros and cons of several of those solutions. – Bryan H-M Jan 21 '18 at 14:09

0 Answers0