If I run the following
pretext -vv build -i src/Intro_Crypto_Main.ptx -p src/publication.xml -d output html
HTML output is generated fine but only SVG images are created for the latex images.
Trying to follow previous conversations I tried the output posted below, but go an error after it created a tex file, pdf, and svg for one image.
Suggestions I am open to suggestions. I am running Windows 10 and I think I have all the necessary components installed.
$ python c:/git/mathbook/pretext/pretext -vv -c latex-image -f all -d tmp_images src/Intro_Crypto_Main.ptx
Invalid Parameter - 300
PTX:DEBUG: Parsed CLI args {'verbose': 2, 'component': 'latex-image', 'format': 'all', 'publisher_file': None, 'stringparams': [], 'xmlid': '', 'server': None, 'data_dir': None, 'out': None, 'dir': 'tmp_images', 'abort': False, 'xml_file': 'src/Intro_Crypto_Main.ptx'}
PTX:DEBUG: Python version: 3.7 (expecting 3.4 or newer)
PTX:DEBUG: discovered distribution and xsl directories: c:\git\mathbook, c:\git\mathbook\xsl
PTX:DEBUG: executables in configuration file: {'tex': 'xelatex', 'pdfsvg': 'pdf2svg', 'asy': 'asy', 'sage': 'sage', 'pdfpng': 'convert', 'pdfeps': 'pdftops', 'pdfcrop': 'pdf-crop-margins', 'pageres': 'pageres', 'node': 'node', 'liblouis': 'file2brl'}
PTX: verifying and expanding input directory: tmp_images
PTX: input directory expanded to absolute path: C:\git\Inquiry-Into-Cryptology\tmp_images
PTX: verifying and expanding input file: src/Intro_Crypto_Main.ptx
PTX: input file expanded to absolute path: C:\git\Inquiry-Into-Cryptology\src\Intro_Crypto_Main.ptx
PTX: Done examining environment and initializing setup info
PTX: converting latex-image pictures from C:\git\Inquiry-Into-Cryptology\src\Intro_Crypto_Main.ptx to all graphics for placement in C:\git\Inquiry-Into-Cryptology\tmp_images
PTX:DEBUG: temporary directory for latex-image conversion: C:\Users\roccac\AppData\Local\Temp\tmpt4re20nu
PTX: extracting latex-image pictures from C:\git\Inquiry-Into-Cryptology\src\Intro_Crypto_Main.ptx
PTX: string parameters passed to extraction stylesheet: {}
PTX: XSL conversion of C:\git\Inquiry-Into-Cryptology\src\Intro_Crypto_Main.ptx by c:\git\mathbook\xsl\extract-latex-image.xsl
PTX:DEBUG: XSL conversion via c:\git\mathbook\xsl\extract-latex-image.xsl of C:\git\Inquiry-Into-Cryptology\src\Intro_Crypto_Main.ptx to None and/or into directory C:\Users\roccac\AppData\Local\Temp\tmpt4re20nu with parameters {}
PTX:DEBUG: locating "tex" in [executables] section of configuration file
PTX:DEBUG: tex executable: xelatex, options:
PTX:DEBUG: tex executable: xelatex
PTX: converting image-1.tex to image-1.pdf
PTX:DEBUG: locating "pdfcrop" in [executables] section of configuration file
PTX:DEBUG: pdfcrop executable: pdf-crop-margins, options:
PTX: cropping image-1.pdf to image-1.pdf
PTX:DEBUG: locating "pdfsvg" in [executables] section of configuration file
PTX:DEBUG: pdfsvg executable: pdf2svg, options:
PTX:DEBUG: pdfsvg executable: pdf2svg
PTX: converting image-1.pdf to image-1.svg
PTX:DEBUG: locating "pdfpng" in [executables] section of configuration file
PTX:DEBUG: pdfpng executable: convert, options:
PTX:DEBUG: pdfpng executable: convert
PTX: converting image-1.pdf to image-1.png
Traceback (most recent call last):
File "c:/git/mathbook/pretext/pretext", line 302, in <module>
main()
File "c:/git/mathbook/pretext/pretext", line 244, in main
ptx.latex_image_conversion(xml_source, publisher_file, stringparams, args.xmlid, data_dir, dest_dir, args.format)
File "c:\git\mathbook\pretext\pretext.py", line 301, in latex_image_conversion
shutil.copy2(latex_image_png, dest_dir)
File "C:\Program Files\Python37\lib\shutil.py", line 263, in copy2
copyfile(src, dst, follow_symlinks=follow_symlinks)
File "C:\Program Files\Python37\lib\shutil.py", line 120, in copyfile
with open(src, 'rb') as fsrc:
FileNotFoundError: [Errno 2] No such file or directory: 'image-1.png'