本页有简体中文版。

阅读中文版
ZotLit

Use a different template for books in Obsidian

Give books or any one kind of paper a literature note of its own: its folder, text, and properties, chosen automatically by a condition.

Add a profile for the paper type, set a condition on its Match tab, and ZotLit picks it for every matching item. This page makes a profile for books.

A profile decides a literature note's name, folder, properties, and body. A new profile starts as a copy of the Default profile. Before you start, edit the Default profile once, as in Customize a template.

Add a profile

In Obsidian, open Settings > ZotLit > Literature note profiles. In the header of the Other profiles list, select Add profile.

The Literature note profiles settings page with the Add profile button in the header of Other profiles outlined in red

The dialog Add profile opens.

Name it and choose its folder

In Name, type Books. In Literature note folder, type literatures/books, then select Add profile. The folder is optional. Leave it empty to use the Default profile's folder.

The Add profile dialog with the name Books and the folder literatures/books outlined in red

The profile opens in the editor as Books · Profile. ZotLit writes zotlit-profile.books.md into your template folder. The name is the label you see in lists. The profile's identity is an ID inside the file, so renaming the file changes nothing. See Profiles.

Edit its note text and properties

The editor opens on Name and folder. The Literature note folder reads literatures/books. Edit Note and Properties as in Customize a template and Configure properties.

The Name and folder tab of the Books profile with the Literature note folder field, set to literatures/books, outlined in red

Only notes made with this profile use these settings.

Set the condition that selects it

Select Match. The tab starts with one empty condition row. Choose Item type, leave the middle choice on is, and choose Book.

The Match tab with one condition, Item type is Book, outlined in red

The row reads Item type is Book. A row with no value selects nothing. Above the conditions, choose how they combine: All the following are true, Any of the following are true, or None of the following are true. The conditions are the same as the filter of a Query View. See Profile Match.

Check the condition against an item

Select Choose item to check under the conditions and choose a book.

The Match tab after choosing a book, with the result Matches selected item outlined in red

The tab reports Matches selected item. For any other item type it reports Does not match selected item. On the settings page, the profile's row reads Automatic.

Create a note from the profile

Run ZotLit: Open literature note quick switcher and choose the book.

The literature note quick switcher with the book The Visual Display of Quantitative Information outlined in red

ZotLit finds that the item matches Books and writes the note into literatures/books. The note records the profile in its zotlit-profile property.

The new note tufte1983 in literatures/books, with the zotlit-profile property reading Books outlined in red

Move a note to the profile

ZotLit uses the profile for every new note whose item matches. To move a note you already have, open it, open the command palette, and run ZotLit: Switch literature note profile.

The list of profiles opened by Switch literature note profile, with the row Books and its note path outlined in red

The list shows each profile with its folder and the path the note would have. Select Books to give the note that profile. Existing notes keep the profile that made them until you switch them.

When two profiles match

Two profiles can match the same item, and ZotLit does not choose for you when they do. The picker opens and reports More than one profile matches: …. Select a profile for this operation.. Its search box reads Choose from matching profiles…, and every candidate that matches the item carries Matches this item.

The picker for two matching profiles: Books and Reading notes both carry Matches this item, and the Books row is outlined in red

Pick the profile you meant to use, or dismiss the picker to cancel the note. Narrowing the conditions on the Match tab is the durable fix.

When you pick a profile by hand

A profile you choose for the current operation wins over Profile Match, whatever the conditions say. Profiles holds the order ZotLit tries when it selects one.

Your choice covers that one operation. The note records the profile that made it, and later updates read that record instead of the conditions.

Share the profile as one file

A profile is a single document, so you can move it to another vault as one file, with the partials it calls travelling inside it. The Profile document reference describes every key inside it.

Share the profile

On the profile's row, open More actions and select Share….

The menu on the Books row with Share outlined in red

The share dialog collects the document and the partials it appears to call.

Choose what the file carries

Under Partials, clear any partial you do not want to send. Include match conditions carries the Profile Match to the receiving vault, and Include my folders adds your note folders. Select Copy to clipboard to put the file on the clipboard, or Save Markdown file… to write it into a folder you choose.

The Share Books dialog with Copy to clipboard outlined in red

Both produce the same single document. The notice Copied the profile to the clipboard. confirms the copy.

Import it in the receiving vault

Run ZotLit: Import profile…, or select the import button in the header of the Other profiles list. Then choose Read from clipboard or Choose file….

The Import profile list with Read from clipboard outlined in red

Read what the import dialog reports

The dialog shows the profile, its folder and citation style, and the incoming Profile Match as a filter expression. Import match conditions imports the Match with the profile, so it selects notes in this vault too. Turn it off to keep the profile for manual selection only. Select Import profile to write the profile.

The Import profile dialog with the Import match conditions switch outlined in red above the folder and citation style

None of your notes change. When the shared profile carries no Match, the dialog reads Not auto-selected and hides the switch.

Next

Work through the template recipes in this order.

Last updated on

On this page