Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't disable Online LaTeX Compilation (Windows) #270

Open
nathaniel opened this issue Oct 26, 2019 · 11 comments
Assignees

Comments

@nathaniel
Copy link

@nathaniel nathaniel commented Oct 26, 2019

Ipe 7.2.13 in Windows 7:
The Online LaTeX Compilation works great, but it seems that the "Disable" choice subsequently doesn't do anything... LaTeX compilation still works (without local TeX), and the the Enable Online Compilation dialog still says, "You are currently using the following online service..." and offers a Disable button.

@otfried

This comment has been minimized.

Copy link
Owner

@otfried otfried commented Oct 26, 2019

Strange. I tested it under Wine and on Windows 10.

Could you try the following: In actions.lua, find the line

  local urlFile = config.latexdir .. "/url.txt"

and replace it by

  local urlFile = config.latexdir .. prefs.fsep .. "url.txt"

This is definitely better, but I'm not sure it is actually the reason for the bug.

@otfried otfried self-assigned this Nov 5, 2019
@edyrol

This comment has been minimized.

Copy link

@edyrol edyrol commented Nov 9, 2019

I have the same issue on Win 10 pro. Had to manually delete AppData\Local\ipe\url.txt.
The change you suggested in actions.lua did not fix the bug.

@otfried

This comment has been minimized.

Copy link
Owner

@otfried otfried commented Nov 9, 2019

I have the same issue on Win 10 pro. Had to manually delete AppData\Local\ipe\url.txt.
The change you suggested in actions.lua did not fix the bug.

When you go to Help -> Show configuration, what exactly does it display for "Latex directory"?

@otfried

This comment has been minimized.

Copy link
Owner

@otfried otfried commented Nov 9, 2019

It seems config.latexdir already contains the trailing path separator, so the line should really just be

  local urlFile = config.latexdir .. "url.txt"

I'm not convinced this is the actual problem, though, because on all my systems it works anyway.

@edyrol

This comment has been minimized.

Copy link

@edyrol edyrol commented Nov 9, 2019

When you go to Help -> Show configuration, what exactly does it display for "Latex directory"?
C:\Users\Edgardo\AppData\Local\ipe\

@otfried

This comment has been minimized.

Copy link
Owner

@otfried otfried commented Nov 9, 2019

Could you try if it works when you make the change I suggest above: in actions.lua, find the line

  local urlFile = config.latexdir .. "/url.txt"

and replace it by

  local urlFile = config.latexdir .. "url.txt"
@edyrol

This comment has been minimized.

Copy link

@edyrol edyrol commented Nov 9, 2019

It didn't work. I know next to nothing about Lua but I did some experiments.

After that last change, the value of urlFile is C:\Users\Edgardo\AppData\Local\ipe\url.txt so it seems good. But apparently os.remove is returning a Permission denied error.
I tried running ipe as administrator but it didn't help.

I don't know why but if I remove
local f = ipe.openFile(urlFile, "r")
local url = f:read("a")
url = url:match("^(%S+)%s*$")
f.close()
and just give url any string value then the disable button works.

@edyrol

This comment has been minimized.

Copy link

@edyrol edyrol commented Nov 9, 2019

Shouldn't it say f:close() instad of f.close()?

@otfried

This comment has been minimized.

Copy link
Owner

@otfried otfried commented Nov 9, 2019

Ouch - does the current version still say f.close? I fixed that in #269, but apparently I did not upload the fixed version except for MacOS....

That explains the problem - the file remains open and can therefore not be deleted.

Can you try changing it?

@edyrol

This comment has been minimized.

Copy link

@edyrol edyrol commented Nov 9, 2019

I did it and it works ok now.

@otfried

This comment has been minimized.

Copy link
Owner

@otfried otfried commented Nov 9, 2019

I have now uploaded fixed versions to bintray - anyone affected by the problem should download Ipe again.

I'll keep this issue open until I release a new version, so that people can find what causes the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.