DCsunset / pandoc-include

A pandoc filter to allow file and header inclusion
MIT License
63 stars 14 forks source link

Could not find executable pandoc-include #1

Closed espetro closed 5 years ago

espetro commented 5 years ago

Hey @DCsunset ,

Thanks for this cool Pandoc feature. While trying it on Windows 10, running pandoc paper.md --filter pandoc-include -o output.pdf gives me:

Error running filter pandoc-include:
Could not find executable pandoc-include

My paper.md file follows the same syntax as the example provided, although it seems a binary problem. If I search the other Pandoc filters I use, they're all in the Scripts/ folder inside Anaconda. However, I cannot find pandoc-include.

where pandoc-*
...\Anaconda3\Scripts\pandoc-citeproc.exe
...\Anaconda3\Scripts\pandoc-eqnos.exe
...\Anaconda3\Scripts\pandoc-fignos.exe
...\Anaconda3\Scripts\pandoc-tablenos.exe

Any ideas? Thanks in advance!

DCsunset commented 5 years ago

Hi @espetro ,

Since this script is written in python, it doesn't have a binary file. Instead, it uses Python to execute the script. So do you install the filter using pip and have Python installed?

ikalogic commented 5 years ago

Hi,

I have exactly the same problem.

I did install the script using pip and I have pytton installed...

DCsunset commented 5 years ago

@ikalogic Could you provide your pip version and list the directory where pandoc-include is installed?

ikalogic commented 5 years ago

Thank you very much for your quick response!

here is what i find:

C:\Windows\System32>pip -V
pip 19.2.2 from c:\python37\lib\site-packages\pip (python 3.7)

C:\Windows\System32>where pandoc-*
C:\Program Files\Pandoc\pandoc-citeproc.exe

Doing manual search, I find pandoc-include.exe somewhere in my user/roaming/ directory... I'll try to copy paste it in the same folder as pandoc and see what happens

ikalogic commented 5 years ago

Yup! that fixed it, i just had to copy/paste pandoc-include.exe in the same directory as pandoc, that is, here: C:\Program Files\Pandoc

Thanks!

DCsunset commented 5 years ago

Thanks for your information. It seems that the pandoc-include executable should be put in the directory in PATH environment.

I will update it in the README.md.