Closed a59 closed 10 years ago
Glad you are interested in the package. To generate PDFs you need LaTeX installed on your machine. I believe mactex is the easiest option (I am a Windows user so you may do more research).
Give that a shot and see if it let's you generate PDFs. You can create your own output transformations by following the examples in the default settings. I usually copy the default transformations into my user settings file and edit from there.
Hope that helps. On Apr 29, 2014 6:04 PM, "a59" notifications@github.com wrote:
I am trying SublimeText3 on OS X and have installed the Pandoc package.
I don't know if I have to do anything else to set this up and can't find any other instructions but when I select Pandoc I only get four options
PDF Microsoft Word HTML5 Markdown (Pandoc)
I tried PDF and got this error.
Error when running:
/usr/local/bin/pandoc -f markdown -o /var/folders/cr/4qc8w69d2v17nvgmt0phxxh80000gp/T/tmp25n8ls.pdf
pandoc: pdflatex not found. pdflatex is needed for pdf output.
I also tried Microsoft Word, but it seem to want to open Word, which I don't have on my Mac.
Where can I look for instructions on how to fix these problems?
— Reply to this email directly or view it on GitHubhttps://github.com/tbfisher/sublimetext-Pandoc/issues/21 .
I should have said I do have LaTeX installed and can successfully run pandoc from the command line to create PDFs and docx files. On Apr 29, 2014 8:38 PM, "Peter Yates" notifications@github.com wrote:
Glad you are interested in the package. To generate PDFs you need LaTeX installed on your machine. I believe mactex is the easiest option (I am a Windows user so you may do more research).
Give that a shot and see if it let's you generate PDFs. You can create your own output transformations by following the examples in the default settings. I usually copy the default transformations into my user settings file and edit from there.
Hope that helps. On Apr 29, 2014 6:04 PM, "a59" notifications@github.com wrote:
I am trying SublimeText3 on OS X and have installed the Pandoc package.
I don't know if I have to do anything else to set this up and can't find any other instructions but when I select Pandoc I only get four options
PDF Microsoft Word HTML5 Markdown (Pandoc)
I tried PDF and got this error.
Error when running:
/usr/local/bin/pandoc -f markdown -o /var/folders/cr/4qc8w69d2v17nvgmt0phxxh80000gp/T/tmp25n8ls.pdf
pandoc: pdflatex not found. pdflatex is needed for pdf output.
I also tried Microsoft Word, but it seem to want to open Word, which I don't have on my Mac.
Where can I look for instructions on how to fix these problems?
— Reply to this email directly or view it on GitHub< https://github.com/tbfisher/sublimetext-Pandoc/issues/21> .
— Reply to this email directly or view it on GitHubhttps://github.com/tbfisher/sublimetext-Pandoc/issues/21#issuecomment-41749039 .
if you can use pandoc to create pdf's you should be able to configure this plugin to run pandoc in the same way.
This plugin tells you what command it is trying to run. How does that differ from how you are generating pdf's with pandoc?
The plugin is trying to run
/usr/local/bin/pandoc -f markdown -o /var/folders/cr/4qc8w69d2v17nvgmt0phxxh80000gp/T/tmpymz_vc.pdf
when I run
/usr/local/bin/pandoc -f markdown -o test.pdf test.md
on the same file from the command line, it works.
Is this a PATH problem from within the Sublime Text environment?
It was a PATH problem.
The default path in Sublime Text is
/usr/bin:/bin:/usr/sbin:/sbin
and I have pdflatex in
/usr/texbin
so I added a python script to modify the default path as described here
http://robdodson.me/blog/2012/05/14/hacking-the-path-variable-in-sublime-text/
Maybe there is a better way of setting the PATH in Sublime Text or within the Pandoc plugin.
Ah. I found the right line in the preferences to set
"--latex-engine=/usr/texbin/pdflatex",
where is this added? I have the exact same problem and can't manage to fix it. Already changed every pdflatex path I found to the current correct one: "/Library/TeX/texbin/pdflatex" (yosemit/el capitan changes) but I still can't manage it to run. Always complaining about not finding pdflatex. Any hints?
I changed in the user Pandoc.sublime-settings the following lines:
"pandoc-path": "/usr/local/bin/pandoc",
and
"PDF": { "scope": { "text.html": "html", "text.html.markdown": "markdown" }, "pandoc-arguments": [ "-t", "pdf", "--latex-engine=/Library/TeX/texbin/pdflatex"
works fine now!
I am trying SublimeText3 on OS X and have installed the Pandoc package.
I don't know if I have to do anything else to set this up and can't find any other instructions but when I select Pandoc I only get four options
PDF Microsoft Word HTML5 Markdown (Pandoc)
I tried PDF and got this error.
Error when running:
/usr/local/bin/pandoc -f markdown -o /var/folders/cr/4qc8w69d2v17nvgmt0phxxh80000gp/T/tmp25n8ls.pdf
pandoc: pdflatex not found. pdflatex is needed for pdf output.
I also tried Microsoft Word, but it seem to want to open Word, which I don't have on my Mac.
Where can I look for instructions on how to fix these problems?