The Zettelkasten method
The idea to write Zettlr came to my mind several years ago, when I was trying to elaborate on good workflows for my academic writing. I tried a lot of different styles and workflow ideas, and one that stuck was the Zettelkasten method. The problem back then was that most of the software did not really succeed in implementing it, but since there has been a lot of effort put into integrating the method, so that nowadays there are more and more applications that support some functions of this method.
Originally, the method stems from the German sociologist Niklas Luhmann, who, in an effort to remember everything he's ever read or thought, designed his own (back then analogue) Zettelkasten containing cards with some information and numbers on them. The numbers could be used to locate other cards with other information that was in some way related to the content of the card. This was a way for Luhmann to reference back and forth between a set of cards and, as the box filled up with more and more cards, allowed it to somehow get "alive", showing him connections between certain concepts that he himself had not thought about.
The basic idea, therefore, is to let you create relationships between small notes (or, for that matter, also long files) that enable you not only to move back and forth between files, but also to identify relationships that emerge in your files.
In the future, I will try to integrate as much Zettelkasten functionality into Zettlr as possible to enable even more workflows to flourish with the app. Below you can find all Zettelkasten functionality that has already been integrated into Zettlr.
What Zettlr is currently capable of
Three things are currently available in Zettlr:
- Generating Identifications for files
- Linking searches and files
- Tagging files
One of the biggest problems in writing apps that try to leave files untouched with app-specific stuff is that you need a way to identify files. Internally, Zettlr uses 32Bit-Hashes to identify specific files. But these depend on the paths, and, as Zettlr is designed to work even with cloud-saved files, the path on one computer will not be the same as on another computer, making the hash unusable as an ID. The second difficulty is offered by the format itself: Markdown files are plain text and therefore don't allow for all too much metadata to be added. Of course there have been approaches to integrate headers into markdown files, but this really was not the way to go, because this would jeopardise the rule of Zettlr to write agnostic markdown files. Metadata is way less standardised than the Markdown syntax itself, making it hard to imagine how that could work together with the philosophy of Zettlr. The solution I came up with to simply bury IDs somewhere in the text. To add an ID to a file, simply press
Cmd/Ctrl+L to generate one, or, if you prefer to do it manually, simply type an ID yourself. The ID will automatically be highlighted for you.
Take a look at the Settings page to see options on how to customise all Zettelkasten functionality to your liking.
The generated ID is to be preferred, because it uses the date in the format YYYYMMDDHHMMSS, which is unique to the second. Also, my own experience shows that when you don't use easy-to-recognise IDs, you are less prone to assume stuff, making them better suited to cross-link files. Just try it yourselves!
Zettlr will automatically try to find an ID for a file by searching through its contents. If it has found an ID that is not encapsulated by a Wiki-Link (more on that below), it will assume this ID internally to refer to the file. If there is more than one valid ID in the file, the first ID will take prevalence. This way, even in long files, if you can't find the ID, simply drop a new ID on top of the file to make this assume the role of a general ID for Zettlr.
Once the problem of Identification was solved, another occurred: How to link files across the app without jeopardising the above-mentioned aims of Zettlr to make files application-independent? Many apps, such as nvALT or The Archive implement an internal linking system that makes it possible to reference files from each other to make navigation through the system as easy as possible. Zettlr also includes such a system.
An internal link is written with the syntax of
[[This is the link]]. If you
Alt-click a link, it will trigger two distinct functions. First, it will try to find an exact match of the link's contents in the app. This means that it tries to find a file that reports that the content perfectly matches it. Such an exact match can be found in two ways: First, if the contents of the link (in the above example "This is the link") exactly matches a filename, excluding its extension, the appropriate file will report that it is indeed an exact match. The above example would exactly match the files
This is the link.md,
This is the link.markdown and
This is the link.txt. Note that the filename matching is done case-insensitive. This is a convenience feature, meant for cases in which you may forget the correct capitalization of your file. Also this reflects differences between file systems — macOS for instance is by default case insensitive (so
filename.md would match the same file as
FILENAME.MD). The second way that such a link may yield an exact match would be if the link's contents contain an ID in the format
[[<your-id>]]. If any file has the ID
<your-id>, Zettlr will also generate an exact match. If an exact match is found somewhere in the system, an Alt-Click on an internal link will immediately open the first matched file. This means that you can use such links to navigate through your system. You could, for example, accommodate this by creating index files that contain internal links to several files, and in each file, place a link that back-links to the respective index file.
The second function triggered by such a link is a global search inside your currently selected directory. It will merely take the link contents, place it in your search field and automatically "press Enter", to initiate the search. This way you can not only open exact files, but also find all other files that link to the file you just opened. So a link in the format
[[<your-id>]] would open that specific file and also search for all files that link back to this file.
Tagging may be the easiest form of internal searching. If you
Alt-Click on a tag, this will simply render a search for all files in your current directory that are tagged with this tag. As tags in the form
#keyword are not used anywhere in the markdown syntax, using this approach enables Zettlr to use such tags as the perfect means to create a tagging system.