ajshort / vscode-latex-preview

Compilation and embedded preview of LaTeX documents for Visual Studio Code
MIT License
32 stars 11 forks source link

compile error on more complex LaTex projects #3

Closed tux19 closed 7 years ago

tux19 commented 7 years ago

Latex Preview is not able to compile the following project structures (pdflatex compiles fine):

thesis 
 ¦--- introduction.tex  // <- single chapters
 ¦--- main.tex
 ¦--- ... 
 ¦--- thesis.tex    // <- main file
 ¦----unizhtr.sty  // style sheet   

and

thesis 
 ¦--- talk1
 ¦          | -- talk1.tex // <- single chapters
 ¦
 ¦--- talk2
 ¦         | -- talk2.tex
 ¦
 ¦--- talk3
 ¦         | -- talk3.tex     
 ¦
 ¦--- talk.tex    // <- main file
 ¦----unizhtr.sty  // style sheet   

The sty is included using \usepackage{unizhtr}... single chapters are added with e.g. \include{Talk1/talk1}

Before v0.2.1 i saw an error ERROR cannot be opened: the file was not found (\), now i see no more errors except the red 'error compiling preview'.

Previousely the error could be seen in the developer tools console, now only a uncaught typeError appears:

image

each time i try to compile.

Currently I sadly have not the time to dig deeper and contribute to this 😞 but i try to follow it and look at it later again.

ajshort commented 7 years ago

Hey,

Could you try updating to 0.3.0. Then when the "error compiling preview" shows up you should be able to click on it to open the compilation output, including the command that was run. Could you attach the output to this issue and I will see if I can figure anything out.

Cheers.

tux19 commented 7 years ago

Hi,

Thanks for the quick reply, here my output:

pdflatex -jobname=preview -synctex=1 -interaction=nonstopmode -file-line-error -output-dir="C:\\Users\\chris\\AppData\\Local\\Temp\\tmp-85883FHu1fIwqXfo" "c:\\Users\\chris\\GIT_PROJECTS\\va_thesis\\thesis.tex"`

I will add an empty template of the project when i'm at home :)

EDIT: added the template i'm currently using just fyi

thesis-pdlatex-serif.zip

EDIT2:

this is the pdflatex log when I execute the

2016-11-28 20:33:50,000+0100 FATAL pdflatex - The command line options could not be processed.
2016-11-28 20:33:50,000+0100 FATAL pdflatex - Info: optionError="unknown option"
2016-11-28 20:33:50,000+0100 FATAL pdflatex - Source: Libraries\MiKTeX\TeXAndFriends\webapp.cpp
2016-11-28 20:33:50,000+0100 FATAL pdflatex - Line: 270
ajshort commented 7 years ago

Can you try 0.3.1? I think I fixed this in 6022966ce252d0f7bf1da2df92f4f1d10b99a8d6.

Turns out miktext on windows doesn't support short argument names.

tux19 commented 7 years ago

jep, that worked :) thanks for the effort...

I'll report further if I find other bugs!

tux19 commented 7 years ago

tried the latexmk option, somehow does ot find other files than the main source file again...

It seems to me that it searches in the wrong 'root-folder' for other files.

Sorry to bother you again^^

ajshort commented 7 years ago

Hrmph - it works OK for me on Linux, probably a miktex issue again. Could you copy the executed command and any error output please?

ajshort commented 7 years ago

Do you have perl installed? You need to install it separately to use latexmk on windows.

tux19 commented 7 years ago

hm i'm abroad at the moment and cant test it... but I think i installed id specifically for latex... i'll look at it when i'm back :)

tux19 commented 7 years ago

nevermind, works fine now... I dont know what the problem was, perl was installed. Eventually Iforgot to reboot 😆