无需 CSS 直接作用于 MathJax 即可为方程添加彩色背景

问题描述 投票:0回答:2

我正在尝试为方程添加彩色背景。我可以通过使用

CSS
来实现这一点,但现在我想知道在哪里可以直接在调用 MathJax 的脚本中做到这一点。

请在下面找到一个

rmarkdown
示例。

---
title: "Untitled"
output: html_document
---

Some text:

$$Y = \beta_0 + \beta_ 1 X_1 + \ldots + \beta_n X_n.$$
r r-markdown markdown mathjax
2个回答
3
投票

很简单:

$$\require{color}\colorbox{magenta}{y = (sin)x}$$

对于方程的着色文本,您可以使用:

$$\color{green}{y = (cos)x}$$


0
投票

是的!可以使用 LaTeX Math 字体

© www.soinside.com 2019 - 2024. All rights reserved.