Skip to content

Commit

Permalink
docs: change frame style & update ci (yhwu-is#31)
Browse files Browse the repository at this point in the history
* docs: change frame style

* ci: update Actions file

* ci: try to fix Actions

* ci: change `mv` to `cp`
  • Loading branch information
45gfg9 authored Sep 18, 2023
1 parent e389b39 commit 2c9f3bd
Show file tree
Hide file tree
Showing 7 changed files with 58 additions and 21 deletions.
5 changes: 4 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
root = true

[*.tex, *.md]

charset = utf-8
end_of_line = lf

Expand All @@ -10,3 +9,7 @@ trim_trailing_whitespace = true

indent_style = space
indent_size = 4

[*.{yml,yaml}]
indent_size = 2
tab_width = 2
28 changes: 22 additions & 6 deletions .github/workflows/tex.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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
6 changes: 3 additions & 3 deletions 讲义/专题/11 矩阵的秩.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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$个行(列)向量线性无关;
Expand Down Expand Up @@ -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$.

Expand Down
2 changes: 1 addition & 1 deletion 讲义/专题/18 不变子空间.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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$不单;
Expand Down
2 changes: 1 addition & 1 deletion 讲义/专题/24 内积空间上的算子(I).tex
Original file line number Diff line number Diff line change
Expand Up @@ -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}] 采用数学归纳法.
Expand Down
6 changes: 3 additions & 3 deletions 讲义/专题/3 有限维线性空间.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
30 changes: 24 additions & 6 deletions 讲义/线性代数荣誉课辅学讲义.tex
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
\usepackage{xcolor}
\usepackage{multicol}
\usepackage{float}
\usepackage[framemethod=TikZ]{mdframed} % 若编译缓慢,可去掉 [framemethod=TikZ]
\usepackage{mdframed}

\usepackage{tikz}
\usepackage{pgfplots}
Expand Down Expand Up @@ -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[
Expand Down Expand Up @@ -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}{图}
Expand Down

0 comments on commit 2c9f3bd

Please sign in to comment.