zoteroRoam
Report an issueRoadmap
v0.5
v0.5
  • Introduction
  • โ–ถ๏ธDemo by Cortex Futura
  • ๐Ÿ”„Updating from older versions
  • ๐Ÿ†˜Help/Getting Support
  • ๐Ÿ Getting Started
    • 1.1 Pre-requisites
    • 1.2 Installation in {{roam/js}}
    • 1.3 Basic Setup
  • ๐ŸงชUsing the extension
    • 2a. The search panel
    • 2b. In-text references
  • ๐Ÿ› ๏ธCustomizations
    • 3.1 What's Available
    • 3.2 Constructing data requests
    • 3.3 Creating your own formatting functions
      • Nesting metadata
      • Code snippets
    • 3.4 Creating custom shortcuts
    • 3.5 Other Settings
      • autocomplete
      • funcmap
      • typemap
      • Copying an item's reference
    • Extension defaults
  • About the Zotero API
    • Zotero API Docs (v3)
  • Support the project
    • Roadmap/Future Development
    • Buy me a (virtual) coffee
    • GitHub Sponsorship
Powered by GitBook
On this page
  • Value
  • Usage in the extension
  • Examples

Was this helpful?

  1. Customizations
  2. 3.5 Other Settings

typemap

Specification and examples for user-defined typemap

Last updated 4 years ago

Was this helpful?

Value

An Object containing one or more properties named after the Zotero item types.

Each property should be defined as follows :

  • Name : the property name has to follow the Zotero data scheme. An old nomenclature of item types is available .

  • Value : the property's value should be a string, corresponding to the name of the Roam tag/page to use to categorize the type of the item.

For example, defining typemap.bookSection with the value 'Chapter' will have the extension create a block Type:: [[Chapter]] instead of Type:: [[Book Section]] for items of type bookSection.

Usage in the extension

The utility function zoteroRoam.formatting.getItemType function (which is called in ) looks for an item type's label in zoteroRoam_settings.typemap (if it exists), otherwise it falls back on the extension's default typemap object (zoteroRoam.typemap).

If you've defined your own formatting functions, and never use getItemMetadata, then you probably don't need typemap - unless you're using in your own functions.

Examples

Assigning custom labels for a few item types :

// Other item types will be associated with their label from zoteroRoam.typemap

zoteroRoam_settings = {
    // dataRequests: {...},
    typemap: {
        bookSection: 'Chapter',
        conferencePaper: 'Paper',
        journalArticle: 'Paper'
    }
}
๐Ÿ› ๏ธ
โœ๏ธ
here
zoteroRoam.formatting.getItemType
getItemMetadata