Open Benature opened 6 years ago
Could you please paste your markdown code here? Thank you.
it is just your example:
```latex {cmd=true}
\documentclass{standalone}
\begin{document}
Hello world!
\end{document}
@Benature what's your latexEngine
?
the default one "pdflatex"
@kachkaev do u mean this? i did not change the setting.
yep, this one. it might require installing pdflatex separately, i’m not sure. @shd101wyy might be able to clarify.
sorry - pressed the wrong button :–)
i changed the setting to xetex
and run the latex code again, failed again but i found a texput.log
in the dirt:
This is XeTeX, Version 3.14159265-2.6-0.99998 (TeX Live 2017/W32TeX) (preloaded format=xetex 2018.4.8) 12 APR 2018 23:32
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**d:/±¾-Benature/Solo_Learn/Markdown/Markdownwϰ/fhlqt2k7f_code_chunk.tex
! Emergency stop.
<*> ...rkdown/Markdownwϰ/fhlqt2k7f_code_chunk.tex
End of file on the terminal!
No pages of output.
don't know whether this will help or not P.S. there are some Chinese in the path
(probably too late to this conversation, but since it's still open)
If you create a .tex file with the snippet above, are you able to convert that into a PDF using pdflatex
or xetex
from the command line (try using full paths and putting the sample .tex file in the same directory as your markdown file)? And to convert the generated PDF to an svg with pdf2svg
? If both of these work, it might be something about the path that's giving you issues. I just submitted a PR to mume (which is where this conversion is done) about some other path issues, but I don't think you'd be experiencing them since you don't seem to have spaces in your path.
Try changing the permissions of the directory to allow writing. Running the latex code requires generating temporary .tex
files. The ! Emergency stop.
error is related to the latex engine not being able to find a file. I had encountered the same error
Unable to open file
and changing the permissions of the directory worked.
Try changing the permissions of the directory to allow writing. Running the latex code requires generating temporary
.tex
files. The! Emergency stop.
error is related to the latex engine not being able to find a file. I had encountered the same error
Which directory needs to be fixed? The one the markdown files are in? For which user group? I cannot find any logs, so I am kind of confused as to which directories the extension uses for caching...
Ok. Actually this was not a permission error. I had a missing semicolon, and the output was "Unable to open file" 🤷♀️
I've had the same problem a couple of times when there's a special character in the path (a space or a tilde). The code chunks will render fine when I move the file to a different directory.
Unfortunately I don't know of any way to get the extension to deal with these special characters, which are sometimes unavoidable (e.g. "iCloud~shared" or "Dropbox (Personal)", cannot be renamed easily).
My guess is that when pdftex
is called the filenames aren't quoted & escaped. If true then fixing that would be a great feature.
I have the same problem here, when I try to run the code chunk:
pdflatex
nothing appear in the preview but I did a little bit of digging and the .svg file is created in a mume folder in /tmp
under Linux. I can open them manually, but that's a little bit tediousxetex
, Unable to open file
is prompted and no .svg appear in the temp folder PS : my .md is in my Desktop folder and the file is named test.md
, so no bizarre special characters here (I think)
sorry to border. i have already installed the texlive and add pdf2svg to PATH. but after i run the chunk,there will be a chunk like this
what should i do ?