Latex操作

常用

Latex

Latex help

底色

  • 字体底色
\colorbox{yellow}{Thistext}

只适用于短句,大段文字加底色无法自动换行。

  • 段落底色
\usepackage{color}  
%\definecolor{shadecolor}{named}{Gray}  
\definecolor{shadecolor}{rgb}{0.92,0.92,0.92}  
\usepackage{framed} 

\begin{shaded} 
	NOTE: the solutions and objectives two model are the same. 
	While, the results by python code are different. 
	The result of model 1 is better, so we use it to code. 
	But, we use the model 2 for writing manuscript.
\end{shaded}
  • 公式底色
\colorbox{$\displaystyle + 公式$}
\colorbox{yellow}{\begin{equation*} ... \end{equation*}}
e.g.
\colorbox{yellow}{$\displaystyle x^2+y^3$}
\colorbox{yellow}{\begin{equation*}x^2+y^3\end{equation*}}

只适用于行内公式or单行公式。用于行内公式时,只有公式部分加底色;用于单行公式时,整行被加底色。

  • 多行公式底色
    和minipage配合使用,给整个页面加底色
\definecolor{mygray}{rgb}{0.92,0.92,0.92} % 定义颜色

\colorbox{mygray}{
	\begin{minipage}{\textwidth}  %调节minipage的宽度占比
	%------------------------------------
		\begin{align}
		    ...
		\end{align}
	%------------------------------------
	\end{minipage}
}
  • 调整颜色
    设置 颜色!百分比,比如red!20,这是20%的红色加80%的白色混合出来的颜色,
    也可以用多种颜色来混合,比如:red!20!blue!30是20%的红色+30%的蓝色+50%的白色。
\colorbox{red!20!blue!30}{text}
\colorbox{mygray!20}{text}

公式

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值