Latex学习_郭郭专属

伪代码

伪代码过长自动换行不能缩进

\Statex \qquad \qquad \qquad

伪代码双栏

\usepackage{algorithm}
\usepackage{algorithmicx}
\usepackage{multicol}
\usepackage[UTF8]{ctex} %输出中文
\floatname{algorithm}{Algorithm} %算法
\begin{multicols}{2}
	\begin{algorithm}[H] 
		\caption{算法栏}
		\label{findme} 
		\begin{algorithmic}[1]
		\end{algorithmic}
	\end{algorithm}
\end{multicols}

latex公式怎么在word中呈现

  1. 编写latex公式
  2. alt+=
  3. 转为线性
    参考链接:latex公式如何在word中呈现

公式换行

公式编号

多行公式多编号

C ^ t = t a n h ( W C ⊙ [ h t − 1 , x t ] + b C ) i t = σ ( W i ⊙ [ h t − 1 , x t ] + b i ) f t = σ ( W f ⊙ [ h t − 1 , x t ] + b f ) C t = f t ∗ C t − 1 + i t ∗ C ^ t o t = σ ( W o ⊙ [ h t − 1 , x t ] + b o ) h t = o t ∗ t a n h ( C t ) % 多行公式多编号 \begin{align} \hat{C}_t &= tanh(W_C\odot[h_{t-1},x_t]+b_C) \\ i_t&=\sigma(W_i\odot[h_{t-1},x_t]+b_i) \\ f_t&=\sigma(W_f\odot[h_{t-1},x_t]+b_f) \\ C_t&=f_t * C_{t-1}+i_t * \hat{C}_t \\ o_t&=\sigma(W_o\odot[h_{t-1},x_t]+b_o) \\ h_t&=o_t * tanh(C_t) \end{align} C^titftCtotht=tanh(WC[ht1,xt]+bC)=σ(Wi[ht1,xt]+bi)=σ(Wf[ht1,xt]+bf)=ftCt1+itC^t=σ(Wo[ht1,xt]+bo)=ottanh(Ct)

多行公式单编号,编号居中

C ^ t = t a n h ( W C ⊙ [ h t − 1 , x t ] + b C ) i t = σ ( W i ⊙ [ h t − 1 , x t ] + b i ) f t = σ ( W f ⊙ [ h t − 1 , x t ] + b f ) C t = f t ∗ C t − 1 + i t ∗ C ^ t o t = σ ( W o ⊙ [ h t − 1 , x t ] + b o ) h t = o t ∗ t a n h ( C t ) % 多行公式单编号 \begin{equation} \begin{aligned} &\hat{C}_t = tanh(W_C\odot[h_{t-1},x_t]+b_C) \\ &i_t=\sigma(W_i\odot[h_{t-1},x_t]+b_i) \\ &f_t=\sigma(W_f\odot[h_{t-1},x_t]+b_f) \\ &C_t=f_t * C_{t-1}+i_t * \hat{C}_t \\ &o_t=\sigma(W_o\odot[h_{t-1},x_t]+b_o) \\ &h_t=o_t * tanh(C_t) \end{aligned} \end{equation} C^t=tanh(WC[ht1,xt]+bC)it=σ(Wi[ht1,xt]+bi)ft=σ(Wf[ht1,xt]+bf)Ct=ftCt1+itC^tot=σ(Wo[ht1,xt]+bo)ht=ottanh(Ct)

多行公式无编号

C ^ t = t a n h ( W C ⊙ [ h t − 1 , x t ] + b C ) i t = σ ( W i ⊙ [ h t − 1 , x t ] + b i ) f t = σ ( W f ⊙ [ h t − 1 , x t ] + b f ) C t = f t ∗ C t − 1 + i t ∗ C ^ t o t = σ ( W o ⊙ [ h t − 1 , x t ] + b o ) h t = o t ∗ t a n h ( C t ) % 多行公式无编号 \begin{align*} \hat{C}_t &= tanh(W_C\odot[h_{t-1},x_t]+b_C) \\ i_t&=\sigma(W_i\odot[h_{t-1},x_t]+b_i) \\ f_t&=\sigma(W_f\odot[h_{t-1},x_t]+b_f) \\ C_t&=f_t * C_{t-1}+i_t * \hat{C}_t \\ o_t&=\sigma(W_o\odot[h_{t-1},x_t]+b_o) \\ h_t&=o_t * tanh(C_t) \end{align*} C^titftCtotht=tanh(WC[ht1,xt]+bC)=σ(Wi[ht1,xt]+bi)=σ(Wf[ht1,xt]+bf)=ftCt1+itC^t=σ(Wo[ht1,xt]+bo)=ottanh(Ct)

多行公式多编号,有的行没有编号

C ^ t = t a n h ( W C ⊙ [ h t − 1 , x t ] + b C ) i t = σ ( W i ⊙ [ h t − 1 , x t ] + b i ) f t = σ ( W f ⊙ [ h t − 1 , x t ] + b f ) C t = f t ∗ C t − 1 + i t ∗ C ^ t o t = σ ( W o ⊙ [ h t − 1 , x t ] + b o ) h t = o t ∗ t a n h ( C t ) % 多行公式多编号,有的行没有编号 \begin{align} \hat{C}_t &= tanh(W_C\odot[h_{t-1},x_t]+b_C) \\ i_t&=\sigma(W_i\odot[h_{t-1},x_t]+b_i) \nonumber \\ f_t&=\sigma(W_f\odot[h_{t-1},x_t]+b_f) \\ C_t&=f_t * C_{t-1}+i_t * \hat{C}_t \\ o_t&=\sigma(W_o\odot[h_{t-1},x_t]+b_o) \\ h_t&=o_t * tanh(C_t) \end{align} C^titftCtotht=tanh(WC[ht1,xt]+bC)=σ(Wi[ht1,xt]+bi)=σ(Wf[ht1,xt]+bf)=ftCt1+itC^t=σ(Wo[ht1,xt]+bo)=ottanh(Ct)

一行公式分多行写

cos ⁡ 2 x = cos ⁡ 2 x − sin ⁡ 2 x = 2 cos ⁡ 2 x − 1 %split环境(用$对齐)(一个公式分为多行排版) \begin{equation} \begin{split} \cos 2x &= \cos^2 x - \sin^2 x\\ &= 2\cos^2 x - 1 \end{split} \end{equation} cos2x=cos2xsin2x=2cos2x1

case划分

D ( x ) = { 1 , i f   x ∈ Q 0 , i f   x ∈ R \begin{equation} D(x) = \begin{cases} 1, & if \ x \in Q \\ 0, & if \ x \in R \end{cases} \end{equation} D(x)={1,0,if xQif xR

大括号单编号

{ x = e q 1 y = e q 2 + 1 \begin{align} \left\{ %在equation环境下使用,用\left\{命令添加左大括号,用\right.以打点.结束 \begin{aligned} x&=eq1\\ y&=eq2+1 \end{aligned} \right. \end{align} {xy=eq1=eq2+1

大括号多编号

KaTeX parse error: Undefined control sequence: \usepackage at position 2: \̲u̲s̲e̲p̲a̲c̲k̲a̲g̲e̲{cases} % 大括号多编…
参考链接:enter link description here

latex导出

我目前使用overleasf导出pdf
然后把pdf放在inkscape中,导出svg文件
清晰度问题:
可以增加DPI=500,就很清晰了

latex数学公式

LaTex中把下标置于文本正下方的方法: max ⁡ x \max \limits_{x} xmax

\limits
∑ i = 0 N x i \sum\limits_{i=0}^N {x_i} i=0Nxi
参考链接

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

郭小儒

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值