快速自定义 LaTeX 排版字体

字体设置

在导言区引入fontspec包:\usepackage{fontspec}

使用如下命令自定义字体:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
% 西文默认字体,排版主字体
\setmainfont{}

% 西文无称线字体
\setsansfont{}

% 西文等宽字体
\setmonofont{}

% 数学公式字体
\setmathfont{}

% 中文主字体
\setCJKmainfont[
    Path = fonts/zh_cn/ ,
    BoldFont = HYQiHei-70S.ttf ,
    ItalicFont = HYKaiTiS.ttf ,
    SmallCapsFont = HYQiHei-70S.ttf
    ]{HYQiHei-45S.ttf}

Note:

Linux 使用指北

本文主要引用 Liam Huang 的博客。

系统相关

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
lsb_release -a              # 查看操作系统版本
head -n 1 /etc/issue        # 查看操作系统版本
cat /proc/version           # 查看操作系统内核信息
uname -a                    # 查看操作系统内核信息、CPU 信息
cat /proc/cpuinfo           # 查看 CPU 信息
hostname                    # 查看计算机名字
env                         # 列出环境变量
lsmod                       # 列出加载的内核模块
uptime                      # 查看系统运行时间、负载、用户数量
cat /proc/loadavg           # 查看系统负载

《报任安书》

太史公牛马走司马迁,再拜言。

  少卿足下:曩者辱赐书,教以慎于接物,推贤进士为务,意气勤勤恳恳。若望仆不相师,而用流俗人之言,仆非敢如此也。仆虽罢驽,亦尝侧闻长者之遗风矣。顾自以为身残处秽,动而见尤,欲益反损,是以独郁悒而无谁语。谚曰:“谁为为之?孰令听之?”盖钟子期死,伯牙终身不复鼓琴。何则?士为知己者用,女为说己者容。若仆大质已亏缺矣,虽材怀随和,行若由夷,终不可以为荣,适足以发笑而自点耳。

SICP Learning Notes

当我们考察一门语言时,主要看三点

  1. primitives:元操作是什么
  2. means of combinations:如何组合
  3. means of abstraction:如何抽象,构造更复杂的程序

数据和过程之间没有本质的区别

Polybar 的配置笔记

前略。

今年早些时候,从 Gnome 换到 i3,原因是因为原来的 gnome 被我弄崩溃了。一时难以解决,又想到之前好几次隐约感觉到 gnome 的不稳定,一气之下决定换一个轻量,稳定的,可定制的窗口管理工具。至于为什么换 i3?去知乎吸收一下各个管理器间的哲学就知道了。以前从 Windows 转 Linux,也是这么过来的,知乎真是个好地方!

Matrix Factorization

Preliminaries

Def: A matrix $A \in M_n$ is normal if $AA^∗ = A^∗A$, that is, if $A$ commutes with its conjugate transpose.

Def: A complex matrix $A$ is unitary if $AA^∗ = I$ or $A^∗A = I$, and a real matrix $B$ is orthogonal if $BB^T = I$ or $B^TB = I$.

Image adapted from Meyer’s book

There is no so-called “orthonormal” matrix. There is just an orthogonal matrix whose rows or columns are orthonormal vectors.

Exponential Distribution

Story

The Exponential distribution is the continuous counterpart to the Geometric distribution. The story of the Exponential distribution is analogous, but we are now waiting for a success in continuous time, where successes arrive at a rate of $\lambda$ successes per unit of time. The average number of successes in a time interval of length $t$ is $\lambda t$, though the actual number of successes varies randomly. An Exponential random variable represents the waiting time until the first arrival of a success.

常用结论的证明记录

高斯分布的微分熵

$X \sim \mathcal{N}(\mu, \sigma^2)~$,$\displaystyle f(x)=\frac{1}{\sqrt{2\pi\sigma^2}}e^{-\frac{(x-\mu)^2}{2\sigma^2}}$,其微分熵推导过程如下: