thehogfather / brackets-latex

Support for editing and compiling latex documents in brackets
24 stars 4 forks source link

Can't save changed LaTex settings #29

Closed mcsimenc closed 7 years ago

mcsimenc commented 7 years ago

Using Brackets Release 1.8 build 1.8.0-17108 on Mac OS 10.12.2 (Sierra)

I installed MacTeX to the default location: /Library/TeX/texbin The brackets-latex default location is /usr/bin When I click on 'LaTex Settings' and change 'Tex distribution bin directory' and click save, then click on 'LaTex Settings' again, I see that nothing has changed. When I try to compile a TeX document in Brackets, it hangs on "pdflatex: compiling..."

I tried making a symbolic link to /Libary/TeX/texbin in /usr/ but it didn't work.

thehogfather commented 7 years ago

Are there any errors or warnings in the console related to the extension? e.g., when you click Debug > Show Developer Tools?

mcsimenc commented 7 years ago

Yes!

main.js:123 Unable to load one of the modules: /Users/mathewsimenc/Library/Application Support/Brackets/extensions/user/brackets-latex/node/CompileLatex, reason: Cannot find module 'es6-promise' main.js:125 Uncaught TypeError: Cannot read property 'toString' of undefined

thehogfather commented 7 years ago

@mcsimenc thanks - could you fetch the latest version of the extension - 0.3.3 and try again? For some reason the es6-promise module was not exported with the previous version in the registry.

mcsimenc commented 7 years ago

Great that works! It compiles a pdf and opens.

However I still can't change the output location or texbin location. If I remove the symbolic link I created from /usr/ it stops working. Thanks!

thehogfather commented 7 years ago

So are you still unable to change the texbin location in the settings dialog?

mcsimenc commented 7 years ago

Yes, this is what shows in the console when I try to do it.

/filesystem/impls/appshell/AppshellFileSystem.js:119 FileWatcherDomain was expected to deliver stats for changed event!

thehogfather commented 7 years ago

I do not think that message has much to do with the issue.

I am struggling to reproduce this - so let us try a few things:

Do you have a .brackets.json file at the root of the project? If you do what is in the content that is related to brackets-latex?

If you do not have that file could you create it and paste the following in it:

{
    "brackets-latex.texBinDirectory": "/Library/TeX/texbin",
    "brackets-latex.compiler": "pdflatex"
}
janandre commented 7 years ago

I had a similar problem. I always opened Brackets the "normal" way and never noticed the project structure. "First Steps" was always there and annoyed me :D

Opening a tex file and saving the settings for this plugin resulted in a .brackets.json inside the "First Steps" folder.

After opening my root folder as "project", everything is saving fine :)

Maybe thats someones case too..

mcsimenc commented 7 years ago

Thanks thehogfather and janandre!

The problem for me is I have one directory opened as the "root directory" and am editing a tex file in a different directory. brackets-latex can't find .brackets.json in the directory of the tex file so it never changes the json in the project directory. If I save my .tex in the project dir, brackets-latex saves changes to preferences.