Giter VIP home page Giter VIP logo

citar-org-roam's Introduction

https://melpa.org/packages/citar-org-roam-badge.svg

citar-org-roam

An emacs package to provide tighter Citar and Org-Roam integration.

Features

Out-of-box, Citar provides default support for file-per-note bibliographic notes that are compatible with Org-Roam v2. This package integrates directly with the Org-Roam database, and provides the following additional features to Citar note support:

  1. multiple references per note
  2. multiple reference notes per file
  3. ability to query note citations by reference
  4. “live” updating of Citar UI for presence of notes
  5. support for org-roam capture templates

Screenshot

images/open-screenshot.png

Installation

This package is available via MELPA.

Configuration

Activating citar-org-roam-mode will configure Citar to use these functions.

(use-package citar-org-roam
  :after (citar org-roam)
  :config (citar-org-roam-mode))

Templates

To change the default note title output, you can modify the citar-org-roam-note-title-template variable:

(setq citar-org-roam-note-title-template "${author} - ${title}")

This will set the title in the org-roam database, and therefore the completion interface.

To format the actual note file, specify which of the org-roam-capture-templates to use for bibliographic note formatting. As an example, with org-roam-capture-templates defined like so:

(setq org-roam-capture-templates
      '(("d" "default" plain
         "%?"
         :target
         (file+head
          "%<%Y%m%d%H%M%S>-${slug}.org"
          "#+title: ${note-title}\n")
         :unnarrowed t)
        ("n" "literature note" plain
         "%?"
         :target
         (file+head
          "%(expand-file-name (or citar-org-roam-subdir \"\") org-roam-directory)/${citar-citekey}.org"
          "#+title: ${citar-citekey} (${citar-date}). ${note-title}.\n#+created: %U\n#+last_modified: %U\n\n")
         :unnarrowed t)))

… if you then want to use your “literature note” template for new bibliographic notes, you can set citar-org-roam-capture-template-key to its key:

(setq citar-org-roam-capture-template-key "n")

In that example template, the note-title template variable includes the formatting noted above for new note titles as specified in citar-org-roam-note-title-template. Note also the template includes some citar-related template variables, including citar-date. This is an example of data passed from citar to the capture template, the details of which you can configure in citar-org-roam-template-fields.

Usage

The citar-open-notes and citar-open commands will work as normal, but will use org-roam to open notes.

To define a sub-file node as a bibliographic note (ref node), use citar-org-roam-ref-add to add the ROAM_REF to the node at point.

Beyond that, the only interactive command this package provides is:

  • citar-org-roam-cited: presents a list of notes that cite the selected references

citar-org-roam's People

Contributors

bdarcus avatar c1-g avatar qingshuizheng avatar roshanshariff avatar tabroughton avatar trembel avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.