if username has spaces or is long, tempdir replaces username with tilde (`~`) (breaks pdflatex)
Summary:
Error when trying to insert LaTeX formula using Extensions->Render->LaTeX Formula in Inkscape.
Steps to reproduce:
- open Inkscape
- Click Extensions->Render->LaTeX Formula.
- When "use" is pressed a new window is launched.
What happened?
- The new window says: "Inkscape has received additional data from the script executed. The script did not return an error, but this may indicate the results will not be as expected."
- In the tex area below it says:
"Traceback (most recent call last):
File "pdflatex.py", line 83, in <module>
PdfLatex().run()
File "C:\Program Files\Inkscape\share\inkscape\extensions\inkex\base.py", line 123, in run
self.save_raw(self.effect())
File "C:\Program Files\Inkscape\share\inkscape\extensions\inkex\extensions.py", line 159, in effect
for child in fragment:
File "pdflatex.py", line 49, in generate
call('pdflatex', tex_file,\
File "C:\Program Files\Inkscape\share\inkscape\extensions\inkex\command.py", line 182, in call
return _call(program, *args, **kwargs)
File "C:\Program Files\Inkscape\share\inkscape\extensions\inkex\command.py", line 171, in _call
raise ProgramRunError("Return Code: {}: {}\n{}\nargs: {}".format(
inkex.command.ProgramRunError: Return Code: 1: b''
b"This is pdfTeX, Version 3.14159265-2.6-1.40.21 (MiKTeX 20.7)\r\nentering extended mode\r\n! I can't find file `C:/Users/ESPENM'.\r\n<to be read again> \r\n \\protect \r\n<*> C:/Users/ESPENM~\r\n 1/AppData/Local/Temp/inktmpbw2nsret/input.tex\r\nPlease type another input file name: \r\n! Emergency stop.\r\n<to be read again> \r\n \\protect \r\n<*> C:/Users/ESPENM~\r\n 1/AppData/Local/Temp/inktmpbw2nsret/input.tex\r\n! ==> Fatal error occurred, no output PDF file produced!\r\nTranscript written on C:\\Users\\ESPENM~1\\AppData\\Local\\Temp\\inktmpbw2nsret\\texpu\r\nt.log.\r\n"
args: ['C:\\Users\\Espen Myrset\\AppData\\Local\\Programs\\MiKTeX\\miktex\\bin\\x64\\pdflatex.exe', '-output-directory=C:\\Users\\ESPENM~1\\AppData\\Local\\Temp\\inktmpbw2nsret', '-halt-on-error', 'C:\\Users\\ESPENM~1\\AppData\\Local\\Temp\\inktmpbw2nsret\\input.tex']"
Edited for readability:
b"This is pdfTeX, Version 3.14159265-2.6-1.40.21 (MiKTeX 20.7)
entering extended mode
! I can't find file `C:/Users/ESPENM'.
<to be read again>
\\protect
<*> C:/Users/ESPENM~
1/AppData/Local/Temp/inktmpbw2nsret/input.tex
Please type another input file name:
! Emergency stop.
<to be read again>
\\protect
<*> C:/Users/ESPENM~
1/AppData/Local/Temp/inktmpbw2nsret/input.tex
! ==> Fatal error occurred, no output PDF file produced!
Transcript written on C:\\Users\\ESPENM~1\\AppData\\Local\\Temp\\inktmpbw2nsret\\texpu
t.log.
"
args: ['C:\\Users\\Espen Myrset\\AppData\\Local\\Programs\\MiKTeX\\miktex\\bin\\x64\\pdflatex.exe', '-output-directory=C:\\Users\\ESPENM~1\\AppData\\Local\\Temp\\inktmpbw2nsret', '-halt-on-error', 'C:\\Users\\ESPENM~1\\AppData\\Local\\Temp\\inktmpbw2nsret\\input.tex']"
What should have happened?
A box with a LaTeX formula inside should be created in the document.
Sample attachments:
Version Info:
- Inkscape Version: Inkscape 1.0 (4035a4fb49, 2020-05-01)
- Operating System: Windows 10 Pro
- Operating System version: 2004
Edited by Nathan Lee