Closed viking-frank closed 5 years ago
Hey Frank, thanks for reporting. Do you know in which part of the toolchain the problem occurs? I suspect that when you generate the PDF through Anki and when you generate it by hand, actually, different PDF's are generated.
Maybe try the following:
Reduce the toolchain to the first entry:
latex.pngCommands = [
["xelatex", "-interaction=nonstopmode","tmp.tex"]
]
Review the card in question. Probably Anki will generate an Error now (no png is generated). Go to tmp folder and look at the PDF. Does it look ok? Then manually run pdfcrop on it. Does it succeed?
Regards, Franz
Thanks for your reply.
I have done what your said.
Anki produced the error and i have investigated the pdf file. It looked like i expected . Then i called pdfcrop (with the same flags as above) that gives me the pdf without the margins as expected. after that calling convert on this produced the expected png file.
Just in case someone is interested: I was able to resolve the problem by setting the environment variable right. I have added
import os
os.environ("LD_LIBRARY_PATH") = ":/usr/local/lib64:/usr/local/lib64"
in the edit_latex_toolchain.py
Hey, thanks a lot for coming back and posting your solution! Franz
Hey, I use the plugin with the follwing code to be able to render tikz pictures correctly.
Calling these files from the cmdline by hand on the tmp.tex generated by anki gives the expected output, but when trying to compile the anki entry
anki reports the following:
Currently using the anki 2.1 43 beta build