Closed bcdavasconcelos closed 3 years ago
The paths in the pandocomatic YAML file needed normalizing. Fixed. Now it works again for docx and latex. Only for PDFs I can't seem to make it work again. There is no error msg, it just hangs in there indefinitively.
Is the error for the PDF the same as for the other two formats? And can you create a minimal example? That is the smallest possible markdown file and template where this issue does occur? That would allow me to reproduce it as well.
Hi. Apologies for the delay. Not really. It converts without any problems to latex, but invariably gets stuck in the pdf conversion. I am still trying to isolate the problem, but no luck so far.
Maybe the issue is with LaTeX? Instead of directly converting to PDF with pandoc, can you convert it to LaTeX instead and then run xelatex on it manually? Also, you might try a different LaTeX engine, like lualatex, to see if that makes a difference.
I should have mentioned from the start that pandoc is working fine. I can convert from latex to PDF without any problems.
Can you create a smaller example with a pandocomatic template or configuration file that does not contain any references to files on your system? That should allow me to try to reproduce the issue, or, if the issue then disappears, help you pinpointing the issue.
@bcdavasconcelos -- there are two options for automatically getting the PDF, the first is to use Pandoc which is what your template is currently doing. But at least for scrivomatic, you can pass --build
and it will run latexmk for you seperately to pandoc (so make sure your template compiles to latex and then get scrivomatic to run pandocomatic). I added that as sometimes I need to run a post-processor on the latex file to fix some issues (which needs to run after pandoc has finished processing), so I specify the post-processor via pandocomatic, then get scrivomatic to run latexmk on the generated latex file. Perhaps that is also more reliable for you?
➜ scrivomatic -h
Scrivomatic V1.0.29
=======================
Scrivomatic is a wrapper around pandocomatic or panzer, that sets up the environment path, enforces UTF8 encoding and other settings so they can be run from any other process that may not do this (e.g. Scrivener).
Usage: scrivomatic [additional options] FILE
-i, --input FILE Input file
-o, --output [file] Output file. Optional for pandocomatic.
-t, --to [format] Pandoc Format. Optional for pandocomatic.
-y, --yaml [file] Specify which YAML file for pandocomatic.
-c, --command [command] Tool to use: [pandocomatic] | panzer
-p, --path [dirpath] Additional Path to Search for Commands.
-b, --build For LaTeX output, run latexmk
-B, --buildclean For LaTeX output, run latexmk and cleanup
-d, --dry-run Dry run.
-z, --data-dir [file] Pandoc data dir.
-v, --[no-]verbose Verbose output.
-l, --[no-]log View log in Console.app.
-h, --help Prints this help!
Thanks, @iandol. The odd thing is I am using the command as it appears in the Scrivomatic template. But when I try to build the PDF from Scrivener using Scrivomatic and Pandocomatic, it just lingers there. The same does not happen for latex and the like. Do you have any suggestions as to what I could attempt to pin-point the issue?
@bcdavasconcelos -- so just to be clear, if you run pandocomatic from the command-line it works fine, but if you run the same document and settings from Scrivener it hangs? The only way I can determine what is going on is if the error is output into the log file. In your first post, the error in the log file is that a script file is not found (that is different from the error in your title?), please check your paths to all your filters and pre/postprocessors.
If you can create a minimal test case, with a simplified markdown file, pandocomatic.yaml and only one document template being run it may narrow down the issue. At the moment you are running three templates (use-template: [docx-refs-crossref,abntex-o-matic-refs-crossref,abntex-o-matic-pdf-refs-crossref]) so it is really hard to follow along...
Sorry for taking so long to report back. The problem probably lies within Scrivener and it is connected to the one reported here. Once I had removed the logging, it started working again. Thanks again for the help and the great work on Pandocomatic and Scrivomatic, @htdebeer and @iandol.
Hi @htdebeer,
I have been running into this issue over and over again using Pandocomatic via Scrovomatic. I am trying to figure out whats wrong, but I thought I should chime in and see if you had any idea about what could be happening.
Log
YAML
These are the relevant settings:
Input text
And the input, something along these lines...
Even if you can't really help, I want to thank you for making and keeping Pandocomatic.
Bernardo