mirror of
https://github.com/jaywcjlove/reference.git
synced 2025-06-16 20:21:22 +08:00
Compare commits
20 Commits
101c092148
...
474d847d19
Author | SHA1 | Date | |
---|---|---|---|
474d847d19 | |||
7f4fd32453 | |||
81d60eacaf | |||
453a8b9a05 | |||
f09e34ad49 | |||
8d92c6e073 | |||
65c4fed894 | |||
0ad226479c | |||
0aabf4f9e2 | |||
0a9251dad6 | |||
1164edcb8e | |||
1cebc5add8 | |||
4bfba5a92a | |||
9feb3f1e6d | |||
f482310851 | |||
de73319346 | |||
945e403df2 | |||
448025733c | |||
889d613a6a | |||
b836d77449 |
@ -23,4 +23,6 @@ yarn.lock
|
||||
# IDEA
|
||||
*.iml
|
||||
*.ipr
|
||||
*.iws
|
||||
*.iws
|
||||
|
||||
*.tex
|
4
.gitignore
vendored
4
.gitignore
vendored
@ -22,4 +22,6 @@ yarn.lock
|
||||
# IDEA
|
||||
*.iml
|
||||
*.ipr
|
||||
*.iws
|
||||
*.iws
|
||||
|
||||
\demo
|
@ -413,7 +413,7 @@ jobs:
|
||||
<a href="https://github.com/binscor" title="Zheng Nai Bin"><img src="https://avatars.githubusercontent.com/u/37325821?v=4" width="42;" alt="Zheng Nai Bin"/></a>
|
||||
<a href="https://github.com/qwxingzhe" title="行者"><img src="https://avatars.githubusercontent.com/u/7071651?v=4" width="42;" alt="行者"/></a>
|
||||
<a href="https://github.com/lisheng741" title="芦荟柚子茶"><img src="https://avatars.githubusercontent.com/u/53617305?v=4" width="42;" alt="芦荟柚子茶"/></a>
|
||||
<a href="https://github.com/rainbowatcher" title="看彩虹的人"><img src="https://avatars.githubusercontent.com/u/42316353?v=4" width="42;" alt="看彩虹的人"/></a>
|
||||
<a href="https://github.com/rainbowatcher" title="rainbowatcher"><img src="https://avatars.githubusercontent.com/u/42316353?v=4" width="42;" alt="rainbowatcher"/></a>
|
||||
<a href="https://github.com/HChenX" title="焕晨HChen"><img src="https://avatars.githubusercontent.com/u/123531821?v=4" width="42;" alt="焕晨HChen"/></a>
|
||||
<a href="https://github.com/LebranceBW" title="落叶乌龟"><img src="https://avatars.githubusercontent.com/u/19501514?v=4" width="42;" alt="落叶乌龟"/></a>
|
||||
<a href="https://github.com/LongYinStudio" title="敬培全"><img src="https://avatars.githubusercontent.com/u/42208852?v=4" width="42;" alt="敬培全"/></a>
|
||||
|
@ -376,7 +376,7 @@ Quick Reference
|
||||
<a href="https://github.com/binscor" title="Zheng Nai Bin"><img src="https://avatars.githubusercontent.com/u/37325821?v=4" width="42;" alt="Zheng Nai Bin"/></a>
|
||||
<a href="https://github.com/qwxingzhe" title="行者"><img src="https://avatars.githubusercontent.com/u/7071651?v=4" width="42;" alt="行者"/></a>
|
||||
<a href="https://github.com/lisheng741" title="芦荟柚子茶"><img src="https://avatars.githubusercontent.com/u/53617305?v=4" width="42;" alt="芦荟柚子茶"/></a>
|
||||
<a href="https://github.com/rainbowatcher" title="看彩虹的人"><img src="https://avatars.githubusercontent.com/u/42316353?v=4" width="42;" alt="看彩虹的人"/></a>
|
||||
<a href="https://github.com/rainbowatcher" title="rainbowatcher"><img src="https://avatars.githubusercontent.com/u/42316353?v=4" width="42;" alt="rainbowatcher"/></a>
|
||||
<a href="https://github.com/HChenX" title="焕晨HChen"><img src="https://avatars.githubusercontent.com/u/123531821?v=4" width="42;" alt="焕晨HChen"/></a>
|
||||
<a href="https://github.com/LebranceBW" title="落叶乌龟"><img src="https://avatars.githubusercontent.com/u/19501514?v=4" width="42;" alt="落叶乌龟"/></a>
|
||||
<a href="https://github.com/LongYinStudio" title="敬培全"><img src="https://avatars.githubusercontent.com/u/42208852?v=4" width="42;" alt="敬培全"/></a>
|
||||
@ -592,6 +592,7 @@ Quick Reference
|
||||
[afetera.top](https://note.afetera.top)<!--rehype:target=_blank-->
|
||||
[trtuaazz.com](https://reference.trtuaazz.com)<!--rehype:target=_blank-->
|
||||
[anhaoyang.com](http://dev-doc.anhaoyang.com/)<!--rehype:target=_blank-->
|
||||
[xxcxx.lat](https://xxcxx.lat/)<!--rehype:target=_blank-->
|
||||
<!--rehype:class=home-card home-links-->
|
||||
|
||||
如果你有资源,可以很方便[部署 web 版](https://github.com/jaywcjlove/reference/issues/102#issue-1451649637),这非常简单,只需要克隆 [gh-pages](https://github.com/jaywcjlove/reference/tree/gh-pages) 分支代码到你的静态服务就可以了,还可以使用 [docker](https://hub.docker.com/r/wcjiang/reference) 快捷部署 web 版。
|
||||
|
165
docs/latex.md
165
docs/latex.md
@ -72,7 +72,7 @@ Supported Functions
|
||||
``KaTeX:\\\`{a}`` <pur><code>\\`{a}</code></pur> | `KaTeX:\={a}` <pur>`\={a}`</pur> |
|
||||
`KaTeX:\"{a}` <pur>`\"{a}`</pur> | `KaTeX:\v{a}` <pur>`\v{a}`</pur> |
|
||||
`KaTeX:\^{a}` <pur>`\^{a}`</pur> | `KaTeX:\u{a}` <pur>`\u{a}`</pur> |
|
||||
`KaTeX:\r{a}` <pur>`\r{a}`</pur> |
|
||||
`KaTeX:\r{a}` <pur>`\r{a}`</pur>
|
||||
|
||||
### Delimiter Sizing
|
||||
|
||||
@ -156,6 +156,7 @@ Supported Functions
|
||||
`KaTex:\sout{abc}` | <pur>`\sout{abc}`</pur> | `KaTex:\boxed{\pi=\frac c d}` | <pur>`\boxed{\pi=\frac c d}`</pur>
|
||||
`KaTex:\$a_{\angl n}` _<red>MD语法冲突</red>_ | <pur>`$a_{\angl n}`</pur> | `KaTex:a_\angln` | <pur>`a_\angln`</pur>
|
||||
`KaTex:\phase{-78^\circ}` | <pur>`\phase{-78^\circ}`</pur>
|
||||
`KaTex:\overset{a}{B}` | <pur>`\overset{a}{B}`</pur> | `KaTex:\underset{a}{B}` | <pur>`\underset{a}{B}`</pur>
|
||||
|
||||
<pur>\tag{hi} x+y^{2x}</pur>
|
||||
|
||||
@ -202,6 +203,7 @@ Supported Functions
|
||||
| `KaTex:f'` | <pur>`f'`</pur> | `KaTex:\underline{abc}` | <pur>`\underline{abc}`</pur> | `KaTex:\overleftarrow{abc}` | <pur>`\overleftarrow{abc}`</pur> |
|
||||
| `KaTex:\sqrt{abc}` | <pur>`\sqrt{abc}`</pur> | `KaTex:\widehat{abc}` | <pur>`\widehat{abc}`</pur> | `KaTex:\overbrace{abc}` | <pur>`\overbrace{abc}`</pur> |
|
||||
| `KaTex:\sqrt[n]{abc}` | <pur>`\sqrt[n]{abc}`</pur> | `KaTex:\widetilde{abc}` | <pur>`\widetilde{abc}`</pur> | `KaTex:\underbrace{abc}` | <pur>`\underbrace{abc}`</pur> |
|
||||
|`KaTex:\frac{d^n y}{d x^n}`| <pur>`\frac{d^n y}{d x^n}`</pur> | `KaTex:\int_{b}^{a} \,dx` | <pur>`\int_{b}^{a} \,dx`</pur> | `KaTex:\lim_{x \to \infty}` | <pur>`\lim_{x \to \infty}`</pur> |
|
||||
|
||||
### 分隔符 Delimiters
|
||||
<!--rehype:wrap-class=col-span-3-->
|
||||
@ -891,6 +893,7 @@ x = \begin{cases}
|
||||
`KaTex:\LARGE AB` | <pur>`\LARGE AB`</pur> | `KaTex:\LARGE AB` | <pur>`\LARGE AB`</pur> | `KaTex:\footnotesize AB` | <pur>\footnotesize AB</pur>
|
||||
`KaTex:\Large AB` | <pur>`\Large AB`</pur> | `KaTex:\Large AB` | <pur>`\Large AB`</pur> | `KaTex:\scriptsize AB` | <pur>\scriptsize AB</pur>
|
||||
`KaTex:\large AB` | <pur>`\large AB`</pur> | `KaTex:\large AB` | <pur>`\large AB`</pur> | `KaTex:\tiny AB` | <pur>\tiny AB</pur>
|
||||
`KaTex:\mathcal{AB}` | <pur>`\mathcal{AB}`</pur> | `KaTex:\mathak{AB}` | <pur>`\mathak{AB}`</pur> | `KaTex:\mathbb{AB}` | <pur>`\mathbb{AB}`</pur> | `KaTex:\mathsf{AB}` | <pur>`\mathsf{AB}`</pur>
|
||||
|
||||
### Style 样式
|
||||
<!--rehype:wrap-class=col-span-3-->
|
||||
@ -900,7 +903,165 @@ x = \begin{cases}
|
||||
`KaTex:\displaystyle\sum_{i=1}^n` | <pur>\displaystyle\sum_{i=1}^n</pur> | `KaTex:\textstyle\sum_{i=1}^n` | <pur>\textstyle\sum_{i=1}^n</pur>
|
||||
`KaTex:\scriptstyle x` | <pur>\scriptstyle x</pur> | `KaTex:\scriptscriptstyle x` | <pur>\scriptscriptstyle x</pur>
|
||||
`KaTex:\lim\limits_x` | <pur>\lim\limits_x</pur> | `KaTex:\lim\nolimits_x` | <pur>\lim\nolimits_x</pur>
|
||||
`KaTex:\verb!x^2!` | <pur>\verb!x^2!</pur>
|
||||
`KaTex:\verb!x^2!` | <pur>\verb!x^2!</pur> | `KaTeX:\mathbf{a}` <pur>`\textbf{a}`</pur> |
|
||||
`KaTeX:\mathit{a}` <pur>`\textit{a}`</pur> | `KaTeX:\textup{a}` <pur>`\textup{a}`</pur> | `KaTeX:\textsl{a}` <pur>`\textsl{a}`</pur> | `KaTeX:\textsc{a}` <pur>`\textsc{a}`</pur> | `KaTeX:\underline{a}` <pur>`\underline{a}`</pur>
|
||||
|
||||
列表,图片,表格表示
|
||||
---
|
||||
|
||||
### 列表
|
||||
|
||||
```latex
|
||||
| - First item |
|
||||
| - Second item |
|
||||
\begin{enumerate}
|
||||
\item First item
|
||||
\item Second item
|
||||
\end{enumerate}
|
||||
|
||||
| 1. First item |
|
||||
| 2. Second item |
|
||||
\begin{itemize}
|
||||
\item First item
|
||||
\item Second item
|
||||
\end{itemize}
|
||||
|
||||
|First item |
|
||||
|Second item |
|
||||
\begin{description}
|
||||
\item First item
|
||||
\item Second item
|
||||
\end{description}
|
||||
```
|
||||
|
||||
### 图片
|
||||
|
||||
```latex
|
||||
% 展示单张图像
|
||||
\usepackage{graphicx}
|
||||
\begin{figure}[htbp]
|
||||
\centering
|
||||
\includegraphics[width=0.8\textwidth]{path/to/your/image.jpg}
|
||||
\caption{Caption for the single figure.}
|
||||
\label{fig:singlefig}
|
||||
\end{figure}
|
||||
|
||||
% 展示多张图像
|
||||
\usepackage{graphicx}
|
||||
\usepackage{subcaption}
|
||||
\begin{figure}[htbp]
|
||||
\centering
|
||||
\begin{subfigure}[b]{0.45\textwidth}
|
||||
\centering
|
||||
\includegraphics[width=\textwidth]{path/to/your/image1.jpg}
|
||||
\caption{First subfigure}
|
||||
\label{fig:sub1}
|
||||
\end{subfigure}
|
||||
\hfill % 在子图之间添加水平间距
|
||||
\begin{subfigure}[b]{0.45\textwidth}
|
||||
\centering
|
||||
\includegraphics[width=\textwidth]{path/to/your/image2.jpg}
|
||||
\caption{Second subfigure}
|
||||
\label{fig:sub2}
|
||||
\end{subfigure}
|
||||
\caption{Caption for the entire figure}
|
||||
\label{fig:mainfig}
|
||||
\end{figure}
|
||||
```
|
||||
|
||||
### 表格
|
||||
|
||||
```latex
|
||||
\begin{table}[hbpt] % 使用 longtable 包创建可以跨页的表格
|
||||
\centering % 居中表格
|
||||
\caption{Example Table}
|
||||
\label{tab:example}
|
||||
\begin{tabular}{|c|l|r|} % 对齐列:居中、居左、居右
|
||||
\hline % 插入一条水平线
|
||||
\textbf{Column 1} & \textbf{Column 2} & \textbf{Column 3} \\ \hline
|
||||
Data 1 & Data 2 & Data 3 \\ % 数据
|
||||
Data 4 & Data 5 & Data 6 \\ \hline
|
||||
\end{tabular}
|
||||
\end{table}
|
||||
```
|
||||
|
||||
LaTex排版
|
||||
----
|
||||
|
||||
### 调整页边距和页面类型
|
||||
|
||||
```latex
|
||||
\usepackage[left=3cm, right=3cm, top=2cm, bottom=2cm]{geometry} or \geometry{left=3cm, right=3cm, top=2cm, bottom=2cm}
|
||||
|
||||
\usepackage[a4paper]{geometry} % 另有a5paper, b5paper, letterpaper等格式
|
||||
```
|
||||
|
||||
### 页面分割和布局
|
||||
|
||||
```latex
|
||||
\quad | 添加空格
|
||||
\qquad | 双空格
|
||||
\vspace{} | 增加纵向间距
|
||||
\hspace{} | 增加横向间距
|
||||
\newpage | 开始新的一页
|
||||
\clearpage | 清除当前页,并处理所有未处理的浮动体
|
||||
\vfill | 在当前页面的剩余空间中插入垂直空白
|
||||
```
|
||||
|
||||
### 页面页眉和页脚
|
||||
|
||||
```latex
|
||||
\usepackage{fancyhdr}
|
||||
\pagestyle{fancy}
|
||||
|
||||
\fancyhf{} | 清除所有页眉和页脚字段
|
||||
\fancyhead[L]{Left header} | 左页眉
|
||||
\fancyhead[C]{Center header} | 中页眉
|
||||
\fancyhead[R]{Right header} | 右页眉
|
||||
\fancyfoot[L]{Left footer} | 左页脚
|
||||
\fancyfoot[C]{\thepage} | 页脚中央的页码
|
||||
\fancyfoot[R]{Right footer} | 右页脚
|
||||
```
|
||||
|
||||
其他
|
||||
----
|
||||
|
||||
### bib文献管理
|
||||
|
||||
```latex
|
||||
\cite{example} | 在文本中引用
|
||||
|
||||
\bibliographystyle{plain} | 设定引用格式
|
||||
\bibliography{references} | 假设.bib文件名为 'references.bib'
|
||||
```
|
||||
|
||||
### URL
|
||||
|
||||
```latex
|
||||
\usepackage{hyperref} | 加载 hyperref 包以增强 PDF 文档的交互性,如添加超链接和书签
|
||||
|
||||
\href{URL}{text} | 创建一个指向 URL 的超链接
|
||||
\url{URL} | 显示 URL 并作为链接
|
||||
```
|
||||
|
||||
### 颜色和盒子
|
||||
|
||||
```latex
|
||||
\usepackage{color} | 使用 color 包来给文本添加颜色
|
||||
|
||||
\color{color} | 设置文本颜色
|
||||
\fbox{content} | 在内容周围创建一个边框
|
||||
```
|
||||
|
||||
### 多栏布局
|
||||
|
||||
```latex
|
||||
\usepackage{multicol} | 使用 multicol 包创建多栏文本
|
||||
|
||||
\begin{multicols}{num} ... \end{multicols} | 开始一个多栏环境,其中 num 指定列数
|
||||
\onecolumn | 文档从当前位置开始变为单列格式
|
||||
\twocolumn | 文档从当前位置开始变为双列格式
|
||||
```
|
||||
|
||||
另见
|
||||
----
|
||||
|
Reference in New Issue
Block a user