Latex 部分语法

箭头

latex 显示效果
\uparrow
\downarrow
\Uparrow
\Downarrow
\updownarrow
\Updownarrow
\rightarrow
\leftarrow
\Rightarrow
\Leftarrow
\leftrightarrow
\Leftrightarrow
\longrightarrow
\longleftarrow
\Longrightarrow
\Longleftarrow
\longleftrightarrow
\Longleftrightarrow

上下标位置

行间公式

行间公式默认位置在上下位置。

$$J(\theta)=\sum_{i=0}^{m} (h_{\theta}(x_i)-y_i)^2$$

\[J(\theta)=\sum_{i=0}^{m} (h_{\theta}(x_i)-y_i)^2\]

若需要转换显示位置,可采用:

$$J(\theta)=\sum\nolimits_{i=0}^{m} (h_{\theta}(x_i)-y_i)^2$$

\[J(\theta)=\sum\nolimits_{i=0}^{m} (h_{\theta}(x_i)-y_i)^2\]

行内公式

行内公式默认在左上和右下位置。

$J(\theta)=\sum_{i=0}^{m} (h_{\theta}(x_i)-y_i)^2$

\(J(\theta)=\sum_{i=0}^{m} (h_{\theta}(x_i)-y_i)^2\)

若需要转换显示方式,可采用:

$J(\theta)=\sum\limits_{i=0}^{m} (h_{\theta}(x_i)-y_i)^2$

\(J(\theta)=\sum\limits_{i=0}^{m} (h_{\theta}(x_i)-y_i)^2\)

\mathop

对于数学符号,可以直接使用\limits \nolimits 命令。

但是非数学符号,需要先使用\mathop 转换为数学符号。

猜你喜欢

转载自www.cnblogs.com/letisl/p/12263032.html
今日推荐