From 2c9f3bd21e9290539f09ca73901a6a128a3a6368 Mon Sep 17 00:00:00 2001 From: 45gfg9 Date: Mon, 18 Sep 2023 23:41:46 +0800 Subject: [PATCH] docs: change frame style & update ci (#31) * docs: change frame style * ci: update Actions file * ci: try to fix Actions * ci: change `mv` to `cp` --- .editorconfig | 5 +++- .github/workflows/tex.yml | 28 +++++++++++++---- ...1\351\230\265\347\232\204\347\247\251.tex" | 6 ++-- ...0\345\255\220\347\251\272\351\227\264.tex" | 2 +- ...\345\255\220\357\274\210I\357\274\211.tex" | 2 +- ...7\346\200\247\347\251\272\351\227\264.tex" | 6 ++-- ...5\345\255\246\350\256\262\344\271\211.tex" | 30 +++++++++++++++---- 7 files changed, 58 insertions(+), 21 deletions(-) diff --git a/.editorconfig b/.editorconfig index b4cbf37..e422a10 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,7 +1,6 @@ root = true [*.tex, *.md] - charset = utf-8 end_of_line = lf @@ -10,3 +9,7 @@ trim_trailing_whitespace = true indent_style = space indent_size = 4 + +[*.{yml,yaml}] +indent_size = 2 +tab_width = 2 diff --git a/.github/workflows/tex.yml b/.github/workflows/tex.yml index 5c08bca..aad25ae 100644 --- a/.github/workflows/tex.yml +++ b/.github/workflows/tex.yml @@ -1,14 +1,15 @@ name: LaTeX Document on: + workflow_dispatch: push: paths-ignore: - "**.md" - - "**.yml" + - "latexindent.yaml" pull_request: paths-ignore: - "**.md" - - "**.yml" + - "latexindent.yaml" jobs: build: @@ -19,16 +20,31 @@ jobs: - name: Checkout uses: actions/checkout@v3 - - name: Compile LaTeX + - name: Build - 讲义 uses: xu-cheng/latex-action@v2 with: args: -xelatex -interaction=nonstopmode -file-line-error -output-directory=build working_directory: 讲义 root_file: 线性代数荣誉课辅学讲义.tex + - name: Build - 习题参考答案 + uses: xu-cheng/latex-action@v2 + with: + args: -xelatex -interaction=nonstopmode -file-line-error -output-directory=build + working_directory: 习题参考答案 + root_file: 线性代数荣誉课辅学习题答案.tex + + - name: Post Build + id: post-build + working-directory: ${{ github.workspace }} + run: | + echo "sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT + mkdir -p ${{ github.workspace }}/build + cp ${{ github.workspace }}/*/build/*.pdf ${{ github.workspace }}/build/ + - name: Upload artifacts uses: actions/upload-artifact@v3 with: - name: 线性代数荣誉课辅学讲义-${{ github.run_number }}.pdf - path: | - ${{ github.workspace }}/讲义/build/线性代数荣誉课辅学讲义.pdf + name: LALU-build-${{ github.run_number }}-${{ steps.post-build.outputs.sha }} + if-no-files-found: error + path: ${{ github.workspace }}/build/*.pdf diff --git "a/\350\256\262\344\271\211/\344\270\223\351\242\230/11 \347\237\251\351\230\265\347\232\204\347\247\251.tex" "b/\350\256\262\344\271\211/\344\270\223\351\242\230/11 \347\237\251\351\230\265\347\232\204\347\247\251.tex" index c5df820..d5fe2bd 100644 --- "a/\350\256\262\344\271\211/\344\270\223\351\242\230/11 \347\237\251\351\230\265\347\232\204\347\247\251.tex" +++ "b/\350\256\262\344\271\211/\344\270\223\351\242\230/11 \347\237\251\351\230\265\347\232\204\347\247\251.tex" @@ -429,7 +429,7 @@ \section{相抵标准形} \begin{proof} 相信读者以及在学习数学分析或微积分等课程时以及了解了如何推导等价条件,即只需要找到一条逻辑循环链路即可. - \begin{itemize}[leftmargin=.8in] % FIXME + \begin{itemize} \item[\ref*{item:11:可逆等价条件:1}$\implies$\ref*{item:11:可逆等价条件:2}] $A$可逆我们有$A$对应的线性映射为可逆映射(既单又满),由\autoref{thm:11:单满射与行列秩} 可知$A$的行列秩都为$n$,即$r(A)=n$; \item[\ref*{item:11:可逆等价条件:2}$\implies$\ref*{item:11:可逆等价条件:3}] $r(A)=n$,则$A$的行列秩都为$n$,即$A$的$n$个行(列)向量线性无关; @@ -642,8 +642,8 @@ \section{秩不等式} \item $f(x)=f_1(x)f_2(x)$是多项式,且$f_1(x)$与$f_2(x)$互素,则$f(A)=O$的充要条件是$r(f_1(A))+r(f_2(A))=n$. (注:此题的推论非常多,如$A^2=A$,$A^n=E$等形式的结论都可以利用这个例子推导出) \item 设$A,B$分别为$3 \times 2$和$2 \times 3$实矩阵. 若$AB=\begin{pmatrix} - 8 & 0 & -4 \\[0.8ex] - -\dfrac{3}{2} & 9 & -6 \\[0.8ex] + 8 & 0 & -4 \\[1ex] + -\dfrac{3}{2} & 9 & -6 \\[1ex] -2 & 0 & 1 \end{pmatrix}$,求$BA$. diff --git "a/\350\256\262\344\271\211/\344\270\223\351\242\230/18 \344\270\215\345\217\230\345\255\220\347\251\272\351\227\264.tex" "b/\350\256\262\344\271\211/\344\270\223\351\242\230/18 \344\270\215\345\217\230\345\255\220\347\251\272\351\227\264.tex" index 444495c..07ae48f 100644 --- "a/\350\256\262\344\271\211/\344\270\223\351\242\230/18 \344\270\215\345\217\230\345\255\220\347\251\272\351\227\264.tex" +++ "b/\350\256\262\344\271\211/\344\270\223\351\242\230/18 \344\270\215\345\217\230\345\255\220\347\251\272\351\227\264.tex" @@ -188,7 +188,7 @@ \subsection{特征值与特征向量的定义与求解} \end{theorem} \begin{proof} - \begin{itemize}[leftmargin=.8in] % FIXME + \begin{itemize} \item[\ref*{item:18:特征值定义:1}$\implies$\ref*{item:18:特征值定义:2}] $\lambda\in\mathbf{F}$是$\sigma$的特征值,说明$\exists v\in V$且$v\neq 0$使得$\sigma(v)=\lambda v$. 因此$(\sigma-\lambda I)(v)=0$,即$\sigma-\lambda I$核空间不只有零元,根据单射等价条件\autoref{thm:5:单射与核空间},不单成立; \item[\ref*{item:18:特征值定义:2}$\implies$\ref*{item:18:特征值定义:3}] 根据\autoref{thm:6:双射等价条件} 可知,$\sigma-\lambda I$不满当且仅当$\sigma-\lambda I$不单; diff --git "a/\350\256\262\344\271\211/\344\270\223\351\242\230/24 \345\206\205\347\247\257\347\251\272\351\227\264\344\270\212\347\232\204\347\256\227\345\255\220\357\274\210I\357\274\211.tex" "b/\350\256\262\344\271\211/\344\270\223\351\242\230/24 \345\206\205\347\247\257\347\251\272\351\227\264\344\270\212\347\232\204\347\256\227\345\255\220\357\274\210I\357\274\211.tex" index 40903e4..669bbca 100644 --- "a/\350\256\262\344\271\211/\344\270\223\351\242\230/24 \345\206\205\347\247\257\347\251\272\351\227\264\344\270\212\347\232\204\347\256\227\345\255\220\357\274\210I\357\274\211.tex" +++ "b/\350\256\262\344\271\211/\344\270\223\351\242\230/24 \345\206\205\347\247\257\347\251\272\351\227\264\344\270\212\347\232\204\347\256\227\345\255\220\357\274\210I\357\274\211.tex" @@ -316,7 +316,7 @@ \subsection{实谱定理} \begin{proof} 我们将采取 $\implies$ 1 $\implies$ 2 $\implies$ 3 进行证明. - \begin{itemize}[leftmargin=.8in] % FIXME + \begin{itemize} \item[\ref*{item:24:实谱定理:3}$\implies$\ref*{item:24:实谱定理:1}] $ T $ 关于 $ V $ 的某个标准正交基具有对角矩阵,实内积空间上对角矩阵等于其共轭转置,故 $ T^* = T $,$ T $ 是自伴的. \item[\ref*{item:24:实谱定理:1}$\implies$\ref*{item:24:实谱定理:2}] 采用数学归纳法. diff --git "a/\350\256\262\344\271\211/\344\270\223\351\242\230/3 \346\234\211\351\231\220\347\273\264\347\272\277\346\200\247\347\251\272\351\227\264.tex" "b/\350\256\262\344\271\211/\344\270\223\351\242\230/3 \346\234\211\351\231\220\347\273\264\347\272\277\346\200\247\347\251\272\351\227\264.tex" index ea4a4c1..f94aaba 100644 --- "a/\350\256\262\344\271\211/\344\270\223\351\242\230/3 \346\234\211\351\231\220\347\273\264\347\272\277\346\200\247\347\251\272\351\227\264.tex" +++ "b/\350\256\262\344\271\211/\344\270\223\351\242\230/3 \346\234\211\351\231\220\347\273\264\347\272\277\346\200\247\347\251\272\351\227\264.tex" @@ -80,9 +80,9 @@ \subsection{线性相关性的定义} \[\lambda_1 + \lambda_2·2^{-x} + \lambda_3·2^x = 0\] 很明显会发现仅凭此方程是难以求解的,方程数目不足. 注意到此方程应该对于任意的 $x$ 均成立,所以取 $x = 0, x = 1, x = -1$,得到方程组 \[ \begin{cases} - \lambda_1 + \lambda_2 + \lambda_3 = 0 \\ - \lambda_1 + \frac{1}{2}\lambda_2 + 2\lambda_3 = 0 \\ - \lambda_1 + 2\lambda_2 + \frac{1}{2}\lambda_3 = 0 + \lambda_1 + \lambda_2 + \lambda_3 = 0 \\[1ex] + \lambda_1 + \dfrac{1}{2}\lambda_2 + 2\lambda_3 = 0 \\[1ex] + \lambda_1 + 2\lambda_2 + \dfrac{1}{2}\lambda_3 = 0 \end{cases} \] 解得 $\lambda_1 = \lambda_2 = \lambda_3 = 0$,此向量组线性无关. \end{enumerate} diff --git "a/\350\256\262\344\271\211/\347\272\277\346\200\247\344\273\243\346\225\260\350\215\243\350\252\211\350\257\276\350\276\205\345\255\246\350\256\262\344\271\211.tex" "b/\350\256\262\344\271\211/\347\272\277\346\200\247\344\273\243\346\225\260\350\215\243\350\252\211\350\257\276\350\276\205\345\255\246\350\256\262\344\271\211.tex" index 14854b0..88f6579 100644 --- "a/\350\256\262\344\271\211/\347\272\277\346\200\247\344\273\243\346\225\260\350\215\243\350\252\211\350\257\276\350\276\205\345\255\246\350\256\262\344\271\211.tex" +++ "b/\350\256\262\344\271\211/\347\272\277\346\200\247\344\273\243\346\225\260\350\215\243\350\252\211\350\257\276\350\276\205\345\255\246\350\256\262\344\271\211.tex" @@ -26,7 +26,7 @@ \usepackage{xcolor} \usepackage{multicol} \usepackage{float} -\usepackage[framemethod=TikZ]{mdframed} % 若编译缓慢,可去掉 [framemethod=TikZ] +\usepackage{mdframed} \usepackage{tikz} \usepackage{pgfplots} @@ -77,17 +77,27 @@ pdftitle={线性代数荣誉课辅学讲义}, } -\newenvironment{proof}{{\noindent\bfseries\heiti 证明}\quad\fangsong}{\hspace*{\fill}$\square$\par} -\newenvironment{solution}{{\noindent\bfseries\heiti 解}\quad\fangsong}{\par} +\newenvironment{proof}{\fangsong}{\hspace*{\fill}$\square$\par} +\newenvironment{solution}{\fangsong}{\par} + +\mdfsetup{ + nobreak=false, +} \mdfdefinestyle{framestyle}{ ntheorem=true, - roundcorner=10pt, - frametitlerule=false, - linewidth=0.4pt, + % roundcorner=10pt, innertopmargin=\topskip, theoremseparator={}, theoremspace=\quad, + frametitlerulewidth=.5pt, + frametitlerule=true, + linewidth=.5pt, + leftline=false, + rightline=false, + topline=true, + bottomline=true, + frametitlealignment=\raggedright\noindent, } \mdtheorem[ @@ -118,10 +128,18 @@ \surroundwithmdframed[ style=framestyle, linecolor=teal!80!black, + frametitlebackgroundcolor=teal!5, + frametitle={\noindent\bfseries\heiti 证明}, + % frametitleaboveskip=\topskip, + % frametitlebelowskip=\topskip, ]{proof} \surroundwithmdframed[ style=framestyle, linecolor=teal!80!black, + frametitlebackgroundcolor=teal!5, + frametitle={\noindent\bfseries\heiti 解}, + % frametitleaboveskip=\topskip, + % frametitlebelowskip=\topskip, ]{solution} \renewcommand{\figureautorefname}{图}