mirror of
https://github.com/kaka111222333/kaka111222333.github.io.git
synced 2025-12-22 09:45:05 +08:00
48 lines
1.6 KiB
Markdown
48 lines
1.6 KiB
Markdown
---
|
||
layout: post
|
||
title: LaTex渲染的说明和测试
|
||
date: 2019-07-24
|
||
Author: 来自中世界
|
||
tags: [sample, document]
|
||
comments: true
|
||
---
|
||
LaTeX渲染已经在全站头部文件引入,可以直接使用,公式块上下使用`$$`标明,内联公式则用`$`.
|
||
|
||
最好不要让公式出现在文章摘要里。
|
||
|
||
Jekyll的默认文章摘要是第一段,但是我在使用中发现它选取摘要不是很稳定,因此加入了手动摘要分割线,默认为`<!-- more -->`,并且加入了首页摘要的字符数限制。
|
||
|
||
因此有特殊符号、内容的文章,建议将这些内容折叠在摘要以下。例如本文
|
||
|
||
<!-- more -->
|
||
|
||
Block math test
|
||
|
||
```
|
||
$$
|
||
\begin{align*}
|
||
y = y(x,t) &= A e^{i\theta} \\
|
||
&= A (\cos \theta + i \sin \theta) \\
|
||
&= A (\cos(kx - \omega t) + i \sin(kx - \omega t)) \\
|
||
&= A\cos(kx - \omega t) + i A\sin(kx - \omega t) \\
|
||
&= A\cos \Big(\frac{2\pi}{\lambda}x - \frac{2\pi v}{\lambda} t \Big) + i A\sin \Big(\frac{2\pi}{\lambda}x - \frac{2\pi v}{\lambda} t \Big) \\
|
||
&= A\cos \frac{2\pi}{\lambda} (x - v t) + i A\sin \frac{2\pi}{\lambda} (x - v t)
|
||
\end{align*}
|
||
$$
|
||
|
||
```
|
||
|
||
$$
|
||
\begin{align*}
|
||
y = y(x,t) &= A e^{i\theta} \\
|
||
&= A (\cos \theta + i \sin \theta) \\
|
||
&= A (\cos(kx - \omega t) + i \sin(kx - \omega t)) \\
|
||
&= A\cos(kx - \omega t) + i A\sin(kx - \omega t) \\
|
||
&= A\cos \Big(\frac{2\pi}{\lambda}x - \frac{2\pi v}{\lambda} t \Big) + i A\sin \Big(\frac{2\pi}{\lambda}x - \frac{2\pi v}{\lambda} t \Big) \\
|
||
&= A\cos \frac{2\pi}{\lambda} (x - v t) + i A\sin \frac{2\pi}{\lambda} (x - v t)
|
||
\end{align*}
|
||
$$
|
||
|
||
Inline math test `$\lim_{x \to \infty} \exp(-x) = 0$`, $\lim_{x \to \infty} \exp(-x) = 0$
|
||
|