From bbd19d1565add2898942f1bb1ce908a5ba3cde8a Mon Sep 17 00:00:00 2001 From: "Colin B. Macdonald" Date: Sat, 14 Jun 2025 17:43:02 -0700 Subject: [PATCH 1/5] CI: add a job running codespell --- .codespell-ignorelines | 10 ++++++++++ .codespell-ignorewords | 10 ++++++++++ .github/workflows/main.yml | 29 +++++++++++++++++++++++++++++ 3 files changed, 49 insertions(+) create mode 100644 .codespell-ignorelines create mode 100644 .codespell-ignorewords create mode 100644 .github/workflows/main.yml diff --git a/.codespell-ignorelines b/.codespell-ignorelines new file mode 100644 index 0000000..d1ba58d --- /dev/null +++ b/.codespell-ignorelines @@ -0,0 +1,10 @@ +# SPDX-License-Identifier: FSFAP +# Copyright (C) 2025 Colin B. Macdonald +# +# Copying and distribution of this file, with or without modification, +# are permitted in any medium without royalty provided the copyright +# notice and this notice are preserved. This file is offered as-is, +# without any warranty. + +# lines that codespell should ignore: whitespace matters! + diff --git a/.codespell-ignorewords b/.codespell-ignorewords new file mode 100644 index 0000000..318e500 --- /dev/null +++ b/.codespell-ignorewords @@ -0,0 +1,10 @@ +# SPDX-License-Identifier: FSFAP +# Copyright (C) 2025 Colin B. Macdonald +# +# Copying and distribution of this file, with or without modification, +# are permitted in any medium without royalty provided the copyright +# notice and this notice are preserved. This file is offered as-is, +# without any warranty. + +# words that codespell should not complain about + diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..8a4e94a --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,29 @@ +# SPDX-License-Identifier: FSFAP +# Copyright (C) 2025 Colin B. Macdonald +# +# Copying and distribution of this file, with or without modification, +# are permitted in any medium without royalty provided the copyright +# notice and this notice are preserved. This file is offered as-is, +# without any warranty. + +name: CI + +on: + push: + pull_request: + schedule: + - cron: '17 0 * * 0' + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +jobs: + codespell: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: codespell-project/actions-codespell@v2 + with: + ignore_words_file: .codespell-ignorewords + exclude_file: .codespell-ignorelines + check_filenames: true + check_hidden: true From 627dcbb7c25fc7eb94232d7a4d422f1ff2ef2241 Mon Sep 17 00:00:00 2001 From: "Colin B. Macdonald" Date: Sat, 14 Jun 2025 17:44:50 -0700 Subject: [PATCH 2/5] Add spelling exceptions and correct a typo --- .codespell-ignorewords | 3 ++- Chapters/chapter2.tex | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.codespell-ignorewords b/.codespell-ignorewords index 318e500..fe1ff1b 100644 --- a/.codespell-ignorewords +++ b/.codespell-ignorewords @@ -7,4 +7,5 @@ # without any warranty. # words that codespell should not complain about - +co-ordinates +co-ordinate diff --git a/Chapters/chapter2.tex b/Chapters/chapter2.tex index 2f4e6e0..4744f36 100644 --- a/Chapters/chapter2.tex +++ b/Chapters/chapter2.tex @@ -1224,7 +1224,7 @@ \subsection{MATLAB: assigning matrices and {\tt det} and {\tt cross} \subsection{MATLAB: generating scripts with the MATLAB editor} -Often times using the command window in MATLAB to solve a problem can be tedious, because if the need arises to redo the problem, or change a parameter, one has to rewrite it all. The editor comes in handy for such cases. The editor is a text window (accesed from the command window: {\tt File $\rightarrow$ New $\rightarrow$ Blank M-file}) where one can write commands in the same syntax as the editor, and when one runs it, the results appear in the command window exactly as if one had written them there one after the other. +Often times using the command window in MATLAB to solve a problem can be tedious, because if the need arises to redo the problem, or change a parameter, one has to rewrite it all. The editor comes in handy for such cases. The editor is a text window (accessed from the command window: {\tt File $\rightarrow$ New $\rightarrow$ Blank M-file}) where one can write commands in the same syntax as the editor, and when one runs it, the results appear in the command window exactly as if one had written them there one after the other. For example, the code to generate three random orthogonal vectors would look something like this: \begin{verbatim} From fe4fc95082ad005361e0eac37c1b71da713e3ef7 Mon Sep 17 00:00:00 2001 From: "Colin B. Macdonald" Date: Sat, 14 Jun 2025 17:53:19 -0700 Subject: [PATCH 3/5] Fix some spelling errors --- .codespell-ignorewords | 2 ++ Chapters/chapter2.tex | 2 +- Chapters/chapter3.tex | 10 +++++----- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.codespell-ignorewords b/.codespell-ignorewords index fe1ff1b..caa7769 100644 --- a/.codespell-ignorewords +++ b/.codespell-ignorewords @@ -7,5 +7,7 @@ # without any warranty. # words that codespell should not complain about + co-ordinates co-ordinate +ans diff --git a/Chapters/chapter2.tex b/Chapters/chapter2.tex index 4744f36..33ba6e4 100644 --- a/Chapters/chapter2.tex +++ b/Chapters/chapter2.tex @@ -1853,7 +1853,7 @@ \subsection{Problems} \begin{problem} \label{op1_32} Find the equation for the line through $[2,-1,-1]$ and parallel to each of the -two planes $x_1+x_2=0$ and $x_1-x_2+2x_3=0$. Express the equation fo the line +two planes $x_1+x_2=0$ and $x_1-x_2+2x_3=0$. Express the equation of the line in both parametric and equation form. \end{problem} diff --git a/Chapters/chapter3.tex b/Chapters/chapter3.tex index f2483bc..836249d 100644 --- a/Chapters/chapter3.tex +++ b/Chapters/chapter3.tex @@ -1124,16 +1124,16 @@ \subsection{Connection of solutions to homogeneous and inhomogeneous systems.} \] To see the implications of this let us suppose that $\xx=\qq$ is any particular solution to a (non-homogeneous) system of equations. Then if $\yy$ is any other -solution $\yy-\xx=\zz$ is a solution of the corresponding homogenous system. +solution $\yy-\xx=\zz$ is a solution of the corresponding homogeneous system. So $\yy=\qq+\zz$. In other words any solution can be written as $\qq +$ some -solution of the corresponding homogenous system. Going the other way, if -$\zz$ is any solution of the corresponding homogenous system, then $\qq+\zz$ +solution of the corresponding homogeneous system. Going the other way, if +$\zz$ is any solution of the corresponding homogeneous system, then $\qq+\zz$ solves the original system. This can be seen by plugging $\qq+\zz$ into the equation. So the structure of the set of solutions is \[ \xx = \qq + (\mbox{{\ \bf solution to homogeneous system}}) \] -As you run through all solutions to the homogenous system on the right, +As you run through all solutions to the homogeneous system on the right, $\xx$ runs through all solutions of the original system. Notice that it doesn't matter which $\qq$ you choose as the starting point. This is completely analogous to the parametric form for a line, where the base point can be any @@ -2720,7 +2720,7 @@ \section{Solutions to Chapter Problems} \end{eqnarray*} Hence, we have that $\qq = (-3, -6, 1, 7)$. -Now, to find $\aa$, the homogenous row echelon form is +Now, to find $\aa$, the homogeneous row echelon form is $$ \left[\begin{array}{cccc|c} 1 & 2 & 2 & 2 & 0 \\ From 351a5aeb855268deb99fdaca6e7d3c6b573f54d8 Mon Sep 17 00:00:00 2001 From: "Colin B. Macdonald" Date: Sat, 14 Jun 2025 17:58:29 -0700 Subject: [PATCH 4/5] Minor latex edits so codespell avoids 'te' --- Chapters/chapter4.tex | 7 +++---- Chapters/chapter6.tex | 6 +++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Chapters/chapter4.tex b/Chapters/chapter4.tex index e04e5e5..0947a7a 100644 --- a/Chapters/chapter4.tex +++ b/Chapters/chapter4.tex @@ -3032,9 +3032,8 @@ \section{Solutions to Chapter Problems} 0&1 + t + {{t^2}\over{2}} + {{t^3}\over{3!}} + \cdots\cr }\right] \\ &=&\left[\matrix{ -e^t& -te^t\cr -0&e^t\cr + e^t & t e^t\cr + 0 & e^t\cr }\right] \end{eqnarray*} \item[d,e)] We are looking for all matrices that satisfy $B^2=A$. Let @@ -4068,4 +4067,4 @@ \section{Solutions to Chapter Problems} \end{eqnarray*} -\end{enumerate} \ No newline at end of file +\end{enumerate} diff --git a/Chapters/chapter6.tex b/Chapters/chapter6.tex index 447c0f4..4c6b34a 100644 --- a/Chapters/chapter6.tex +++ b/Chapters/chapter6.tex @@ -1779,7 +1779,7 @@ \subsection{The matrix exponential and differential equations} cases. Consider the matrix $A=\left[\matrix{1&1\cr0&1}\right]$. This matrix does not have a basis of eigenvectors. So it cannot be diagonalized. However, in a homework problem, you showed that $e^{tA} -= \left[\matrix{e^t&te^t\cr 0&e^t}\right]$. Thus the solution to += \left[\matrix{e^t & t e^t\cr 0 & e^t}\right]$. Thus the solution to \[ \yy'(t) = \left[\matrix{1&1\cr 0&1}\right]\yy(t) \] @@ -1790,8 +1790,8 @@ \subsection{The matrix exponential and differential equations} is \[ \yy(t) = e^{tA}\left[\matrix{2\cr 1\cr}\right] -=\left[\matrix{e^t&te^t\cr 0&e^t}\right]\left[\matrix{2\cr 1\cr}\right] -=\left[\matrix{2e^t+te^t\cr e^t\cr}\right] +=\left[\matrix{e^t & t e^t\cr 0 & e^t}\right]\left[\matrix{2\cr 1\cr}\right] +=\left[\matrix{2e^t + t e^t\cr e^t\cr}\right] \] Notice that this solution involves a power of $t$ in addition to exponentials. From 28490bece0701e3b9ca7d83e5e70af7e07b103b2 Mon Sep 17 00:00:00 2001 From: "Colin B. Macdonald" Date: Sat, 14 Jun 2025 18:03:12 -0700 Subject: [PATCH 5/5] CI: codespell skips pdf files --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8a4e94a..6b10d87 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -27,3 +27,4 @@ jobs: exclude_file: .codespell-ignorelines check_filenames: true check_hidden: true + skip: '*.pdf'