JmRq Posted November 22, 2018 Share Posted November 22, 2018 (edited) I can't seem to get Alfred to run a pandoc conversion to pdf. Neither of the pandoc commands bellow will run in Alfred but I have confirmed that xelatex and pdflatex are installed, and both run perfectly fine in Terminal and from my FastScripts menu, so it seems the issue is with Alfred. I am specifying the full path to pandoc (/usr/local/bin/pandoc) so this is not a path issue (as mentioned here: https://github.com/shawnrice/alfred-documentation/wiki/Environmental-Variables). I'm fairly certain it's exclusively a PDf (xelatex, pdflatex) issue because pandoc conversions to HTML run perfectly fine for me in Alfred. This syntax is directly from Pandoc Demos (https://pandoc.org/demos.html) and runs perfectly fine in my Terminal: /usr/local/bin/pandoc ~/Desktop/MANUAL.txt --pdf-engine=xelatex -o ~/Desktop/example13.pdf But produces the following error when called within a "Run Script" action (Language /bin/bash/) in Alfred: [ERROR: action.script] xelatex not found. Please select a different --pdf-engine or install xelatex This syntax also runs perfectly fine in Terminal: /usr/local/bin/pandoc ~/Desktop/MANUAL.txt -o ~/Desktop/example13.pdf But produces the following error when called within a "Run Script" action (Language /bin/bash/) in Alfred: [ERROR: action.script] pdflatex not found. Please select a different --pdf-engine or install pdflatex Both of these also fail with I run them in an external shell script called from Alfred. What am I missing? Edited November 22, 2018 by JmRq question was answered Link to comment
deanishe Posted November 22, 2018 Share Posted November 22, 2018 Try adding this at the top of the bash script: export PATH=/usr/local/bin:$PATH Link to comment
JmRq Posted November 22, 2018 Author Share Posted November 22, 2018 2 hours ago, deanishe said: Try adding this at the top of the bash script: export PATH=/usr/local/bin:$PATH deanishe, thank you for the recommendation. That didn't quite work, but your suggestion got me thinking about latex path issues. Turns out, the issue was with /Library/TeX/texbin. I found a stack overflow thread that recommended: export PATH=/Library/TeX/texbin:$PATH Adding that to the top of the bash script worked. deanishe, thanks again, you got me pointed in the right direction! deanishe 1 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now