How to change Pandoc's citation style from default to APA when Pandoc it custom word processor I Marked 2?

Simon's Avatar


27 Feb, 2019 07:33 AM


I have Pandoc 2.6 as a custom word processor in Marked 2. I use a .bib file for generating my citations. It works great and now I wanna change the citation-style from the default Chicago-author-date to APA. I have searched on the internet and found (what I think) can be possible solutions but I have not been able to find a complete guide that is easy to follow. I don't have the knowledge to determine whats the easiest way to go. Whats the best solution to solve this problem?

Can this be possible solution alternatives:
1. I installed a program called pandoc-citeproc but I don't know how to implement it to my situation.

2. I have found that at a command like these maybe can solve this ”—csl /Users/S/Downloads/apa.cslshell” or something called bash script to call the pandoc command.

3. Can this be solved with MMD3 metadata, YAML frontmatter (or something else)?

At the moment this is what i have under the advanced tab in Marked 2:
Path: /usr/local/bin/pandoc
Args: -f markdown -t html5 --bibliography=/Users/USR/Desktop/References.bib -s


  1. Support Staff 1 Posted by Brett on 27 Feb, 2019 04:58 PM

    Brett's Avatar

    Hi Simon,

    The solution will be handled through the arguments of the custom
    processor, but I'm not well-versed enough with Pandoc to provide any
    support on figuring those out. If you do end up needing to run multiple
    commands, I'm happy to demonstrate how to create a bash script, but
    ideally you'll find the options required to get the results you want
    from the command line and then transfer those to Marked's settings.


  2. 2 Posted by Simon on 01 Mar, 2019 07:35 AM

    Simon's Avatar

    Thank you for answering.
    Is a bash script used when I wanna combine multiple commands and don't want to write it all in the Args field?
    What I have done so far is to use this command into the Args field;

    -f markdown -t html5 --bibliography=/Users/S/Desktop/References.bib -s --csl /Users/S/Downloads/apa.csl

    But it crashing.

    Can you help me make these commands into a bash script and guide me where I should put things?



  3. Support Staff 3 Posted by Brett on 01 Mar, 2019 02:53 PM

    Brett's Avatar

    Like I've said, my experience with Pandoc is limited enough that I can't immediately discern what might be wrong with your arguments line. It looks fine from a syntax standpoint, but you need to verify that it works from Terminal before looking for the issue in Marked.

    In Terminal, run

    cat [] | /usr/local/bin/pandoc -f markdown -t html5 --bibliography=/Users/S/Desktop/References.bib -s --csl /Users/S/Downloads/apa.csl

    And ensure you get the results you expect. If that works, let me know and we can try to debug the issue in Marked.


  4. 4 Posted by Simon on 03 Mar, 2019 07:14 PM

    Simon's Avatar


    When I run the command in the terminal I get this:
    [WARNING] This document format requires a nonempty <title> element.
      Please specify either 'title' or 'pagetitle' in the metadata,
      e.g. by using --metadata pagetitle="..." on the command line.
      Falling back to 'Untitled'

    Any ideas?

  5. Support Staff 5 Posted by Brett on 03 Mar, 2019 07:33 PM

    Brett's Avatar

    Are you passing the text of your document to the command? It should look

         $ cat | [your command]

    If that's already in place, I'm afraid I can't help much further. This
    is more of a Pandoc question than a Marked issue.


  6. 6 Posted by Simon on 03 Mar, 2019 08:03 PM

    Simon's Avatar

    I think my knowledge is to limited in the subject.

    Thanks any way :)

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac