Hello,
Until a few days ago, I was using xsltproc to compile my pretext, and everything worked fine; in fact, I copied the
Here's what I get when doing pretext support:
------
PreTeXt-CLI version: 0.6.3
PyPI link:
https://pypi.org/project/pretextbook/0.6.3/PreTeXt core resources commit: a9436d6f8f5d3cda3239d6e2fc56c82c72bc32d8
OS: Windows-10-10.0.19043-SP0
Python version: 3.10.4
Current working directory: C:\users\user\dropbox\school\ou\20222023\1914fa22\notes\pretext
PreTeXt project path: C:\users\user\dropbox\school\ou\20222023\1914fa22\notes\pretext
-----
After running pretext -v DEBUG build -d, this is what I get:
--------
Traceback (most recent call last):
File "C:\Python310\lib\shutil.py", line 813, in move
os.rename(src, real_dst)
FileNotFoundError: [WinError 2] The system cannot find the file specified: 'cropped-image-1.pdf' -> 'image-1.pdf'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Python310\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\Python310\Scripts\pretext.exe\__main__.py", line 7, in <module>
File "C:\Python310\lib\site-packages\click\core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "C:\Python310\lib\site-packages\click\core.py", line 1055, in main
rv = self.invoke(ctx)
File "C:\Python310\lib\site-packages\click\core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\Python310\lib\site-packages\click\core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Python310\lib\site-packages\click\core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "C:\Python310\lib\site-packages\pretext\cli.py", line 239, in build
project.build(target_name,webwork,diagrams,diagrams_format,only_assets,clean)
File "C:\Python310\lib\site-packages\pretext\project.py", line 269, in build
builder.diagrams(
File "C:\Python310\lib\site-packages\pretext\build.py", line 61, in diagrams
core.latex_image_conversion(
File "C:\Python310\lib\site-packages\pretext\static\pretext\pretext.py", line 384, in latex_image_conversion
shutil.move("cropped-"+latex_image_pdf, latex_image_pdf)
File "C:\Python310\lib\shutil.py", line 833, in move
copy_function(src, real_dst)
File "C:\Python310\lib\shutil.py", line 434, in copy2
copyfile(src, dst, follow_symlinks=follow_symlinks)
File "C:\Python310\lib\shutil.py", line 254, in copyfile
with open(src, 'rb') as fsrc:
FileNotFoundError: [Errno 2] No such file or directory: 'cropped-image-1.pdf'
PTX: converting latex-image pictures from C:\users\user\dropbox\school\ou\20222023\1914fa22\notes\pretext\source\main.xml to svg graphics for placement in C:\users\user\dropbox\school\ou\20222023\1914fa22\notes\pretext\generated-assets\latex-image
PTX:DEBUG: temporary directory for latex-image conversion: C:\Users\User\AppData\Local\Temp\tmphvomsljf
PTX: extracting latex-image pictures from C:\users\user\dropbox\school\ou\20222023\1914fa22\notes\pretext\source\main.xml
PTX: string parameters passed to extraction stylesheet: {'publisher': 'C:/users/user/dropbox/school/ou/20222023/1914fa22/notes/pretext/publication/publication.ptx'}
PTX: discovering source file's directory name: C:\users\user\dropbox\school\ou\20222023\1914fa22\notes\pretext\source
PTX: verifying and expanding input directory: C:\users\user\dropbox\school\ou\20222023\1914fa22\notes\pretext\source\../generated-assets
PTX: input directory expanded to absolute path: C:\users\user\dropbox\school\ou\20222023\1914fa22\notes\pretext\generated-assets
PTX: verifying and expanding input directory: C:\users\user\dropbox\school\ou\20222023\1914fa22\notes\pretext\source\../assets
PTX: input directory expanded to absolute path: C:\users\user\dropbox\school\ou\20222023\1914fa22\notes\pretext\assets
PTX: XSL conversion of C:\users\user\dropbox\school\ou\20222023\1914fa22\notes\pretext\source\main.xml by C:\Python310\lib\site-packages\pretext\static\xsl\extract-latex-image.xsl
PTX:DEBUG: XSL conversion via C:\Python310\lib\site-packages\pretext\static\xsl\extract-latex-image.xsl of C:\users\user\dropbox\school\ou\20222023\1914fa22\notes\pretext\source\main.xml to None and/or into directory C:\Users\User\AppData\Local\Temp\tmphvomsljf with parameters {'publisher': 'C:/users/user/dropbox/school/ou/20222023/1914fa22/notes/pretext/publication/publication.ptx'}
PTX:DEBUG: locating "xelatex" in [executables] section of configuration file
PTX:DEBUG: xelatex 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 cropped-image-1.pdf
PTX:ERROR: There was a problem cropping image-1.pdf and cropped-image-1.pdf was not created
------
It seems like the issue somehow has something to do with the cropping of the image, but I have pdfcropmargins installed and updated. Again, I don't see this issue showing up when running xsltproc, only when trying to run build via the CLI.
Is this just user error?
Cory