Skip to content
Visual Studio Code extension for autocompleting citations for Pandoc/Markdown documents
TypeScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode Init commit Aug 6, 2018
imgs
src Terminate completionProvider if invoking character is not '@' Mar 7, 2019
syntaxes Fix highlighting for -@key Nov 14, 2018
.gitignore Init commit Aug 6, 2018
.vscodeignore
CHANGELOG.md
LICENSE
README.md
icon.png
package-lock.json Update dependncies because of vulnerability warning Sep 11, 2019
package.json
tsconfig.json
tslint.json

README.md

Pandoc Citer Extension for Visual Studio Code

This extension provides autocompletion of citations stored in a bibtex file, for use with pandoc-markdown documents.

Features

Autocomplete citations

Example of citation autocomplete

  • Citations follow the standard syntax recognized by pandoc-citeproc, i.e.:
    • Citation syntax: @BibKey or [@bibKey]
      • Typing '@' should automatically trigger the suggestion window to show up. If not, try Ctrl + Space.
      • The suggestion window (probably) won't trigger if the @ is right after some text without a space, i.e. text@ won't trigger the suggestions but text @ will. This restriction was made so that typing an email address won't trigger the citation suggestions.
    • The YAML should contain the line
    bibliography: [path/to/.bib]
    
    • The path/to/.bib should be enclosed by square brackets, and could be either a relative or absolute path
    • Multiple bib files can be included if separated by comma, e.g. [path/to/refsA.bib, path/to/refsB.bib]

Configuration

  • PandocCiter.ViewType
    • Type: String, either "inline" (default) or "browser"
    • Function: Changes how the suggested citations are shown
  • PandocCiter.RootFile
    • Type: String, path to markdown file
    • Function: This is useful if there are multiple markdown files with one external master file containing the YAML header with the bibliography: [path/to/bib] entry. This avoids having to insert the bibliography YAML header into each individual file.
  • PandocCiter.DefaultBib
    • Type: String, absolute path to bib file
    • Function: This is useful if there is a default bib file that is preferred for all projects. This bib file will be loaded regardless of whether or not a YAML entry is included.
  • PandocCiter.UseDefaultBib
    • Type: Boolean, default is True
    • Function: This should be a project-specific setting. It is useful when a DefaultBib is defined but you don't want it to be used for a specific project.
  • PandocCiter.ShowLog
    • Type: Boolean, default is False
    • Function: This will show a log in the Output panel, useful for answering questions like "Why isn't the extension finding my bib file?". The Output panel can be accessed via VSCode Top Menubar -> View -> Output which will open a panel at the bottom. Select PandocCiter from the drop down list, and the extension's log should show up.

Acknowledgements

  • This extension is essentially a stripped down version of the LaTeX-Workshop extension that has been adjusted for markdown/pandoc
    • The structure of the src directory was preserved, so that any updates/fixes here could also be ported to LaTex-Workshop, and vice versa
You can’t perform that action at this time.