Latex总结
1. 定义作者,通讯作者,地址,宏包
1.1. Example 1
https://blog.csdn.net/robert_chen1988/article/details/79187224
宏包使用:authblk
\documentclass[11pt,a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{authblk}
\title{More than one Author with different Affiliations}
\author[a]{Author A}
\author[a]{Author B}
\author[a]{Author C \thanks{Corresponding author: email@mail.com}}
\author[b]{Author D}
\author[b]{Author E}
\affil[a]{Department of Computer Science, \LaTeX\ University}
\affil[b]{Department of Mechanical Engineering, \LaTeX\ University}
% 使用 \thanks 定义通讯作者
\renewcommand*{\Affilfont}{\small\it} % 修改机构名称的字体与大小
\renewcommand\Authands{ and } % 去掉 and 前的逗号
\date{} % 去掉日期
\begin{document}
\maketitle
\end{document}
————————————————
版权声明:本文为CSDN博主「心态与做事习惯决定人生高度」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/robert_chen1988/article/details/79187224
效果显示:
1.2. Example 2
\documentclass{article}
\usepackage{hyperref}
\newcommand{\footremember}[2]{%
\footnote{#2}
\newcounter{#1}
\setcounter{#1}{\value{footnote}}%
}
\newcommand{\footrecall}[1]{%
\footnotemark[\value{#1}]%
}
\title{How to bowl properly}
\author{%
The Dude\footremember{alley}{Holly Star Lanes Bowling Alley}%
\and Walter Sobchak\footremember{trailer}{Probably in a trailer park}%
\and Jesus Quintana\footrecall{alley} \footnote{Mexico?}%
\and Uli Kunkel\footrecall{trailer} \footnote{Germany?}%
}
\date{}
\begin{document}
\maketitle
The whole example is taken from \href{http://anthony.liekens.net/index.php/LaTeX/MultipleFootnoteReferences}{Anthony Liekens}\ldots
\end{document}
效果显示:
1.3 特殊符号——作者标注
符号 | LaTex | 符号 | LaTex |
---|---|---|---|
∗ \ast ∗ | \ast | ⋆ \star ⋆ | \star |
† \dagger † | \dagger | ‡ \ddagger ‡ | \ddagger |
2. 数学模式下使用正体
知乎:LaTeX系列笔记(3)-数学运算符 Math Operator
https://zhuanlan.zhihu.com/p/137969798
- 直接调用罗马体
\mathrm{d}
直接使用罗马体的问题是不能加上标、前后间距不好调。
- 用mathop套mathrm,使它成为一个数学运算符(Math Operator)
\mathop{\mathrm{d}}
可以在导言区定义一个命令
\newcommand*{\dif}{\mathop{}\!\mathrm{d}}
- 利用amsmath包的\operatorname实现(调用amsopn)
\usepackage{amsmath}
$\operatorname{arccot}$ % 不能把上下标放在符号的正上方或正下方
$\operatorname*{max}$ % 可以把上下标放在符号的正上方或正下方
\operatorname
的具体实现比第 2 个办法略微复杂一些,可以处理一些特殊的情况(主要是处理函数名里面有特殊字符),还可以控制上下标能否放在正上方或正下方。大多数情况和上一个方法是是完全等效的。
- 使用\operatorname打包成的\DeclareMathOperator**(推荐)**
\usepackage{amsmath}
\DeclareMathOperator{\arccot}{arccot} % 不能把上下标放在符号的正上方或正下方
\DeclareMathOperator*{\Max}{max} % 可以把上下标放在符号的正上方或正下方
可以调用
\arccot^2 % 不能用\arccot\limits^2
\Max_u, \Max\limits_u % 都可以使用
如果经常使用\Max\limits_u
,一个方便的方法是
\usepackage{amsmath}
\DeclareMathOperator*{\MaxTemp}{max}
\newcommand*{\Max}[1]{\MaxTemp\limits_{#1}}
\begin{document}
\Max{u} % 也就是\Max\limits_u
\end{document}
也可以用第二个或第三个方法
\newcommand*{\Max}[1]{\mathop{\mathrm{max}}\limits_{#1}}
或者是
\newcommand*{\Max}[1]{\operatorname*{max}\limits_{#1}}
\begin{document}
\Max{u}
\end{documnet}
- 想更换\Re \Im的符号为Re和Im
\renewcommand{\Re}{\operatorname{Re}}
\renewcommand{\Im}{\operatorname{Im}}
3. 常用符号及字母
List of LaTeX mathematical symbols - OeisWiki
PDF文件The Comprehensive LaTeX Symbol List (ctan.org)
3.1. 符号
3.1.1. 关系符号
名称 | 符号 | LaTex | 名称 | 符号 | LaTex |
---|---|---|---|---|---|
约等于 is approximately | ≈ \approx ≈ | \approx | 近似于 is similar to | ∼ \sim ∼ | \sim |
正比于 is proportional to | ∝ \propto ∝ | \propto | 不等于 is not equal to | ≠ \ne = | \ne |
真子集 is a proper subset of | ⊂ \subset ⊂ | \subset | 子集 is a subset of | ⊆ \subseteq ⊆ | \subseteq |
is a proper superset of | ⊃ \supset ⊃ | \supset | is a superset of | ⊇ \supseteq ⊇ | \supseteq |
非子集 is not a proper subset of | ⊄ \not\subset ⊂ | \not\subset | 差集 set difference | ∖ \setminus ∖ | \setminus |
交集 intersect | ∩ \cap ∩ | \cap | 并集 union | ∪ \cup ∪ | \cup |
平行 is parallel with | ∥ \parallel ∥ | \parallel | 元素 is member of | ∈ \in ∈ | \in |
3.1.2. 运算符号
名称 | 符号 | LaTex | 名称 | 符号 | LaTex |
---|---|---|---|---|---|
加减与减加 plus or minus \ minus or plus | ± \pm ± ∓ \mp ∓ | \pm \mp | 乘法 | × \times × | \times |
点乘 dot product | ⋅ \cdot ⋅ | \cdot | 张量乘积 tensor product | ⊗ \otimes ⊗ | \otimes |
除法 | ÷ \div ÷ | \div | 张量乘积 tensor product | ⊗ \otimes ⊗ | \otimes |
度数 degree | θ ∘ \theta^{\circ} θ∘ | \theta^{\circ} |
3.1.3. 箭头
符号 | LaTex | 符号 | LaTex |
---|---|---|---|
→ \to → | \to | → \rightarrow → | \rightarrow |
⇒ \Rightarrow ⇒ | \Rightarrow | ⟹ \Longrightarrow ⟹ | \Longrightarrow |
↔ \leftrightarrow ↔ | \leftrightarrow | ⇔ \Leftrightarrow ⇔ | \Leftrightarrow |
⟺ \iff ⟺ | \iff |
3.1.4. 特殊符号——作者标注
符号 | LaTex | 符号 | LaTex |
---|---|---|---|
∗ \ast ∗ | \ast | ⋆ \star ⋆ | \star |
† \dagger † | \dagger | ‡ \ddagger ‡ | \ddagger |
3.2. 常用字母
符号 | LaTex | 符号 | LaTex |
---|---|---|---|
φ \varphi φ | \varphi | ϕ \phi ϕ | \phi |
σ \sigma σ | \sigma | τ \tau τ | \tau |
ξ \xi ξ | \xi | ϵ \epsilon ϵ | \epsilon |
ρ \rho ρ | \rho | η \eta η | \eta |
α \alpha α | \alpha | β \beta β | \beta |
γ \gamma γ | \gamma | θ \theta θ | \theta |
3.3. 字母或数字上下增加内容
3.3.1. 字母或者数字上方符号
符号 | LaTex | 符号 | LaTex | 符号 | LaTex |
---|---|---|---|---|---|
a ^ \hat{a} a^ | \hat{a} | a ^ \widehat{a} a | \widehat{a} | a ˇ \check{a} aˇ | \check{a} |
a ~ \tilde{a} a~ | \tilde{a} | a ~ \widetilde{a} a | \widetilde{a} | ||
a ˙ \dot{a} a˙ | \dot{a} | a ¨ \ddot{a} a¨ | \ddot{a} | ||
a ˉ \bar{a} aˉ | \bar{a} | a ‾ \overline{a} a | \overline{a} | a ⃗ \vec{a} a | \vec{a} |
a ˊ \acute{a} aˊ | \acute{a} | a ˋ \grave{a} aˋ | \grave{a} | a ˘ \breve{a} a˘ | \breve{a} |
3.3.2. 字母或者数字上下增加内容
使用\substack{},在字母
σ
\sigma
σ下方加点,\\ 后方为字母下方的符号
3.4. 求和、积分、极限、
3.4.1. 求和
符号 | LaTex | 符号 | LaTex |
---|---|---|---|
∑ i = 1 N \sum_{i=1}^{N} ∑i=1N | \sum_{i=1}^{N} | ∑ i = 1 N \sum\limits_{i=1}^{N} i=1∑N | \sum\limits_{i=1}^{N} |
3.4.2. 积分
符号 | LaTex | 符号 | LaTex |
---|---|---|---|
∫ \int ∫ | \int | ∫ 1 2 x d x \int_1^{2}x\mathrm{d}x ∫12xdx | \int_1^{2} x dx |
∫ 1 10 \int_{1}^{10} ∫110 | \int_{1}^{10} | ∫ 1 10 \int\limits_{1}^{10} 1∫10 | \int\limits_{1}^{10} |
定积分
∣
∣
a
0
a
\left.\vphantom{\Big|}\right|_{a_0}^{a}
∣∣∣∣∣∣a0a: \left.\vaphantom{\Big|}\right|_{a_0}^{a}
示例
∫ a 0 a x d x = 1 2 x 2 ∣ ∣ a 0 a = 1 2 ( a 2 − a 0 2 ) \int \limits_{a_0}^{a}x \mathrm{d}x=\dfrac{1}{2}x^2 \left.\vphantom{\Big|}\right|_{a_0}^{a}=\dfrac{1}{2}(a^2-{a_0}^2) a0∫axdx=21x2∣∣∣∣∣∣a0a=21(a2−a02)
\int \limits_{a_0}^{a}x \mathrm{d}x
=\dfrac{1}{2}x^2 \left.\vphantom{\Big|}\right|_{a_0}^{a}
=\dfrac{1}{2}(a^2-{a_0}^2)
∫ a 0 a x d x = 1 2 x 2 ∣ ∣ a 0 a = 1 2 ( a 2 − a 0 2 ) \begin{aligned} \int \limits_{a_0}^{a} x \mathrm{d}x &= \dfrac{1}{2} x^2 \left.\vphantom{\Big|}\right|_{a_0}^{a}\\ &= \dfrac{1}{2}(a^2 - a_0^2) \end{aligned} a0∫axdx=21x2∣∣∣∣∣∣a0a=21(a2−a02)
\begin{aligned}
\int \limits_{a_0}^{a} x \mathrm{d}x
&= \dfrac{1}{2} x^2 \left.\vphantom{\Big|}\right|_{a_0}^{a}\\
&= \dfrac{1}{2}(a^2 - a_0^2)
\end{aligned}
3.4.3. 极限
符号 | LaTex | 符号 | LaTex |
---|---|---|---|
lim n → ∞ \lim_{n\to\infin} limn→∞ | \lim_{n\to\infin} | lim n → ∞ \lim\limits_{n\to\infin} n→∞lim | \lim\limits_{n\to\infin} |
上、下极限
符号 | LaTex | 符号 | LaTex |
---|---|---|---|
KaTeX parse error: Undefined control sequence: \varlimsup at position 1: \̲v̲a̲r̲l̲i̲m̲s̲u̲p̲_{n\to\infin} | \varlimsup_{n\to\infin} | KaTeX parse error: Undefined control sequence: \varliminf at position 1: \̲v̲a̲r̲l̲i̲m̲i̲n̲f̲_{n\to\infin} | \varliminf_{n\to\infin} |
3.5. 向上、向下取整
3.5.1. 向上取整
⌈
a
⌉
\lceil a \rceil
⌈a⌉: \lceil a \rceil
⌈ 3.14 ⌉ = 4 \lceil 3.14 \rceil = 4 ⌈3.14⌉=4
3.5.2. 向下取整
⌊
a
⌋
\lfloor a \rfloor
⌊a⌋: \lfloor a \rfloor
⌊ 3.14 ⌋ = 3 \lfloor 3.14 \rfloor = 3 ⌊3.14⌋=3
4. 公式
4.1. 更改公式Cases中每行之间的间距
在首行\\后,增加需要添加的行距大小,如下 [8pt]
\begin{equation}
\begin{cases}
& \Big( \dfrac{\partial}{\partial t} + (u_t + c) \dfrac{\partial}{\partial x} J_{+} \Big) = 0\\[8pt]
& \Big( \dfrac{\partial}{\partial t} + (u_t - c) \dfrac{\partial}{\partial x} J_{-} \Big) = 0
\end{cases}
\end{equation}
若\\后无[8pt],则效果为
更新日期:2022年6月17日
更新日期:2022年6月17日
作者: HG
码字不易,转发请添加引用,谢谢!