3

How can I change the color of {(case) in the below code?

\begin{equation}\label{48ch}
 \begin{cases}

  \sigma_1>0  \\
  \sigma_2<0 \\

   \end{cases} 
  \end{equation}
3

3 Answers 3

5
\documentclass{report}
\usepackage{mathtools}
\usepackage{xcolor}

\begin{document}
    \begin{equation}\label{48ch}
    {\color{green}
\begin{cases}
    {\color{red}\sigma_1}>{\color{yellow}0}  \\[1ex]
    {\color{blue}\sigma_2}<{\color{purple}0}    
\end{cases}
}
  \end{equation}
\end{document}

enter image description here

4

If you just want a coloured brace, you can load empheq and use an aligned environment:

\documentclass{article}
\usepackage{empheq}

\usepackage{xcolor}

\begin{document}
\begin{empheq}[left =\color{red}\empheqlbrace]{equation}\label{48ch}
  \begin{aligned}
      & \sigma_1 > 0 \\[1ex]
      & \sigma_2 < 0
  \end{aligned}
\end{empheq}

\end{document} 

enter image description here

1

It is not clear, what you like to have colored. Maybe something like this?

enter image description here

\documentclass{article}
\usepackage{mathtools}

\usepackage{xcolor}

\begin{document}
    \begin{equation}\label{48ch}
{\color{red}
\begin{cases}
    \sigma_1>0  \\[1ex]
    \sigma_2<0    
\end{cases}
}
  \end{equation}
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .