Pandoc generation fails to files with russian symbols
buzmakov opened this issue · 7 comments
Pandoc don't generate any files if text contains russian (cyrillic) simbols.
for example simple md-code on which nothing happens:
# Фига
For myself I run pandoc with parameter -V lang:russian
to supprt russian symbols.
Hi. I've tried to fix this problem. Please upgrade and see whether it is resolved.
Thannks.
Hi,
generation of html and docx now work fine! Thanks.
But pdf-generation is broken.
If I try "create PDF file" - nothing happens.
If I try "create and view PDF" - my default pdf-viewer started (this is progress from earlier version)? but give me error message "Unable open file. File type plain text document (text/plain) is not supported'
Hi.
pandoc by default use pdflatex as the engine for generating PDF. so make sure you have that available.
However, it might not be available in the PATH of sublime text 2. So I add an setting "tex_path" in package settings. Add the path of pdflatex to that settings.
You can type "which pdflatex" to see the path, mine is:
/usr/local/texlive/2011/bin/x86_64-darwin/pdflatex
so I add /usr/local/texlive/2011/bin/x86_64-darwin/ to the tex_path in SmartMarkdown package settings.
If you don't have pdflatex installed, download it from here: http://www.tug.org/mactex/2012/
Thanks!
I've add '/usr/bin' in settings file and now pdf-files without russian symbols generates well,
but if file contains russian symbols I get error
Unable to execute Pandoc.
Details: Command '['pandoc', '/tmp/tmpU30dfk.md', '-o', u'/home/makov/Desktop/papers/xrayopt_2012/xrayopt2012_buzmakov.pdf']' returned non-zero exit status 43"
Ubuntu 12.04 x64
This will fix it:
- Upgrade the package
- In the setting, specify the pandoc_args, using -H and a template file, such as
"pandoc_args": ["-H", "template.latex"]
The path of this template file can be relative to your current editing file; if you are editing a buffer without associated filename, it has to be absolute.
the content of the template file should be:
\usepackage[russian]{babel}
Thanks,
all works now !
I realized that this setting would work on html, docx too, and would interfere the result unintentionally.
I added type-specific arguments in the setting, there are:
pandoc_args_pdf
pandoc_args_html
pandoc_args_docx
and also pandoc_args for common arguments.
Thanks for your bug report. Just started working on better Pandoc integration. More stuff would be brought about soon.