| 1 |
\documentclass[aspectratio=169]{beamer} |
| 2 |
\usepackage{amsmath,unicode-math,physics,tensor,xeCJK,bookmark} |
| 3 |
\useoutertheme{metropolis} |
| 4 |
\useinnertheme{metropolis} |
| 5 |
\usecolortheme{metropolis} |
| 6 |
\usefonttheme{professionalfonts} |
| 7 |
|
| 8 |
\setbeamerfont{title}{size=\Large, series=\bfseries} |
| 9 |
\setbeamerfont{author}{size=\small} |
| 10 |
\setbeamerfont{date}{size=\small} |
| 11 |
\setbeamertemplate{footline}{\vspace*{0.3cm}} |
| 12 |
|
| 13 |
\makeatletter |
| 14 |
% https://tex.stackexchange.com/q/66519 |
| 15 |
\apptocmd{\beamer@@frametitle}{\only<1>{\bookmark[page=\the\c@page,level=3]{#1}}}{}{} |
| 16 |
|
| 17 |
\unimathsetup{math-style=ISO, bold-style=ISO, mathrm=sym} |
| 18 |
|
| 19 |
\setsansfont{FiraGO}[BoldFont=* SemiBold, Numbers=Monospaced] |
| 20 |
{ \setmathfont { FiraMath-##1.otf } [ version = ##1 ] } |
| 21 |
\cs_new:Npn \MultipleWeights #1 |
| 22 |
{ |
| 23 |
\seq_map_inline:Nn \c_@@_weight_seq |
| 24 |
{ \group_begin: \mathversion {##1} #1 \group_end: } |
| 25 |
} |
| 26 |
\ExplSyntaxOff |
| 27 |
\makeatother |
| 28 |
|
| 29 |
\def\ii{\symrm{i}} |
| 30 |
\def\pp{\symrm{\pi}} |
| 31 |
|
| 32 |
\title{Fira Math} |
| 33 |
\subtitle{Sans-serif font with Unicode math support} |
| 34 |
\author{Xiangdong Zeng} |
| 35 |
\date{2020/10/15\quad v0.3.4} |
| 36 |
|
| 37 |
\begin{document} |
| 38 |
|
| 39 |
\maketitle |
| 40 |
|
| 41 |
\begin{frame}{Basic examples (I)} |
| 42 |
\begin{itemize} |
| 43 |
\item Covariant derivative: |
| 44 |
\[ |
| 45 |
\nabla \symbf{X} = \tensor{X}{^\alpha_{;\beta}} \pdv{x^\alpha} \otimes \dd{x^\beta} |
| 46 |
= \qty(\tensor{X}{^\alpha_{,\beta}} + \Gamma^{\alpha}_{\beta\gamma} \, X^\gamma) \, |
| 47 |
\pdv{x^\alpha} \otimes \dd{x^\beta} |
| 48 |
\] |
| 49 |
\item Einstein's field equations: |
| 50 |
\[ G_{\mu\nu} \equiv R_{\mu\nu} - \frac{1}{2} R g_{\mu\nu} = \frac{8\pi G}{c^4} T_{\mu\nu} \] |
| 51 |
\item Schwarzschild metric: |
| 52 |
\[ |
| 53 |
c^2 \dd{\tau}^2 = \qty(1-\frac{r_{\mathrm{s}}}{r}) \, c^2 \dd{t}^2 |
| 54 |
- \qty(1-\frac{r_{\mathrm{s}}}{r})^{-1} \dd{r}^2 |
| 55 |
- r^2 \underbrace{\qty(\dd{\theta}^2 + \sin^2 \theta \dd{\varphi}^2)}_{\dd{\Omega}^2} |
| 56 |
\] |
| 57 |
\item Einstein--Hilbert action: |
| 58 |
\[ S = \frac{1}{2\kappa} \int R \sqrt{-g} \dd[4]{x} \] |
| 59 |
\end{itemize} |
| 60 |
\end{frame} |
| 61 |
|
| 62 |
\begin{frame}{Basic examples (II)} |
| 63 |
\begin{itemize} |
| 64 |
\item Case $n=1$ |
| 65 |
\small |
| 66 |
\[ |
| 67 |
\int_0^{\frac{\pp}{2}} |
| 68 |
\frac{\sqrt{\frac12 \sqrt{\frac{\ln^2\cos\theta}{\theta^2+\ln^2\cos\theta}} + \frac12}}% |
| 69 |
{\fourthroot{\theta^2 + \ln^2\cos\theta}} \dd{\theta} |
| 70 |
= \frac{\pp}{2\sqrt{\ln 2}} |
| 71 |
\] |
| 72 |
\item Generalization: |
| 73 |
\small\vspace{1ex} |
| 74 |
\[ |
| 75 |
\begin{cases} |
| 76 |
\smash[t]{\displaystyle |
| 77 |
R_n^- = \frac{2}{\pp} \int_0^{\pp/2} \qty(\theta^2+\ln^2\cos\theta)^{-2^{-n-1}} |
| 78 |
\sqrt{\frac12+\frac12\sqrt{\frac12+\cdots+\frac12\sqrt{ |
| 79 |
\frac{\ln^2\cos\theta}{\theta^2+\ln^2\cos\theta}}}} \dd{\theta} |
| 80 |
= (\ln 2)^{-2^{-n}}} \\[3ex] |
| 81 |
\smash[b]{\displaystyle |
| 82 |
R_n^+ = \frac{2}{\pp} \int_0^{\pp/2} \qty(\theta^2+\ln^2\cos\theta)^{2^{-n-1}} |
| 83 |
\sqrt{\frac12+\frac12\sqrt{\frac12+\cdots+\frac12\sqrt{ |
| 84 |
\frac{\ln^2\cos\theta}{\theta^2+\ln^2\cos\theta}}}} \dd{\theta} |
| 85 |
= (\ln 2)^{2^{-n}}} |
| 86 |
\end{cases} |
| 87 |
\] |
| 88 |
\end{itemize} |
| 89 |
\end{frame} |
| 90 |
|
| 91 |
\begin{frame}{Using with CJK fonts} |
| 92 |
\begin{itemize} |
| 93 |
\item {\fontzhhans 【留数定理】全纯函数 $f$ 在若尔当曲线 $\gamma$ 上的积分为:} |
| 94 |
\[ |
| 95 |
\oint_\gamma f(z) \dd{z} |
| 96 |
= 2\pp\ii \sum_{k=1}^n \Res_{z=a_k} f(z). |
| 97 |
\] |
| 98 |
\item {\fontzhhant 【留數定理】全純函數 $f$ 在若爾當曲線 $\gamma$ 上的積分為:} |
| 99 |
\[ |
| 100 |
\oint_\gamma f(z) \dd{z} |
| 101 |
= 2\pp\ii \sum_{k=1}^n \Res_{z=a_k} f(z). |
| 102 |
\] |
| 103 |
\item {\fontja 【留数定理】ジョルダン曲線 $\gamma$ に沿う正則関数 $f$ の積分は、} |
| 104 |
\[ |
| 105 |
\oint_\gamma f(z) \dd{z} |
| 106 |
= 2\pp\ii \sum_{k=1}^n \Res_{z=a_k} f(z). |
| 107 |
\] |
| 108 |
\end{itemize} |
| 109 |
\end{frame} |
| 110 |
|
| 111 |
\begin{frame}{Multiple weights (preview)} |
| 112 |
\centering |
| 113 |
\everymath{\displaystyle} |
| 114 |
\begin{tabular}{p{5cm}l} |
| 115 |
\mathversion{Thin} $ \pdv{\alpha} \sin\alpha = \cos \alpha $ & \mathversion{Medium} $ \int \sin x \dd{x} = -\cos x + C_1 $ \\[12pt] |
| 116 |
\mathversion{UltraLight} $ \pdv{\beta } \cos\beta = -\sin \beta $ & \mathversion{SemiBold} $ \int \cos y \dd{y} = \sin y + C_2 $ \\[12pt] |
| 117 |
\mathversion{ExtraLight} $ \pdv{\gamma} \tan\gamma = \sec^2\gamma $ & \mathversion{Bold} $ \int \tan z \dd{z} = -\ln|\cos z \, | + C_3 $ \\[12pt] |
| 118 |
\mathversion{Light} $ \pdv{\theta} \cot\theta = -\csc^2\theta $ & \mathversion{ExtraBold} $ \int \cot p \dd{p} = \ln|\sin p \, | + C_4 $ \\[12pt] |
| 119 |
\mathversion{Book} $ \pdv{\phi } \sec\phi = \tan\phi \sec\phi $ & \mathversion{Heavy} $ \int \sec q \dd{q} = \ln|\sec q + \tan q \, | + C_5 $ \\[12pt] |
| 120 |
\mathversion{Regular} $ \pdv{\zeta } \csc\zeta = -\cot\zeta\csc\zeta $ & \mathversion{Ultra} $ \int \csc r \dd{r} = -\ln|\csc r + \cot r \, | + C_6 $ |
| 121 |
\end{tabular} |
| 122 |
\end{frame} |
| 123 |
|
| 124 |
\end{document} |