diff options
| author | Preston Pan <ret2pop@nullring.xyz> | 2026-03-15 18:45:32 -0700 |
|---|---|---|
| committer | Preston Pan <ret2pop@nullring.xyz> | 2026-03-15 18:45:32 -0700 |
| commit | 48e818808429e98e7db1f78b3e10537d829d2861 (patch) | |
| tree | c9c06fcb0f8fe19b3a586fb2385d899e560af422 | |
| parent | 1f04e4d007d7fd56d997e2148b7d01db444f0495 (diff) | |
fix build process to use catppuccin theme; checkpoint
| -rw-r--r-- | config/emacs.org | 369 | ||||
| -rw-r--r-- | config/nix.org | 26 | ||||
| -rw-r--r-- | mindmap/LRC circuit.org | 32 | ||||
| m--------- | nix | 0 | ||||
| -rw-r--r-- | tests/ci-build-stage-two.el | 4 | ||||
| -rw-r--r-- | tests/ci-build.el | 8 |
6 files changed, 240 insertions, 199 deletions
diff --git a/config/emacs.org b/config/emacs.org index 9de6f61..dda7dc2 100644 --- a/config/emacs.org +++ b/config/emacs.org @@ -143,53 +143,53 @@ configuration as they are also defined using the use-package macros. Some of the have documentation strings attached, so it is easy to follow what the individual options do. Emacs is self documenting, after all! #+begin_src emacs-lisp :tangle ../nix/init.el -(use-package emacs - :custom - ;; global defaults - (indent-tabs-mode nil "no real tabs, only spaces") - (tab-width 2 "tab show as 2 spaces") - (standard-indent 2 "base indentation") - (custom-safe-themes t "I already manage my themes with nix") - (custom-file null-device "Don't save custom configs") + (use-package emacs + :custom + ;; global defaults + (indent-tabs-mode nil "no real tabs, only spaces") + (tab-width 2 "tab show as 2 spaces") + (standard-indent 2 "base indentation") + (custom-safe-themes t "I already manage my themes with nix") + (custom-file null-device "Don't save custom configs") - ;; Startup errors - (warning-minimum-level :emergency "Supress emacs warnings") - (confirm-kill-processes nil "Don't ask to quit") - (debug-ignored-errors (cons 'remote-file-error debug-ignored-errors) "Remove annoying error from debug errors") - (browse-url-generic-program "librewolf" "set browser to librewolf") - (browse-url-secondary-browser-function 'browse-url-generic "set browser") - (browse-url-browser-function 'browse-url-generic "set browser") - (default-frame-alist '((alpha-background . 70) - (vertical-scroll-bars) - (internal-border-width . 24) - (left-fringe . 8) - (right-fringe . 8))) + ;; Startup errors + (warning-minimum-level :emergency "Supress emacs warnings") + (confirm-kill-processes nil "Don't ask to quit") + (debug-ignored-errors (cons 'remote-file-error debug-ignored-errors) "Remove annoying error from debug errors") + (browse-url-generic-program "librewolf" "set browser to librewolf") + (browse-url-secondary-browser-function 'browse-url-generic "set browser") + (browse-url-browser-function 'browse-url-generic "set browser") + (default-frame-alist '((alpha-background . 70) + (vertical-scroll-bars) + (internal-border-width . 24) + (left-fringe . 8) + (right-fringe . 8))) - ;; Mouse wheel - (mouse-wheel-scroll-amount '(1 ((shift) . 1)) "Nicer scrolling") - (mouse-wheel-progressive-speed nil "Make scrolling non laggy") - (mouse-wheel-follow-mouse 't "Scroll correct window") - (scroll-conservatively 101 "Sort of smooth scrolling") - (scroll-step 1 "Scroll one line at a time") - (debug-on-error nil "Don't make the annoying popups") - (display-time-24hr-format t "Use 24 hour format to read the time") - (display-line-numbers-type 'relative "Relative line numbers for easy vim jumping") - (use-short-answers t "Use y instead of yes") - (make-backup-files nil "Don't make backups") - (display-fill-column-indicator-column 150 "Draw a line at 100 characters") - (fill-column 150) - (line-spacing 2 "Default line spacing") - (c-doc-comment-style '((c-mode . doxygen) - (c++-mode . doxygen))) + ;; Mouse wheel + (mouse-wheel-scroll-amount '(1 ((shift) . 1)) "Nicer scrolling") + (mouse-wheel-progressive-speed nil "Make scrolling non laggy") + (mouse-wheel-follow-mouse 't "Scroll correct window") + (scroll-conservatively 101 "Sort of smooth scrolling") + (scroll-step 1 "Scroll one line at a time") + (debug-on-error nil "Don't make the annoying popups") + (display-time-24hr-format t "Use 24 hour format to read the time") + (display-line-numbers-type 'relative "Relative line numbers for easy vim jumping") + (use-short-answers t "Use y instead of yes") + (make-backup-files nil "Don't make backups") + (display-fill-column-indicator-column 150 "Draw a line at 100 characters") + (fill-column 150) + (line-spacing 2 "Default line spacing") + (c-doc-comment-style '((c-mode . doxygen) + (c++-mode . doxygen))) - :hook ((text-mode . visual-line-mode) - (prog-mode . display-line-numbers-mode) - (prog-mode . display-fill-column-indicator-mode) - (org-mode . auto-fill-mode) - (org-mode . display-fill-column-indicator-mode) - (org-mode . display-line-numbers-mode)) - :config (emacs-config)) + :hook ((text-mode . visual-line-mode) + (prog-mode . display-line-numbers-mode) + (prog-mode . display-fill-column-indicator-mode) + (org-mode . auto-fill-mode) + (org-mode . display-fill-column-indicator-mode) + (org-mode . display-line-numbers-mode)) + :config (emacs-config)) #+end_src As you can see, the config (and sometimes the init section) of most of these use-package blocks contain most of the imperative commands. In fact, most of the configurations are completely @@ -204,148 +204,168 @@ of course Emacs was not designed to be fully imperative. ** Org Mode This is my org mode configuration, which also configures latex. #+begin_src emacs-lisp :tangle ../nix/init.el -(use-package org - :demand t - :after (f s dash nix-mode) - :hook - ((org-mode-hook . remove-annoying-pairing)) - :custom - ;; Fix terrible indentation issues - (org-edit-src-content-indentation 0) - (org-src-tab-acts-natively t) - (org-src-preserve-indentation t) + (use-package org + :demand t + :after (f s dash nix-mode) + :hook + ((org-mode . remove-annoying-pairing)) + :custom + ;; Fix terrible indentation issues + (org-edit-src-content-indentation 0) + (org-src-tab-acts-natively t) + (org-src-preserve-indentation t) - (TeX-PDF-mode t) - (org-confirm-babel-evaluate nil "Don't ask to evaluate code block") - (org-export-with-broken-links t "publish website even with broken links") - (org-src-fontify-natively t "Colors!") + (TeX-PDF-mode t) + (org-confirm-babel-evaluate nil "Don't ask to evaluate code block") + (org-export-with-broken-links t "publish website even with broken links") + (org-src-fontify-natively t "Colors!") - ;; org-latex - (org-preview-latex-image-directory (expand-file-name "~/.cache/ltximg/") "don't use weird cache location") - (org-latex-preview-ltxpng-directory (expand-file-name "~/.cache/ltximg/") "don't use weird cache location") - (org-latex-to-html-convert-command "printf '%%s' %i | pandoc -f latex -t html --mathml | tr -d '\\n' | sed -e 's/^<p>//' -e 's/<\\/p>$//'" "latex to MathML with special character handling") - (org-latex-to-mathml-convert-command "printf '%%s' %i | pandoc -f latex -t html --mathml | tr -d '\\n' | sed -e 's/^<p>//' -e 's/<\\/p>$//'" "latex to MathML with special character handling") + ;; org-latex + (org-format-latex-header "\\documentclass{article} \ + \\usepackage[usenames]{color} \ + [DEFAULT-PACKAGES] \ + [PACKAGES] \ + \\pagestyle{empty} % do not remove \ + % The settings below are copied from fullpage.sty \ + \\setlength{\\textwidth}{\\paperwidth} \ + \\addtolength{\\textwidth}{-3cm} \ + \\setlength{\\oddsidemargin}{1.5cm} \ + \\addtolength{\\oddsidemargin}{-2.54cm} \ + \\setlength{\\evensidemargin}{\\oddsidemargin} \ + \\setlength{\\textheight}{\\paperheight} \ + \\addtolength{\\textheight}{-\\headheight} \ + \\addtolength{\\textheight}{-\\headsep} \ + \\addtolength{\\textheight}{-\\footskip} \ + \\addtolength{\\textheight}{-3cm} \ + \\setlength{\\topmargin}{1.5cm} \ + \\addtolength{\\topmargin}{-2.54cm} \ + \\usepackage{amsmath} \ + ") + (org-preview-latex-image-directory (expand-file-name "~/.cache/ltximg/") "don't use weird cache location") + (org-latex-preview-ltxpng-directory (expand-file-name "~/.cache/ltximg/") "don't use weird cache location") + (org-latex-to-html-convert-command "printf '%%s' %i | pandoc -f latex -t html --mathml | tr -d '\\n' | sed -e 's/^<p>//' -e 's/<\\/p>$//'" "latex to MathML with special character handling") + (org-latex-to-mathml-convert-command "printf '%%s' %i | pandoc -f latex -t html --mathml | tr -d '\\n' | sed -e 's/^<p>//' -e 's/<\\/p>$//'" "latex to MathML with special character handling") - (TeX-engine 'xetex "set xelatex as default engine") - (preview-default-option-list '("displaymath" "textmath" "graphics") "preview latex") - (preview-image-type 'png "Use PNGs") - (org-format-latex-options - '(:foreground default - :background default - :scale 2 - :html-foreground "Black" - :html-background "Transparent" - :html-scale 1.5 - :matchers ("begin" "$1" "$" "$$" "\\(" "\\[")) "space latex better") - (org-return-follows-link t "be able to follow links without mouse") - (org-startup-indented t "Indent the headings") - (org-image-actual-width '(300) "Cap width") - (org-startup-with-latex-preview t "see latex previews on opening file") - (org-startup-with-inline-images t "See images on opening file") - (org-hide-emphasis-markers t "prettify org mode") - (org-use-sub-superscripts "{}" "Only display superscripts and subscripts when enclosed in {}") - (org-pretty-entities t "prettify org mode") - (org-agenda-files (list "~/monorepo/agenda.org" "~/org/notes.org" "~/org/agenda.org") "set default org files") - (org-default-notes-file (concat org-directory "/notes.org") "Notes file") + (TeX-engine 'xetex "set xelatex as default engine") + (preview-default-option-list '("displaymath" "textmath" "graphics") "preview latex") + ;; (preview-image-type 'png "Use PNGs") + (org-preview-latex-default-process 'dvipng) + (org-format-latex-options + '(:foreground default + :background default + :scale 2 + :html-foreground "Black" + :html-background "Transparent" + :html-scale 1.5 + :matchers ("begin" "$1" "$" "$$" "\\(" "\\[")) "space latex better") + (org-return-follows-link t "be able to follow links without mouse") + (org-startup-indented t "Indent the headings") + (org-image-actual-width '(300) "Cap width") + (org-startup-with-latex-preview t "see latex previews on opening file") + (org-startup-with-inline-images t "See images on opening file") + (org-hide-emphasis-markers t "prettify org mode") + (org-use-sub-superscripts "{}" "Only display superscripts and subscripts when enclosed in {}") + (org-pretty-entities t "prettify org mode") + (org-agenda-files (list "~/monorepo/agenda.org" "~/org/notes.org" "~/org/agenda.org") "set default org files") + (org-default-notes-file (concat org-directory "/notes.org") "Notes file") - ;; ricing - (org-auto-align-tags nil) - (org-tags-column 0) - (org-catch-invisible-edits 'show-and-error) - (org-special-ctrl-a/e t) - (org-insert-heading-respect-content t) - (org-hide-emphasis-markers t) - (org-pretty-entities t) - (org-agenda-tags-column 0) - (org-ellipsis "…") - :config - (org-babel-do-load-languages 'org-babel-load-languages - '((shell . t) - (python . t) - (nix . t) - (latex . t)))) + ;; ricing + (org-auto-align-tags nil) + (org-tags-column 0) + (org-catch-invisible-edits 'show-and-error) + (org-special-ctrl-a/e t) + (org-insert-heading-respect-content t) + (org-hide-emphasis-markers t) + (org-pretty-entities t) + (org-agenda-tags-column 0) + (org-ellipsis "…") + :config + (org-babel-do-load-languages 'org-babel-load-languages + '((shell . t) + (python . t) + (nix . t) + (latex . t)))) -(use-package org-tempo - :after org) + (use-package org-tempo + :after org) -(use-package org-habit - :after org - :custom - (org-habit-preceding-days 7 "See org habit entries") - (org-habit-following-days 35 "See org habit entries") - (org-habit-show-habits t "See org habit entries") - (org-habit-show-habits-only-for-today nil "See org habit entries") - (org-habit-show-all-today t "Show org habit graph")) + (use-package org-habit + :after org + :custom + (org-habit-preceding-days 7 "See org habit entries") + (org-habit-following-days 35 "See org habit entries") + (org-habit-show-habits t "See org habit entries") + (org-habit-show-habits-only-for-today nil "See org habit entries") + (org-habit-show-all-today t "Show org habit graph")) -(when noninteractive (use-package htmlize :demand t - :after (catppuccin-theme))) + :after (catppuccin-theme doom-themes)) -(unless noninteractive - (use-package htmlize - :after (doom-themes))) + (unless noninteractive + (use-package htmlize + :after (doom-themes))) -(use-package ox-latex - :after (org) - :custom - (org-latex-compiler "xelatex" "Use latex as default") - (org-latex-pdf-process '("xelatex -interaction=nonstopmode -output-directory=%o %f") "set xelatex as default")) + (use-package ox-latex + :after (org) + :custom + (org-latex-compiler "xelatex" "Use latex as default") + (org-latex-pdf-process '("xelatex -interaction=nonstopmode -output-directory=%o %f") "set xelatex as default")) -(use-package ox-html - :demand t - :after (org htmlize) - :custom - (org-html-htmlize-output-type 'css "allow styling from CSS file") - (org-html-with-latex 'html "let my html handler handle latex") - (org-html-mathjax-options nil "disable mathjax, use MathML") - (org-html-mathjax-template "" "disable mathjax, use MathML") - (org-html-head-include-default-style nil "use my own css for everything") - (org-html-head-include-scripts nil "use my own js for everything") - (org-html-postamble (concat "Copyright © 2024 " system-fullname) "set copyright notice on bottom of site") - (org-html-divs '((preamble "header" "preamble") - (content "main" "content") - (postamble "footer" "postamble")) "semantic html exports") - (org-html-viewport '((width "device-width") - (initial-scale "1.0") - (minimum-scale "1.0")) "Prevent zooming out past default size") - :config (advice-add 'org-html-latex-environment :around #'org-html-latex-environment-pandoc-fix)) + (use-package ox-html + :demand t + :after (org htmlize) + :custom + (org-html-htmlize-output-type 'css "allow styling from CSS file") + (org-html-with-latex 'html "let my html handler handle latex") + (org-html-mathjax-options nil "disable mathjax, use MathML") + (org-html-mathjax-template "" "disable mathjax, use MathML") + (org-html-head-include-default-style nil "use my own css for everything") + (org-html-head-include-scripts nil "use my own js for everything") + (org-html-postamble (concat "Copyright © 2024 " system-fullname) "set copyright notice on bottom of site") + (org-html-divs '((preamble "header" "preamble") + (content "main" "content") + (postamble "footer" "postamble")) "semantic html exports") + (org-html-viewport '((width "device-width") + (initial-scale "1.0") + (minimum-scale "1.0")) "Prevent zooming out past default size") + :config (advice-add 'org-html-latex-environment :around #'org-html-latex-environment-pandoc-fix)) -(use-package ox-publish - :demand t - :after (org f s dash ox-html) - :custom - (org-publish-project-alist - `(("website-org" - :base-directory "~/monorepo" - :base-extension "org" - :exclude "nix/README\\.org" - :publishing-directory "~/website_html" - :with-author t - :with-date t - :recursive t - :publishing-function org-html-publish-to-html - :headline-levels 4 - :html-head ,(concat "<meta name=\"theme-color\" content=\"#ffffff\">\n<link rel=\"preload\" href=\"/fonts/Inconsolata-Medium.woff2\" as=\"font\" type=\"font/woff2\" crossorigin>\n<meta name=\"theme-color\" content=\"#ffffff\">\n<link rel=\"preload\" href=\"/fonts/Lora-Medium.woff2\" as=\"font\" type=\"font/woff2\" crossorigin>\n<link rel=\"preload\" href=\"/fonts/CormorantGaramond-Bold.woff2\" as=\"font\" type=\"font/woff2\" crossorigin>\n<link rel=\"preload\" href=\"/fonts/CormorantGaramond-Medium.woff2\" as=\"font\" type=\"font/woff2\" crossorigin>\n<link rel=\"manifest\" href=\"/site.webmanifest\">\n<link rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/favicon-16x16.png\">\n<link rel=\"mask-icon\" href=\"/safari-pinned-tab.svg\" color=\"#5bbad5\">\n<link rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/favicon-32x32.png\">\n<link rel=\"apple-touch-icon\" sizes=\"180x180\" href=\"/apple-touch-icon.png\"><meta name=\"msapplication-TileColor\" content=\"#da532c\">\n" - "<style>" - (->> (create-htmlize-css) - (s-replace-regexp "<style[^>]*>" "") - (s-replace "</style>" "") - (s-replace "<![CDATA[/*><![CDATA[/*>\n" "") - (s-replace "/*]]>*/-->" "") - (s-trim) - (minify-css)) - (f-read-text "~/monorepo/style.css" 'utf-8) - "</style>") - :html-preamble t - :html-preamble-format (("en" "<p class=\"preamble\"><a href=\"/index.html\">home</a> | <a href=\"./index.html\">section main page</a></p><hr>"))) - ("website-static" - :base-directory "~/monorepo" - :base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf\\|ico\\|asc\\|pub\\|webmanifest\\|xml\\|svg\\|txt\\|webp\\|conf" - :publishing-directory "~/website_html/" - :recursive t - :publishing-function org-publish-attachment) - ("website" :auto-sitemap t :components ("website-org" "website-static"))) "functions to publish website")) + (use-package ox-publish + :demand t + :after (org f s dash ox-html) + :custom + (org-publish-project-alist + `(("website-org" + :base-directory "~/monorepo" + :base-extension "org" + :exclude "nix/README\\.org" + :publishing-directory "~/website_html" + :with-author t + :with-date t + :recursive t + :publishing-function org-html-publish-to-html + :headline-levels 4 + :html-head ,(concat "<meta name=\"theme-color\" content=\"#ffffff\">\n<link rel=\"preload\" href=\"/fonts/Inconsolata-Medium.woff2\" as=\"font\" type=\"font/woff2\" crossorigin>\n<meta name=\"theme-color\" content=\"#ffffff\">\n<link rel=\"preload\" href=\"/fonts/Lora-Medium.woff2\" as=\"font\" type=\"font/woff2\" crossorigin>\n<link rel=\"preload\" href=\"/fonts/CormorantGaramond-Bold.woff2\" as=\"font\" type=\"font/woff2\" crossorigin>\n<link rel=\"preload\" href=\"/fonts/CormorantGaramond-Medium.woff2\" as=\"font\" type=\"font/woff2\" crossorigin>\n<link rel=\"manifest\" href=\"/site.webmanifest\">\n<link rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/favicon-16x16.png\">\n<link rel=\"mask-icon\" href=\"/safari-pinned-tab.svg\" color=\"#5bbad5\">\n<link rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/favicon-32x32.png\">\n<link rel=\"apple-touch-icon\" sizes=\"180x180\" href=\"/apple-touch-icon.png\"><meta name=\"msapplication-TileColor\" content=\"#da532c\">\n" + "<style>" + (->> (create-htmlize-css) + (s-replace-regexp "<style[^>]*>" "") + (s-replace "</style>" "") + (s-replace "<![CDATA[/*><![CDATA[/*>\n" "") + (s-replace "/*]]>*/-->" "") + (s-trim) + (minify-css)) + (f-read-text "~/monorepo/style.css" 'utf-8) + "</style>") + :html-preamble t + :html-preamble-format (("en" "<p class=\"preamble\"><a href=\"/index.html\">home</a> | <a href=\"./index.html\">section main page</a></p><hr>"))) + ("website-static" + :base-directory "~/monorepo" + :base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf\\|ico\\|asc\\|pub\\|webmanifest\\|xml\\|svg\\|txt\\|webp\\|conf" + :publishing-directory "~/website_html/" + :recursive t + :publishing-function org-publish-attachment) + ("website" :auto-sitemap t :components ("website-org" "website-static"))) "functions to publish website")) #+end_src As you can see, I only have one real entry in config here (I don't count requires even though they have to be on the top) @@ -869,8 +889,9 @@ to Chromium if I have to: ** Nix Mode Load Nix mode so our exported website has syntax highlighting for Nix blocks. #+begin_src emacs-lisp :tangle ../nix/init.el -(use-package nix-mode - :mode "\\.nix\\'") + (use-package nix-mode + :demand t + :mode "\\.nix\\'") #+end_src ** Org Roam For all my mathematics and programming notes: diff --git a/config/nix.org b/config/nix.org index 6eb55d5..3a8350b 100644 --- a/config/nix.org +++ b/config/nix.org @@ -3514,16 +3514,29 @@ Make sure those are set correctly. I've set it to sign by default. programs.git = { enable = lib.mkDefault config.monorepo.profiles.graphics.enable; package = pkgs.gitFull; - lfs.enable = lib.mkDefault config.monorepo.profiles.graphics.enable; userName = super.monorepo.vars.fullName; - userEmail = "${super.monorepo.vars.email}"; + userEmail = super.monorepo.vars.email; + lfs.enable = lib.mkDefault config.monorepo.profiles.graphics.enable; + signing = { key = super.monorepo.vars.gpgKey; signByDefault = true; }; + # alias = { + # pl = "pull"; + # ps = "push"; + # co = "checkout"; + # c = "commit"; + # a = "add"; + # st = "status"; + # sw = "switch"; + # b = "branch"; + # }; + extraConfig = { init.defaultBranch = "main"; + credential."mail.${super.monorepo.vars.orgHost}" = { username = "${super.monorepo.vars.email}"; helper = "!f() { test \"$1\" = get && echo \"password=$(cat /run/user/1000/secrets/mail)\"; }; f"; @@ -3535,7 +3548,16 @@ Make sure those are set correctly. I've set it to sign by default. smtpserverport = 465; smtpencryption = "ssl"; }; + }; + # settings = { + # user = { + # name = super.monorepo.vars.fullName; + # email = super.monorepo.vars.email; + # }; + + + # }; aliases = { pl = "pull"; diff --git a/mindmap/LRC circuit.org b/mindmap/LRC circuit.org index 0df7bdc..51afe3c 100644 --- a/mindmap/LRC circuit.org +++ b/mindmap/LRC circuit.org @@ -5,7 +5,6 @@ #+title: LRC circuit #+author: Preston Pan #+description: Explanation of LRC Circuits - #+options: broken-links:t * Introduction @@ -44,21 +43,21 @@ another circuit diagram will include a possibly variable voltage source. * Mass-Spring Equation Equivalence We know these relations for the given circuit elements above: -\begin{align} +\begin{equation} v(t) = L\frac{di}{dt} \\ i(t) = C\frac{dv}{dt} \\ v = iR -\end{align} +\end{equation} if we analyze the current signal, Kirchhoff's voltage law tells us that the total voltage drop throughout this circuit is zero. We use the capacitor equation in integral form and sum the voltages: -\begin{align*} +\begin{equation} L\frac{di}{dt} + \frac{1}{C}\int i(t)dt + iR = 0 -\end{align*} +\end{equation} We then take a derivative to remove the integral: -\begin{align*} +\begin{equation} L\frac{d^{2}i}{dt^{2}} + R\frac{di}{dt} + \frac{1}{C}i = 0 \\ (LD^{2} + RD + \frac{1}{C}) i(t) = 0 -\end{align*} +\end{equation} it is clear that the characteristic polynomial of this homogeneous linear [[id:4be41e2e-52b9-4cd1-ac4c-7ecb57106692][differential equation]] is: \begin{align*} L\lambda^{2} + R\lambda + \frac{1}{C} = 0 @@ -144,8 +143,8 @@ i(t) = V_{0}e^{i\phi}\mathcal{L}^{-1}\{\frac{1}{(s - z_{1})(s - z_{2})(s - z_{3} where $z_{2}$ and $z_{3}$ are the two roots we found for the homogeneous case. We then use partial fraction decomposition: \begin{align} \label{} -\frac{1}{(s - z_{1})(s - z_{2})(s - z_{3})} = \frac{A}{s - z_{1}} + \frac{B}{s - z_{2}} + \frac{C}{s - z_{3}} \\ -A(s - z_{2})(s - z_{3}) + B(s - z_{1})(s - z_{3}) + C(s - z_{1})(s - z_{2}) = 1 +\frac{1}{(s - z_{1})(s - z_{2})(s - z_{3})} &= \frac{A}{s - z_{1}} + \frac{B}{s - z_{2}} + \frac{C}{s - z_{3}} \\ +A(s - z_{2})(s - z_{3}) + B(s - z_{1})(s - z_{3}) + C(s - z_{1})(s - z_{2}) &= 1 \end{align} from this we know: \begin{align} @@ -165,7 +164,7 @@ Now we want to eliminate B: \label{} [(z_{2} + z_{3}) - (z_{1} + z_{2})]A + [(z_{1} + z_{3}) - (z_{1} + z_{2})]B = 0 \\ (z_{3} - z_{1})A + (z_{3} - z_{2})B = 0 \\ -B = -\frac{z_{3} - z_{1}}{z_{3} - z_{2}}A \\ +B = -\frac{z_{3} - z_{1}}{z_{3} - z_{2}}A \end{align} finally, we have one equation in terms of A: \begin{align} @@ -186,10 +185,9 @@ C = \frac{z_{2} - z_{1}}{z_{2}z_{3}^{2} + z_{1}z_{2}^{2} + z_{1}^{2}z_{3} - z_{1 \end{align} So we have the three coefficients: \begin{align} -\label{} -A = \frac{z_{3} - z_{2}}{z_{2}z_{3}^{2} + z_{1}z_{2}^{2} + z_{1}^{2}z_{3} - z_{1}z_{3}^{2} - z_{1}^{2}z_{2} - z_{2}^{2}z_{3}} \\ -B = \frac{z_{1} - z_{3}}{z_{2}z_{3}^{2} + z_{1}z_{2}^{2} + z_{1}^{2}z_{3} - z_{1}z_{3}^{2} - z_{1}^{2}z_{2} - z_{2}^{2}z_{3}} \\ -C = \frac{z_{2} - z_{1}}{z_{2}z_{3}^{2} + z_{1}z_{2}^{2} + z_{1}^{2}z_{3} - z_{1}z_{3}^{2} - z_{1}^{2}z_{2} - z_{2}^{2}z_{3}} +A &= \frac{z_{3} - z_{2}}{z_{2}z_{3}^{2} + z_{1}z_{2}^{2} + z_{1}^{2}z_{3} - z_{1}z_{3}^{2} - z_{1}^{2}z_{2} - z_{2}^{2}z_{3}} \\ +B &= \frac{z_{1} - z_{3}}{z_{2}z_{3}^{2} + z_{1}z_{2}^{2} + z_{1}^{2}z_{3} - z_{1}z_{3}^{2} - z_{1}^{2}z_{2} - z_{2}^{2}z_{3}} \\ +C &= \frac{z_{2} - z_{1}}{z_{2}z_{3}^{2} + z_{1}z_{2}^{2} + z_{1}^{2}z_{3} - z_{1}z_{3}^{2} - z_{1}^{2}z_{2} - z_{2}^{2}z_{3}} \end{align} The resulting solution looks like this: \begin{align} @@ -226,10 +224,10 @@ so the full solution including the terms used for the [[id:bc7e9e01-9721-4b3e-a8 i(t) = V_{0}e^{i\phi}(Ae^{z_{1}t} + Be^{z_{2}t} + Ce^{z_{3}t}) + (i'(0) + i(0))(De^{z_{2}t} + Ee^{z_{3}t}) \end{align} the sinusoidal part of the solution looks like this: -\begin{align} -\label{hello world} +\begin{equation} +\label{} \frac{(z_{3} - z_{2})V_{0}e^{i\phi}e^{2\pi i\omega t}}{z_{2}z_{3}^{2} + z_{1}z_{2}^{2} + z_{1}^{2}z_{3} - z_{1}z_{3}^{2} - z_{1}^{2}z_{2} - z_{2}^{2}z_{3}} -\end{align} +\end{equation} * Mass-Spring System Starting from [[id:6e2a9d7b-7010-41da-bd41-f5b2dba576d3][Newtonian mechanics]] in a single dimension: diff --git a/nix b/nix -Subproject 71a46de1309a6c496ecab5ca84a1a4ba6d0f675 +Subproject acd671724d93675db85d68c670a53413bf95c77 diff --git a/tests/ci-build-stage-two.el b/tests/ci-build-stage-two.el index 3ab5c91..aca425d 100644 --- a/tests/ci-build-stage-two.el +++ b/tests/ci-build-stage-two.el @@ -22,10 +22,6 @@ (princ "STEP 5: before catppuccin\n" (quote external-debugging-output)) -(require 'catppuccin-theme) -(setq catppuccin-flavor 'mocha) -(load-theme 'catppuccin t) - (defun my-ci-force-fontification () "Ensure the buffer is fully colorized before htmlize touches it." (font-lock-ensure) diff --git a/tests/ci-build.el b/tests/ci-build.el index f72eb02..68d8670 100644 --- a/tests/ci-build.el +++ b/tests/ci-build.el @@ -11,9 +11,9 @@ (princ "STEP 0: tf\n" (quote external-debugging-output)) (setq noninteractive t) -(setq system-email "lol@troll.com") +(setq system-email "ci-runner@nullring.xyz") (setq system-username "ci-runner") -(setq system-fullname "Preston Pan") +(setq system-fullname "Preston Pan") ;; needed for postamble (setq system-gpgkey "00000000") (defun package-vc-install (&rest args) (message "blocked package-vc-install for %s" args)) (defun package-vc--unpack (&rest args) nil) @@ -40,4 +40,8 @@ (setq vc-handled-backends nil) (setq make-backup-files nil auto-save-default nil create-lockfiles nil) +(require 'catppuccin-theme) +(setq catppuccin-flavor 'mocha) +(load-theme 'catppuccin t) + (princ "STEP 1: init.el?\n" (quote external-debugging-output)) |
