-
Notifications
You must be signed in to change notification settings - Fork 6
Zettelkasten software configuration
This page documents the manually maintained Obsidian, Pandoc, and MiKTeX configuration used with the Zettelkasten software inventory. The inventory page records installed software and repository files; this page records the working configuration used to create notes and support LaTeX or PDF export.
| Item | Location |
|---|---|
| Zettelkasten vault | %USERPROFILE%\Zettelkasten |
| Pandoc executable | pandoc |
| Pandoc user data directory | %USERPROFILE%\AppData\Roaming\pandoc |
| Pandoc LaTeX template | %USERPROFILE%\mytexmf\tex\latex\templates\template.tex |
| Local LaTeX color package | %USERPROFILE%\mytexmf\tex\latex\mystylefiles\LatexColors.incl.sty |
| Local TEXMF root | %USERPROFILE%\mytexmf |
The repository source files for this configuration are:
| Repository path | Purpose |
|---|---|
templates/NewFileTemplate.md |
Obsidian Templater template for creating a new Zettel. |
templates/Timestamp.md |
Obsidian Templater template for inserting a bracketed timestamp. |
templates/WikilinkTitle.md |
Obsidian Templater template for appending a linked note title after an ID-only WikiLink. |
pandoc/template.tex |
Modified Pandoc LaTeX template used by LaTeX and PDF export. |
LaTeX/LatexColors.incl.sty |
LaTeX color style file installed in the local TEXMF tree. |
templates/NewFileTemplate.md creates a new Zettel. It prompts for an alpha keyword and a title, builds the note ID from the alpha keyword plus the current timestamp, renames the file to that ID, and writes the standard front matter and section skeleton:
---
id: <ID>
title: <ID> <TITLE>
reference-section-title: References
---
# <TITLE>
## SEE ALSO
## ReferencesThis template implements the note-format relation used throughout the Zettelkasten: the filename is the immutable ID, the id: field is the same ID, the title: field begins with the ID followed by the title, and the H1 contains only the title.
templates/Timestamp.md inserts a timestamp of the form:
[YYYY-MM-DD HH:mm:ss]The timestamp template is mainly useful in periodic notes and working-log notes.
templates/WikilinkTitle.md operates on the current editor line. It finds an ID-only WikiLink such as:
[[CATS.1.0.24.0416]]then opens the linked note, reads its title: field, strips the leading ID when it matches the WikiLink target, and inserts the remaining title as plain text after the WikiLink:
[[CATS.1.0.24.0416]] Loose ends and co-loose coendsFor index-entry lines under SEE ALSO, use the ID-only form:
[[<ID>]] <TITLE> The WikiLink target remains ID-only, the title remains plain text outside the WikiLink, one ordinary separator space follows the closing ]], and two trailing spaces request a Markdown hard line break in previewers that implement that rule.
Pandoc is resolved from PowerShell as:
pandoc
Verify the executable and version from PowerShell with:
pandoc --version
(Get-Command pandoc).SourceThe recorded Pandoc version information is, with the user profile root generalized:
pandoc 3.9.0.2
Features: +server +lua
User data directory: %USERPROFILE%\AppData\Roaming\pandoc
The repository template is:
pandoc/template.tex
The installed template used by Pandoc is:
%USERPROFILE%\mytexmf\tex\latex\templates\template.tex
Install the repository copy to the configured Pandoc template path with:
Copy-Item `
"$env:USERPROFILE\vscode\Zettel\pandoc\template.tex" `
"$env:USERPROFILE\mytexmf\tex\latex\templates\template.tex"The template is based on Pandoc's default LaTeX template and contains local modifications used by mathematical notes exported from Obsidian.
First, it adds support for an extra metadata variable in the document-class option list:
$if(documentclass-format-options)$
$for(documentclass-format-options)$
$documentclass-format-options$$sep$,
$endfor$
$endif$Second, it loads packages used by exported mathematical notes:
\usepackage{tabularray}
\UseTblrLibrary{amsmath}
\usepackage{amssymb,amsthm}Third, it processes an additional YAML metadata field, more-header-includes, after Pandoc's ordinary header-includes loop:
$if(more-header-includes)$
$for(more-header-includes)$
$more-header-includes$
$endfor$
$endif$This allows individual notes to add extra LaTeX setup in their YAML front matter without changing the shared template.
MiKTeX uses the local TEXMF root:
%USERPROFILE%\mytexmf
The MiKTeX Console Settings page registers that directory as a user TEXMF root:
The color package is installed at:
%USERPROFILE%\mytexmf\tex\latex\mystylefiles\LatexColors.incl.sty
The repository source is:
LaTeX/LatexColors.incl.sty
Install the repository copy to the local TEXMF tree with:
Copy-Item `
"$env:USERPROFILE\vscode\Zettel\LaTeX\LatexColors.incl.sty" `
"$env:USERPROFILE\mytexmf\tex\latex\mystylefiles\LatexColors.incl.sty"After adding or replacing files in the local TEXMF tree, refresh the MiKTeX file-name database from MiKTeX Console or run:
initexmf --update-fndbThe package is used in LaTeX documents as:
\usepackage{LatexColors.incl}The LaTeX color package is found by MiKTeX through the registered local TEXMF root.
pandoc --version
(Get-Command pandoc).Source
Test-Path "$env:USERPROFILE\Zettelkasten"
Test-Path "$env:USERPROFILE\mytexmf\tex\latex\templates\template.tex"
Test-Path "$env:USERPROFILE\mytexmf\tex\latex\mystylefiles\LatexColors.incl.sty"
kpsewhich LatexColors.incl.sty
kpsewhich template.tex
kpsewhich -var-value=TEXMFHOME
initexmf --update-fndb