LaTeX Zettelkasten Project for Mathematicians (and other LaTeX users)
I have been working on an open source project to use LaTeX to write typeset permanent notes. The project is on github. I'm sharing this here as other mathematicians or researchers who use LaTeX typesetting may find this project useful, and it would be useful for me if anyone has any suggestions on how to improve the project.
I was previously using obsidian but I found three main issues. The first was citations - I imagine there are effective ways to implement citations using obsidian and Zotero but I couldn't get these to work well for me. I wanted to be able to just type something like
citation('citation_key') (as one would when writing a paper in LaTeX) in the markdown file and have the system automatically process this, but I was unable to get a system like this to work. The second issue was a lack of theorem/lemma/proof etc environments, by which I mean being able to somehow label statements of theorems as theorems and then be able to link to them from other notes. I ended up writing headings like
### (Theorem) Name of Theorem but this felt a bit ad hoc, and it felt a bit wrong using a heading to denote proofs. The final issue was not being able to reference or link to equations, and not having control over the mathjax used in obsidian - for example adding in custom commands and using custom latex packages like tikz-cd or even simple ones like slashed. Again, there may be plugins for doing this but I was unable to find a good solution.
Over the course of the few months I spent using obsidian, I worked out that my problems were that I was writing notes in markdown rather than in native LaTeX. Writing in LaTeX you automatically have good ways to use citations (eg biber and bibtex), amsthm provides user definable theorem environments and LaTeX has really good built in referencing to reference equations. The downside is that LaTeX is really designed for making one large document at a time and not particularly well suited for atomic notes with links between them. The idea of LaTeX-Zettel is to automate the process of creating atomic notes with LaTeX and provide custom LaTeX commands for easy referencing between LaTeX documents, and essentially replicates the functionality of obsidian but using LaTeX instead of markdown.
The included templates and helper scripts in LaTeX-Zettel use the LaTeX packages \xrhyper, \hyperref and \cleveref to handle references within the Zettelkasten. The project is designed such that the notes can be rendered with standalone LaTeX once they have been written, so there is no dependence on the project long term. The main features currently implemented are:
- Custom referencing commands
- Biber for citations.
- Helper scripts to create new notes from LaTeX templates
- Automated analysis of the Zettelkasten - creates a database from the notes with details of the connections between notes.
- Native python 'network view' of Zettelkasten (see below)
- Ability to export multiple notes into a LaTeX document. See image below. LaTeX from the note is directly copied into the export at compile time and so all internal references and citations work in the exported document.
Planned features for the future:
- Customizable templates, and different templates for different notes
- Draw a path on the network view to write a draft of a paper
- Export notes as a '.tex' file, rather than a LaTeX document that references other notes that can then be rendered
- HTML rendering (this is currently implemented but has some bugs)
- Import notes from an existing .tex file - split up already written documents into atomic notes by adding comments to the .tex file that describe the desired notes.
Network (rendered using python's tk library)
Example note. Blue text indicates hyperlink.
The text for the above note. This can be rendered with, for example, 'pdflatex' and once written doesn't require the LaTeX-Zettel software to be installed to run.
Example 'export' of notes from the Zettelkasten. The
ExecuteMetaData commands directly paste the body of the atomic notes (between the '<%note>' tags, see note example) into the draft of the paper.
If you think you might find this useful, please have a go at using the software and consider giving feedback.
It looks like you're new here. If you want to get involved, click one of these buttons!