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

Arguments in "Create a PDF" are in the wrong order #38

Closed
zspitz opened this issue Feb 6, 2020 · 2 comments
Closed

Arguments in "Create a PDF" are in the wrong order #38

zspitz opened this issue Feb 6, 2020 · 2 comments

Comments

@zspitz
Copy link

zspitz commented Feb 6, 2020

The manual, under the section Creating a PDF states:

To produce a PDF, specify an output file with a .pdf extension:

pandoc test.txt -o test.pdf

AFAICT the arguments are in the wrong order; the input file has to follow all other arguments.

pandoc -o test.pdf test.txt

I stumbled on this because I kept on getting Unexpected newline when doing something similar in a GitHub Action.

@tarleb
Copy link
Contributor

tarleb commented Feb 6, 2020

What you are seeing is not a pandoc problem, but caused by the way you are interacting with the pandoc docker image: when calling docker, the first argument is expected to be the executable to run in the container. Usually, that will be pandoc, but could also be bash etc. However, we try to detect if no executable was given, in which case pandoc is assumed. This detection works best if the first argument is an option, but seems to have failed in your case.

You could raise an issue on pandoc/dockerfiles if you believe the auto detection could be improved.

@jgm
Copy link
Owner

jgm commented Feb 6, 2020

That's correct: in pandoc they can be in either order.

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