An Obsidian.md vault for my math course notes in university.
These notes are meant to be a distilled version of the math I've learnt where ideas, formulations, and important results are broken down into their atomic components of definitions, propositions, and theorems for clarity, precision, and accessibility.
A statically-generated site containing this vault is currently work in progress.
- Note Types and Templates; the basic templates and outgoing links for each type of note.
- Configurations and Scripts; snippets, plugins, and my bash scripts.
- MathLinks; my plugin that renders MathJax in links.
- TikZ Images; my workflow involving TikZ images.
- Sample Pages; some sample screenshots.
Each note is currently one of five types (four atomic notes and one map of content):
-
Definition, either of an
object
or of anotion
, which links to:- Types: Objects/notions of type
object
/notion
with additional restrictions. - Examples: Specific examples or counterexamples of
object
/notion
(but not of any of itstypes
). - Constructions: Objects/notions derived from
object
/notion
. - Generalizations: Abstractions of
object
/notion
. - Properties: Statements regarding
object
or necessary conditions ofnotion
. - Sufficiencies: Proofs that other objects are of type
object
or sufficient conditions ofnotion
- Equivalences: Equivalent definitions for
object
or biconditionals between notions andnotion
. - Justifications: Proofs of well-definition of
object
/notion
.
- Types: Objects/notions of type
-
Proposition and Theorem (differentiated by 'importance'), including both
statement
andproof
regardingobject
/notion
, which links to:- Proved by: Statements in which
proof
depends crucially on. - References: Notes in which the proofs of
statement
(or corollaries thereof) are delegated to. - Justifications: Proofs of implicit assumptions of
object
/notion
instatement
. - Specializations: Reformulations/proofs of instances of
statement
. - Generalizations: Statements and proofs of abstractions of
statement
.
- Proved by: Statements in which
-
Axiom, written as a formal
statement
within a certain framework, which links to:- Equivalences: Equivalent statements - including its proof.
- Constructions: Objects/notions that crucially depend on
statement
.
-
MOC, summarizing my understanding of a mathematical
theory
, which links to:- Context: Assumed background formalism(s) of
theory
. - Excursions: Subtheories of
theory
or its intersections with other theories. - Abstractions: Abstractions of
theory
or its unifications with other theories.
- Context: Assumed background formalism(s) of
These templates are automatically inserted whenever a note is created. After the links, the main content is written with remarks where appropriate.
I do not directly write my notes in Obsidian since I have my own Neovim setup; see dotfiles/nvim. Therefore, most of my Obsidian customization is on its appearance (via snippets) and navigation hotkeys.
Theme: Minimal.
Plugins:
- Extended MathJax: Add macros in
preamble.sty
. - Vim Navigation: Vim-like reading view navigation.
- Style Settings: Precise colors.
- Admonition: A replacement for the
mdframed
package in LaTeX. - MathLinks: Render MathJax in links; see below.
- Hider: Hide title bars, scroll bars, YAML, etc.
I wrote some bash scripts to (try) maintain the consistency of my notes; main.sh acts as a hub for me to run them.
- Images are handled by newTikZ.sh, getCurrentImage.sh, and updateImages.sh; see my workflow here.
- Global search and replace, including the ability of excluding additional patterns, is handled by searchReplace.sh.
- Operations on all lines containing patterns, including appending text, inserting a line before/after, and deleting lines, are handled by massEditing.sh.
- Basic stats of the vault (and updating them below) is handled by stats.sh.
- Displaying all links that have yet to be created and all notes that have those links, are handled by ghost.sh.
- Toggling between light and dark mode is handled by toggleDark.sh.
- Resetting the modification time of each note to its creation time is handled by resetModifyTime.sh.
Some stats: 828 notes, 2109 links, 65 images (updated every commit).
As far as I know, the standard wiki-style links of the form [[fileName]]
used in Obsidian does not support MathJax. Instead, one should use markdown-style links which are of the form [displayedText](fileName.md)
; here, displayedText
can contain MathJax. However, displayedText
remains unchanged when link is updated, so, if one wishes to have links with math, one needs to update them manually. This can get out of hand really fast.
I wrote a plugin, MathLinks, that aims to solve this issue by assigning fileName.md
a mathLink
, i.e. some specified text to be displayed and rendered when a note links to fileName.md
. It can be done by inserting mathLink: yourMathLink
to the YAML frontmatter of fileName.md
like so:
---
mathLink: yourMathLink
---
Content starts here.
That's it! All links of the form [[fileName]]
or [fileName](fileName.md)
will now be displayed as the rendered MathJax of yourMathLink
. No changes are made to your notes, and updates to yourMathLink
will be reflected once the note with the link is reopened.
Oftentimes, the mathLink
of fileName.md
involves replacing some text with its math counterpart. For instance, all of Invertible iff bijective.md
, Linearly dependent iff exists span-redundant element.md
, and LUB property iff GLB property.md
will have mathLinks of the form '...
Instead of setting them manually, simply use mathLink: auto
. This will generate its mathLink
via a template that replaces iff
with iff
), its replacement
This is the main downside of using MathJax in Obsidian since it sanitizes HTML which ignores <script>
tags and prevents one from using this tool.
My solution is to bind a key in Neovim which inserts
![[Images/UNIQUE_IDENTIFIER/image.svg]]
in the current line and runs a script that creates the corresponding .tex
file from a template where the TikZ code can be written. Once finished, another key can be pressed which executes
pdflatex -shell-escape image.tex && pdfcrop image.pdf image.pdf && pdf2svg image.pdf image.svg
All images are centered and have a 15px
top and bottom margin. This can be modified to only apply to those images in a certain class.