GithubHelp home page GithubHelp logo

sachindkagrawal15 / mathwiki Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ianqs/mathwiki

0.0 0.0 0.0 25.14 MB

An Obsidian.md vault for my math course notes in university.

License: MIT License

Shell 2.28% Ruby 0.03% Markdown 90.18% TeX 4.23% HTML 0.73% SCSS 2.54%

mathwiki's Introduction

๐Ÿ“ MathWiki

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.

๐Ÿ“‘ Contents

๐Ÿ”ญ Graph View

Graph view

โœ๏ธ Note Types and Templates

Each note is currently one of five types (four atomic notes and one map of content):

  • Definition, either of an object or of a notion, 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 its types).
    • Constructions: Objects/notions derived from object/notion.
    • Generalizations: Abstractions of object/notion.

    • Properties: Statements regarding object or necessary conditions of notion.
    • Sufficiencies: Proofs that other objects are of type object or sufficient conditions of notion
    • Equivalences: Equivalent definitions for object or biconditionals between notions and notion.
    • Justifications: Proofs of well-definition of object/notion.
  • Proposition and Theorem (differentiated by 'importance'), including both statement and proof regarding object/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 in statement.

    • Specializations: Reformulations/proofs of instances of statement.
    • Generalizations: Statements and proofs of abstractions of statement.
  • 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.

These templates are automatically inserted whenever a note is created. After the links, the main content is written with remarks where appropriate.

โš™๏ธ Configurations and Scripts

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:

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).

๐Ÿ”ฃ MathLinks

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.

Templates

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 '... $\Leftrightarrow$ ...'.

Instead of setting them manually, simply use mathLink: auto. This will generate its mathLink via a template that replaces iff with $\Leftrightarrow$. A template consists of a string to be matched (iff), its replacement $(\Leftrightarrow)$, and some options (global match, case sensitive, and match whole words). They are created and maintained in the MathLinks settings window.

๐ŸŽจ TikZ Images

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.

๐Ÿ“ƒ Sample Pages

mathwiki's People

Contributors

zhaoshenzhai avatar shahriarkh avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.