4
\documentclass[10pt,landscape,a4paper,svgnames,x11names]{article}

\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage[utopia,sfscaled]{mathdesign}
\usepackage{amsmath}

\everymath{\color{MidnightBlue}}

\begin{document} 
\section*{Reihen} 
\begin{equation*}
 \sum_{n=0}^\infty a_n \text{bzw.} a_k=\sum_{n=0}^k a_n
\end{equation*}
$\rightarrow$ kann konvergieren oder divergieren \\
Bedingungen f\"ur Konvergenz:
\begin{itemize}
    \item{Nullfolge} $a_n\rightarrow 0$
    \item{Quotientenkriterium} $\lim\limits_{n\to\infty}|\frac{a_{n+1}}{a_n}|=q$ 
    \begin{align*}
    q<1&\Rightarrow \text{konvergent} \\
    q>1&\Rightarrow \text{divergent} \\
    q=1&\Rightarrow \text{keine Aussage}
    \end{align*}
\end{itemize}
\end{document}

Why aren't my equation blue too using \everymath? And how will they?

Ingmar
  • 6,690
  • 5
  • 26
  • 47
Laura
  • 147

1 Answers1

1

The following code works for me:

\documentclass[10pt,landscape,a4paper,svgnames,x11names]{article}

\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage[utopia,sfscaled]{mathdesign}
\usepackage{amsmath}
\usepackage{xcolor}

\everymath{\color{MidnightBlue}}

\begin{document} 
\section*{Reihen} 
\begin{equation*}
 \sum_{n=0}^\infty a_n \text{bzw.} a_k=\sum_{n=0}^k a_n
\end{equation*}
$\rightarrow$ kann konvergieren oder divergieren \\
Bedingungen f\"ur Konvergenz:
\begin{itemize}
    \item{Nullfolge} $a_n\rightarrow 0$
    \item{Quotientenkriterium} $\lim\limits_{n\to\infty}|\frac{a_{n+1}}{a_n}|=q$ 
    \begin{align*}
    q<1&\Rightarrow \text{konvergent} \\
    q>1&\Rightarrow \text{divergent} \\
    q=1&\Rightarrow \text{keine Aussage}
    \end{align*}
\end{itemize}
\end{document}

I simply invoked the xcolorpackage.

Brasil
  • 1,286
  • But it doesn't colour the equation* content. – Andrew Swann Apr 25 '19 at 10:20
  • It seems that the command \everymath{\color{MidnightBlue}} doesn't reach the equation environment. In that case, change that line by \begin{equation*} \color{MidnightBlue}. Another approach is to define a new environment based on equation that applies the desired color. – Brasil Apr 25 '19 at 12:58
  • Indeed; daleif gave one way to fix this in the comments above. – Andrew Swann Apr 25 '19 at 13:48