I work on a book project and I have many files (Jan Sunderman has access to my dropbox where the project is placed). I changed headings from paragraph and subparagraph to section and subsection and the separate files included with an \input command changed to red even when they were opened in texstudio. This is definitely a bug. The red changed to black when texstudio was closed and reopened.
Further information (about the files in question) can be demonstrated.
Bernhard
I have a similar problem. Here is what I observed.
1) I write in the main document: "\include{somefile}". It appears red in the structure window. Seems normal, the file does not exist yet.
2) I create the file "somefile". The file still appear red in the structure Window, also it exists. It stays red even after running compilations.
3) It does not stay red if I go back to the line "\include{somefile}", delete one letter and rewrite it. This seems to refresh the color in the structure window.
How exactly do you create the file? Here it works correctly if I left-click the red entry and confirm the message box that I want to create the file.
I created a new file by clicking on the first icon on the top left (a white page with a green plus sign), and then saved it.
That's a correct observation. The structure is currently not updated when saving a new file.
Is there hope that this behaviour will change soon?
We have two unrelated bugs here:
Original Bug:
This is likely some issue with the detection of document relations across multple files and/or folders. It does only happen in quite complex cases. One the one hand, I assume that not many users will encounter it, on the other hand, it's likely tedious to track the issue down. The combination results in a low priority.
If you want to help and increase the chance that we look into it, you could try to strip the example down. If you can provide information like:
this would help to reduce the work we have to do (and which we don't have the time for).
Second bug mentioned by Gilles Bonnet
This is just a matter of not updating the structure view.
IMO it does not have a high priority as well:
\input
\\include
statement). When creating a file like this the bug does not show.Last edit: Tim Hoffmann 2016-04-27
I agree that the situation is very complex. BTW are there any limits to the depth of nested directories to be checked in Texstudio for the structure?
There is no limit.
Today I observed a related issue. Coming to my book after some time I noticed that a chapter in the structure window was shown in read and the divers files building up that chapter were also in red. However, when I clicked on one of the files, TXS complained that the file does not exist and ask to create it.
I suspect a timing issue that results in the files not immediately found when opening TXS.
Later the files could be opened but the colour did not change.
I rather think that this is not really timing but depends on the sequence of opening files. It's possibly like this: At the beginning texstudio does not find the file corresponding to the entry. This is likely because it cannot infer the correct full path. After opening further files, it has gained additional information and knows the correct path. When clicking, it can thus open the file.
Options -> Editor -> Automatically load included files
enabled?The second part on staying red is likely the same missing structure color update as Gilles Bonnet noted above: https://sourceforge.net/p/texstudio/bugs/1647/#c5b0
No
Yes
Thanks for the feedback.
Still I don't see that we will target this any time soon. My original comments still hold:
https://sourceforge.net/p/texstudio/bugs/1647/#4523