Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8921521
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T06:33:56+00:00 2026-06-15T06:33:56+00:00

Pandoc-style citations Pandoc uses a Markdown format that supports automatic citations using keys from

  • 0

Pandoc-style citations

Pandoc uses a Markdown format that supports automatic citations using keys from BibTeX files. Some examples for the format are:

Blah blah [@doe99]

Blah blah [@doe99, p.33]

Blah blah [see @doe99, pp. 33-35; also @smith04, ch. 1].

Emacs and Pandoc/Markdown

There is a Pandoc-Mode for interacting with Pandoc through Emacs which can be combined with Markdown-Mode. Pandoc-Mode and Markdown-Mode don’t support autocompletion of citations from bibtex files. A mode that has this kind of support for TeX files is Reftex. I am looking for a way to get Reftex-style autocompletion when editing Markdown files.

Autocompletion in other editors

There is a solution for Textmate: Autocomplete pandoc-style citations from a bibtex file in textmate.

The feature is also in Vim-Pandoc:

Autocompletion was implemented by hacking away at LaTeX Box’s
implementation of bibtex citation completion, even if the results
don’t look much like the original.

How can I get autocompletion for pandoc-style citations from a bibtex file in Emacs?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T06:33:58+00:00Added an answer on June 15, 2026 at 6:33 am

    To do this you can use reftex-citation.

    Setup

    Enable RefTeX

    You have to enable RefTeX for the file you are editing which can be done via M-x reftex-mode or by setting a file variable such as adding -*- mode: reftex; -*- to the first line of the file.

    Tell RefTeX where you bibliography is

    You need to tell RefTeX where your bibliography file is. This can be done by adding the following to your .emacs (and editing the path according to your setup):

    ;; So that RefTeX finds my bibliography
    (setq reftex-default-bibliography '("path/to/bibfile.bib"))
    

    Note that reftex-default-bibliography is a list, so you can add several paths to it.

    If you use different bibliographies for different files it might be preferable to tell RefTeX of the bibliography from each file. I am afraid I only know of an ugly way to do this. The idea is that since RefTeX can extract the correct bibliography from LaTeX macros you can embed a LaTeX macro in a comment. Thus, you can add such a comment along with the specification of bibliography to Pandoc:

    bibliography::bibliography_name.bib
    <!-- \bibliography{bibliography_name} So that RefTeX knows about the bibliography -->
    

    Tell RefTeX how to format citations

    To get reftex-citation to insert in the format used by Pandoc you have to customize reftex-cite-format such as inserting the following into your .emacs:

    (eval-after-load 'reftex-vars
      '(progn 
         (setq reftex-cite-format '((?\C-m . "[@%l]")))))
    

    You may wan to include other formats too. For instructions on how to do this see https://tex.stackexchange.com/a/31992/5701. Note that this setting is global so that if you also use RefTeX for LaTeX it will also be affected.

    Use

    To insert a citation either do M-x reftex-citation or C-c [ then press Enter and you are allowed to insert a search term for searching in your bibliography. RefTeX will then insert the key of the bibliography item you selected in Pandoc format.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using the amazing Pandoc to convert from Markdown to the Slidy slideshow format.
Is there a LaTeX style, header, or something so that e.g. markdown2pdf from pandoc
I want to write a program that uses the GPL-licensed pandoc for Markdown processing.
How to add table of contents to R Markdown HTML file using pandoc but
I'm creating a docx file from an HTML page using pandoc , but for
Using snap , I wrote a splice creating text from markdown, using this function:
When attempting to use pandoc to convert JSON based files (.ipynb) from iPython notebook
I want to use some Haskell libraries (e.g. Darcs, Pandoc) from Python, but it
I am having problems calling pandoc from python using subprocess.Popen . It all works
Is there a .net api that can do this? I saw Pandoc has a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.