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

False inspection: Document doesn't contain an environment+ elsarticle.cls not found #1407

Closed
cbtum opened this issue May 8, 2020 · 15 comments · Fixed by #1901
Closed

False inspection: Document doesn't contain an environment+ elsarticle.cls not found #1407

cbtum opened this issue May 8, 2020 · 15 comments · Fixed by #1901
Labels
bug Deficiencies in TeXiFy behaviour. macOS Issues specific to macOS (@cl445 or @efrancis may be able to help)

Comments

@cbtum
Copy link

cbtum commented May 8, 2020

Type of JetBrains IDE (IntelliJ, PyCharm, etc.) and version

Ultimate 2020.1.1

Operating System

TeXiFy IDEA version

0.6.9

What I did (steps to reproduce)

open a file

Expected behavior

no errors

Actual behavior

  • document doesn't contain a document environment
  • elsarticle was not found (elsarticle is part of texlive/mactex)

image

@cbtum cbtum added bug Deficiencies in TeXiFy behaviour. untriaged Issue type still needs to be triaged or verified. labels May 8, 2020
@PHPirates
Copy link
Collaborator

What does kpsewhich elsarticle.cls return? We use that to find the class. If it cannot find it, I don't really understand how LaTeX finds it.

document doesn't contain a document environment

This inspection has been disabled by default for a long time. Perhaps you have a parse error somewhere.

@PHPirates
Copy link
Collaborator

Now you're here, is #1390 still an issue? In #1208 I think you managed to solve it.

@cbtum
Copy link
Author

cbtum commented May 9, 2020

kpsewhich elsarticle.cls returns the correct path /usr/local/texlive/2020/texmf-dist/tex/latex/elsarticle/elsarticle.cls.. Also the File.log shows that latex is using the correct path to the cls. Even though the pdf file is produced correctly, I see this inspection (also after restarting my machine). If I remember correctly, it was not an issue with the previous version of texify.

the second error appeared after sleep mode and only went away after restarting IntelliJ.

@cbtum
Copy link
Author

cbtum commented May 9, 2020

#1390 still an issue, but #1208 is solved.

@cbtum
Copy link
Author

cbtum commented May 9, 2020

Interestingly, I opened another file with the document class report. At the beginning, everything looked fine. After quite some time, it also says in this file that there is no cls for report.

@PHPirates
Copy link
Collaborator

Since you seem to have all inspections enabled, can you show exactly the inspection message? Does it say File 'elsarticle.cls not found or Package could not be found locally or on CTAN or Package is not installed or something else? If the second, just disable the inspection. It's disabled by default for a reason.

@cbtum
Copy link
Author

cbtum commented May 9, 2020

image

@cbtum
Copy link
Author

cbtum commented May 9, 2020

Thanks for the hint with the inspections. I was not aware that some are disabled for a reason. Now my inspections are back to default.

@PHPirates
Copy link
Collaborator

Interesting. The only thing I can think of is if BufferedReader(InputStreamReader(Runtime.getRuntime().exec("kpsewhich report.cls").inputStream)).readLine()

does not work on macOS, especially since as far as I know works on both Windows and Linux. Unfortunately there's no way I can verify this. Maybe it's like this: https://stackoverflow.com/questions/19623987/java-bufferedreader-works-on-windows-and-not-mac

We can try a different way of executing the command. Can you check if the following build still has the issue?
TeXiFy-IDEA-0.7-alpha.70-cbtum.zip

@cbtum
Copy link
Author

cbtum commented May 9, 2020

Unfortunately that does not solve the problem.

By the way, I just noticed a problem in the version you gave me: As you can see in the screenshot from my previous post I have one file with settings and packages that I share across many files. My packages are recognized correctly under 0.6.9 but not in the version you gave me:

image

Was there any change that potentially leads to this inspection error or does it mean something went wrong when I installed your version from disk?

As I said, it's not a problem under 0.6.9
image

@PHPirates
Copy link
Collaborator

Then I have no idea what the problem is, and I cannot reproduce the problem. So I will assume this is mac-specific.

Since 0.6.9, the xcolor package was added. So apparently TeXiFy cannot find an xcolor package inclusion somewhere.

@PHPirates PHPirates added macOS Issues specific to macOS (@cl445 or @efrancis may be able to help) wontfix Issue will be discarded by the development team. labels May 9, 2020
@cl445
Copy link

cl445 commented May 11, 2021

With 0.7.7-alpha.1 the document class is still not recognized.

@PHPirates
Copy link
Collaborator

PHPirates commented May 11, 2021

@cl445 That's actually expected, because I think I only heard from you that the fix worked after I published that release so I didn't include it yet. Will do in the next alpha, but until then: does it work with the build I gave you?

[Edit] Or do you mean the build I gave you, because I forgot what version number was on it.

@cl445
Copy link

cl445 commented May 11, 2021

Yes, version 0.7.7-alpha.1 was the build you gave me. ;)

@PHPirates
Copy link
Collaborator

@cl445 Thanks for checking, I think I found the cause now. Can you try if the following build resolves this issue and #962 equation preview as well?

TeXiFy-IDEA-0.7.7-alpha-cl445-2.zip

@PHPirates PHPirates removed untriaged Issue type still needs to be triaged or verified. wontfix Issue will be discarded by the development team. labels May 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Deficiencies in TeXiFy behaviour. macOS Issues specific to macOS (@cl445 or @efrancis may be able to help)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants