Closed fredcallaway closed 8 years ago
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:
1) A command-line argument to pandoc-fignos (used with pipe chains in my regression tests); 2) The version of the parent process (usually pandoc); and 3) The version of whatever pandoc is available from the command line.
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 entry['command']
is "pandoc-eqnos". I'm not sure about arguments. I think the writer is the first argument.
It seems that (3) should work here though, because I can indeed call pandoc -v
from a terminal.
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, Fred
On Apr 27, 2016, at 9:25 PM, Thomas J. Duck notifications@github.com wrote:
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?
— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/tomduck/pandoc-eqnos/issues/12#issuecomment-215280564
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, Tom
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