\documentclass[12pt, french]{article}
\usepackage{lmodern}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{mathrsfs}
\usepackage{amsthm}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage[utf8]{inputenc}
\usepackage[margin=3cm]{geometry}
\usepackage[x11names]{xcolor}
\usepackage{framed, etoolbox}
\colorlet{framecolor}{VioletRed4}
\begin{document}
Soit f une application linéaire alors:
\[\forall x,y\in G,\ f(x)=f(y)\iff x=y\]
\end{document}
答案1
\documentclass[12pt, french]{article}
\usepackage{lmodern}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{mathrsfs}
\usepackage{amsthm}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage[utf8]{inputenc}
\usepackage[margin=3cm]{geometry}
\usepackage[x11names]{xcolor}
\usepackage{framed, etoolbox}
\colorlet{framecolor}{VioletRed4}
\begin{document}
\color{blue}%%change the color name what you want
Soit f une application linéaire alors:
\[\forall x,y\in G,\ f(x)=f(y)\iff x=y\]
\end{document}
答案2
参考了 leandriis如何给数学符号着色?
并做出了如下效果:
\documentclass[12pt, french]{article}
\usepackage{lmodern}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{mathrsfs}
\usepackage{amsthm}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage[utf8]{inputenc}
\usepackage[margin=3cm]{geometry}
\usepackage[x11names]{xcolor}
\usepackage{framed, etoolbox}
\colorlet{framecolor}{VioletRed4}
\usepackage{xcolor}
\begin{document}
Soit f une application linéaire alors:
\[\color{red} \forall x,y\in \textcolor{blue}{G},\ f(x)=f(y)\iff x=y\]
\end{document}
收到: