Markdown公式拓展:添加颜色、空格、大括号

1. Markdown公式添加颜色

Y = f ( x ) = x 1 + x Y = f(\textcolor{red}{x} )= \textcolor{blue}{\frac{x}{1+x}} Y=f(x)=1+xx
在写公式时,有时我们需要使某些地方更醒目,这时需要给公式添加颜色。在markdown中,具体实现如下:
\textcolor {所需颜色} {公式或文本}

例如我们需要将公式改为绿色
Y = x 2 1 + x 2 Y = \textcolor{green}{\frac{x^2}{1+x^2}} Y=1+x2x2

$$
Y = \textcolor{green}{\frac{x^2}{1+x^2}}
$$

2.Markdown公式添加空格

markdown默认忽视空格,当需要使用空格时,可以参考以下方法

  • 1.使用\quad
  • 2.使用text,text内部不再忽视空格
    Y = 1 i f t u r e Y = 1\quad if \quad ture Y=1ifture
    Y = 1  if ture Y=1\text { if ture} Y=1 if ture
$Y = 1\quad if \quad ture$
$Y=1\text { if ture}$

3.Markdown公式使用大括号

Y = { 1 if  stoke ; 2 if  drug overdose ; 3 if  drug epileptic seizure Y = {1if \textcolor{orange}{stoke};2if \textcolor{orange}{drug overdose};3if \textcolor{orange}{drug epileptic seizure} Y=1if stoke;2if drug overdose;3if drug epileptic seizure

$$
Y = \begin{cases}1\quad \text {if \textcolor{orange}{stoke}}  \\
2\quad \text{if \textcolor{orange}{drug overdose};}\\
3 \quad\text{if \textcolor{orange}{drug epileptic seizure}}
\end{cases} 
$$
posted @   JOJO数据科学  阅读(410)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 单线程的Redis速度为什么快?
· 展开说说关于C#中ORM框架的用法!
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· Pantheons:用 TypeScript 打造主流大模型对话的一站式集成库
· SQL Server 2025 AI相关能力初探
点击右上角即可分享
微信分享提示