Bug 297675

Summary: Improper handling of nested \input, relative path and subfolders in Kile Files and Projects tab
Product: [Applications] kile Reporter: Jayesh Badwaik <kde.dev>
Component: user interfaceAssignee: Michel Ludwig <michel.ludwig>
Status: REPORTED ---    
Severity: normal CC: fxrh, martin.schiffner
Priority: NOR    
Version First Reported In: 2.1.3   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Jayesh Badwaik 2012-04-07 17:44:30 UTC
I have been working in Kile and I have noticed a bug as follows. 

When I have nested folders and I use the \input command, then the LaTeX 
requires that all paths be relative to the master document. However, the Kile 
scans the document using the relative path to the current file. Due to this, 
the file which I have included using the input command \input instead of coming 
under that specific file subtree from which it was \input instead appears under 
the main tree. 

For example, my structure is as follows:

/
|--------    master.tex
|--------       algebra.tex
|--------       algebra
                |--------    linear-algebra.tex
                |--------     matrices.tex

Now the input chain is as follows:

master.tex --> algebra.tex --> linear-algebra.tex --> matrices.tex

Now what kile expects is that since linear-algebra.tex and matrices.tex are in 
the same folder, matrices.tex should be included in linear-algebra.tex using 
the command 

Case A:
\input{matrices.tex}. 

However, LaTeX wants me to do this as 

Case B:
\input{algebra/matrices.tex}

When I do as in the case A, the kile project tree is proper, but LaTeX does 
not compile. In case B, LaTeX compiles but Kile project tree is screwed up. 


This bug is kind of  anti-thesis to the bug #112089[0]. I think the problem is that the relative path is relative to the parent file rather than the master document. I guess, making the relative path wrt master document should fix the things and should not be a problem to anyone


[0]: https://bugs.kde.org/show_bug.cgi?id=112089
Comment 1 Andrew Crouthamel 2018-11-06 15:15:34 UTC
Dear Bug Submitter,

This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond.

Thank you for helping us make KDE software even better for everyone!
Comment 2 Andrew Crouthamel 2018-11-18 03:24:42 UTC
Dear Bug Submitter,

This is a reminder that this bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? This bug will be moved back to REPORTED Status for manual review later, which may take a while. If you are able to, please lend us a hand.

Thank you for helping us make KDE software even better for everyone!
Comment 3 Martin S 2019-08-23 10:26:38 UTC
Bug is still valid in 2.1.3 and 2.9.91.
Comment 4 Felix Rohrbach 2024-10-17 14:25:12 UTC
I tried to improve the dependency handling of kile in this merge request: https://invent.kde.org/office/kile/-/merge_requests/103 Maybe you can try whether this solves the issue for you as well?