-
Notifications
You must be signed in to change notification settings - Fork 27
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
Cannot determine pandoc version when run with panzer #12
Comments
I just hardcoded my pandoc version into the file. I wonder if it might be better to just assume the most recent version if you can't get the version, with a warning message of course. |
Thanks for the feedback, @fredcallaway. This is an issue because pandoc doesn't provide filter authors with version information. See pandoc Issue #2640. Can you please tell me how panzer calls pandoc with the pandoc-fignos filter? e.g., Is python's subprocess module used? If so, what does the call look like? Pandoc-eqnos checks for version information by testing for:
These are in order of precedence. The first check that succeeds wins. If none of these checks can be made to work for you then we will add another. There should be no need to hard-code version information into pandoc-fignos itself. |
subprocess is used. Here's an excerpt: command = [entry['command']] + entry['arguments']
...
process = subprocess.Popen(command,
stderr=subprocess.PIPE,
stdin=subprocess.PIPE,
stdout=subprocess.PIPE) I think It seems that (3) should work here though, because I can indeed call |
I see the problem. You are using pandoc-fignos in a pipe chain, and so the parent process is panzer. (2) is succeeding when it should not. (1) is an option, but (3) would be better. Let me get back to you. |
I reworked the version detection code (again!) and posted pandoc-eqnos 0.10 to pypi. It should work for you. Can you give it a test and let me know? |
Well done! Will you port this to fignos as well? If so, I’ll start tracking version there as well. Cheers,
|
Thanks! Yes, I have already pushed the updated code for fignos and tablenos to GitHub. I'm working on a few other fignos Issues, and expect to have a new release ready in the next few days. Soon enough? Cheers, |
I'm refactoring pandoc-fignos to support some fancy new features. The updates for this Issue will go out at the same time. Stay tuned... |
Oh boy! I'm crossing my fingers for "Figure 2 on page 4" |
I just posted a new release to pypi that has this feature. Thanks again for your feedback. Please let me know if you have any trouble with it. Note that pandoc-fignos/eqnos/tablenos now have clever referencing. Fun! |
https://github.com/msprev/panzer
The text was updated successfully, but these errors were encountered: