How to change Pandoc's citation style from default to APA when Pandoc it custom word processor I Marked 2?
Hello!
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. http://support.markedapp.com/discussions/problems/139702-marked-does-not-read-csl-file.
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
Thanks.
Keyboard shortcuts
Generic
? | 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
Support Staff 1 Posted by Brett on 27 Feb, 2019 04:58 PM
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.
-Brett
2 Posted by Simon on 01 Mar, 2019 07:35 AM
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?
Thanks
Simon
Support Staff 3 Posted by Brett on 01 Mar, 2019 02:53 PM
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
And ensure you get the results you expect. If that works, let me know and we can try to debug the issue in Marked.
-Brett
4 Posted by Simon on 03 Mar, 2019 07:14 PM
Thanks.
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?
Support Staff 5 Posted by Brett on 03 Mar, 2019 07:33 PM
Are you passing the text of your document to the command? It should look
like
$ cat FILENAME.md | [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.
-Brett
6 Posted by Simon on 03 Mar, 2019 08:03 PM
I think my knowledge is to limited in the subject.
Thanks any way :)