Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

:Pandoc command does nothing in nvim #439

Open
leou opened this issue Jan 16, 2023 · 5 comments
Open

:Pandoc command does nothing in nvim #439

leou opened this issue Jan 16, 2023 · 5 comments

Comments

@leou
Copy link

leou commented Jan 16, 2023

I'm new to vim-pandoc and vim-pandoc-syntax. I'm using nvim version v0.8.2 on Arch Linux and have installed only those two plugins with vim-plug. Python3 version is 3.10.9, pandoc version 2.19.2. I can run pandoc in the command line with no problem to create pdf or html files from markdown source files.

When I run :Pandoc html or :Pandoc pdf while editing a markdown file nothing happens, no warning or error messages appear and no pdf or html files are created in the directory where the markdown file is located.

I'd appreciate any help to figure out why it does not work.
Leo

@mBaratta96
Copy link

Same problem here. Nvim v0.8.3 on Ubuntu. Installed with packer

@mBaratta96
Copy link

#152 seems to be the solution.

@muziejus
Copy link

muziejus commented Jun 9, 2023

I think I have a variant of this problem. Nvim 0.9.0 on MacOS 13.4. Concretely, given a markdown file:

  • :Pandoc pdf does nothing.
  • :Pandoc -t pdf -o out.pdf creates a pdf using the standard LaTeX template.
  • :Pandoc -t pdf --metadata-file metadata.yml -o out.pdf uses the global metadata file I have for all the documents in the folder and passes that metadata to the default LaTeX template.
  • :Pandoc -t pdf --metadata-file metadata.yml --template math-lecture-notes.tex -o out.pdf does nothing.

By "does nothing," I mean there is no error, nothing shows up in :messages, and no pdf appears in the directory.

This is the command I use on the command line, which works fine:

pandoc 07.md --pdf-engine=xelatex --metadata-file=metadata.yml --template=math-lecture-notes.tex -o out.pdf

The markdown file is simply:

---
title: Lecture 07
date: 13 June 2023
---

Hello.

@muziejus
Copy link

I'm still not sure why the command worked with the examples like :Pandoc -t pdf -o out.pdf above, but I finally got vim-pandoc to work what seems like correctly (I still can't get the workflow completely reproduced, but I at least get the "pandoc-execute" terminal and :Pandoc html produces a file.)

In https://github.com/benbrastmckie/.config, @benbrastmckie mentions installing pynvim. I had never installed this. Once I installed it, things started to work ok. @leou have you installed it?

Screenshot 2023-06-14 at 11 08 35 AM

@muziejus
Copy link

I can confirm that I can reproduce:

pandoc 07.md --pdf-engine=xelatex --metadata-file=metadata.yml --template=math-lecture-notes.tex -o out.pdf

with

:Pandoc! pdf --metadata-file metadata.yml --template "math-lecture-notes.tex" -o out.pdf

in nvim. It seems like the . in the template name causes an issue, so I have to surround the template name in quotes.

Now to get fancy with vim-pandoc templates!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants