I'd like to make all my math blue. So far I only use the $, equation and align environment, so it'd we nice it it worked for those. If it works for others, that'd be even greater.
\documentclass{article}
\usepackage{amsmath}
\usepackage{xcolor}
\everymath{\color{blue}}
\everydisplay{\color{blue}}
\begin{document}
Let $\vec{v}$ be some vector. A fancy one.
\begin{align}
\vec{v} = \vec{a} \\
&= + \vec{b}
\end{align}
\begin{equation}
\vec{v} = \vec{a} + \vec{b}
\end{equation}
\end{document}
I get
untitled.tex|14 error| Improper \halign inside $$'s
I know I could just write my own environments but I really would love to just tell it: Make everything blue no matter what.
font-spec
orunicode-math
, so not a pdflatex solution. You only want specified environments to apply blue text/maths, elsewhere is unchanged, is that correct? Some solution sets will be engine-specific.\everymath
. Rather, it's that XeLaTeX and LuaLaTeX -- more precisely, thefontspec
package which runs only under XeLaTeX or LuaLaTeX -- offer a solution that isn't available under pdfLaTeX. To wit, if theunicode-math
package (which loadsfontspec
automatically) is loaded, then the optionColor=0000FF
while executing\setmathfont
will render all inline math and display math material in blue; no need for\everydisplay
.