# Marked does not read csl file

#### S

29 Jun, 2017 05:09 PM

Hello everybody,

I am trying to run Pandoc in Marker to compile a Scrivener file.

I use the following commands:

The csl file was being read without problems with the same commands when using Pandoc in the terminal.

Instead Marker gives me an error:

pandoc: Error running filter pandoc-citeproc
Filter returned error status 1

Basically it compiles everything except the citations.
I would like to use Marker for controlling the citations output since I am new to pandoc and markdown.

1. Support Staff Posted by Brett on 29 Jun, 2017 05:28 PM

Try using a full path instead of the ~ (e.g.
/Users/somebody/Desktop...). Marked runs commands outside of your own
shell environment, so the \$HOME directory that the ~ references is
different.

-Brett

2. Posted by S on 29 Jun, 2017 06:00 PM

Thanks, I tried but unfortunately I get the same error:

pandoc: Error running filter pandoc-citeproc
Filter returned error status 1

I found the following alternative online, but honestly I don't know how to implement it; where should I write the bash script?

"It’s possible (quite easy) to set up the excellent Marked 2 app with pandoc as a processor (you can choose the processor in Marked’s preferences). It requires a short bash script to call the pandoc command, since marked seems to struggle with arguments. You can make the script executable with a chmod +x and set it as Marked’s processor in the preferences. An example script would be thus, if you replace the CAPS with your own data (assuming you use ~/.pandoc/ as your repository for the above ‘useful little files’):"

1 #!/bin/sh
2 export HOME=/Users/YOUR_USER/
3 pandoc -r markdown -w html -s -S --normalize --bibliography ~/.pandoc/YOUR_BIBLIOGRAPHY.bib --csl ~/.pandoc/YOUR_CITATION_STYLE.csl

3. Support Staff Posted by Brett on 29 Jun, 2017 06:05 PM

You'd want to completely remove the tilde (~) and have the path begin
with a /: --csl /Users/S/Downloads/apa.csl

The bash script solution would work, you'd just want to create it as a
text file in any location (I'd suggest a folder in your home directory
called "scripts", so the path would be ~/scripts/pandoc.sh). Then just
copy the path to the script into the custom processor field, replacing
the whole pandoc command.

-Brett

4. Posted by S on 29 Jun, 2017 06:11 PM

Thank you! I removed the tilde and I also wrote the whole path for the bib file. It works now.

This is the edited pandoc command:

5. Support Staff Posted by Brett on 29 Jun, 2017 06:36 PM

-Brett

Comments are currently closed for this discussion. You can start a new one.

# Keyboard shortcuts

### Generic

? Show this help Blurs the current field

### Comment Form

r Focus the comment reply box Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

## Recent Discussions

 06 Mar, 2021 09:34 PM appears in display 01 Mar, 2021 02:00 PM Rendering Mermaid 01 Mar, 2021 01:56 PM Source Line Numbers 26 Feb, 2021 02:24 PM *manual* refresh needed when using mathjax from script 24 Feb, 2021 06:25 AM pdflatex not found

## Recent Articles

 Intra-document links in exported PDFs Using Ulysses with Marked Fenced code blocks inside indented code blocks Using JavaScript in Marked Custom CSS: Writing custom CSS for Marked