LaTex排版技巧:[30]如何输入带颜色的公式

 时间:2026-04-22 17:54:43

1、大家是否对有输入下述图形中公式的需求呢?如果有的话,请继续往下看,^_^

LaTex排版技巧:[30]如何输入带颜色的公式

2、这里提供第一个公式的输入代码

\usepackage{amsmath}

\usepackage{empheq}

\usepackage{xcolor}

\usepackage{graphicx}

\definecolor{hellmagenta}{rgb}{1,0.75,0.9}

\definecolor{hellcyan}{rgb}{0.75,1,0.9}

\definecolor{hellgelb}{rgb}{1,1,0.8}

\definecolor{colKeys}{rgb}{0,0,1}

\definecolor{colIdentifier}{rgb}{0,0,0}

\definecolor{colComments}{rgb}{1,0,0}

\definecolor{colString}{rgb}{0,0.5,0}

\definecolor{darkyellow}{rgb}{1,0.9,0}

\def\xstrut{\vphantom{\dfrac{(A)^1}{(B)^1}}}

\begin{equation}\label{eq:6}

E = %

\colorbox{darkyellow}{$\xstrut a_vA$} -

\colorbox{hellmagenta}{$\xstrut a_fA^{2/3}$} -

\colorbox{green}{$\xstrut a_c\dfrac{Z(Z-1)}{A^{1/3}}$} -

\colorbox{cyan}{$\xstrut a_s\dfrac{(A-2Z)^2}{A}$} +

\colorbox{yellow}{$\xstrut E_p$}

\end{equation}

  • matlab如何实现图像平移与镜像?
  • matlab如何对矩阵求逆
  • 在LabVIEW里面使用设置文件位置函数
  • 如何在matlab里删除电脑里的文件
  • MATLAB矩阵分解
  • 热门搜索
    若即若离是什么意思 2015年是什么命 一蹴而就是什么意思 佛是什么 经手人是什么意思 民族精神是什么 我的什么作文 高血压要注意什么 穿山甲是什么动物 什么是神话故事