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

Support addtoluatexpath package #3634

Open
kalekje opened this issue Aug 27, 2024 · 4 comments
Open

Support addtoluatexpath package #3634

kalekje opened this issue Aug 27, 2024 · 4 comments
Labels
enhancement New feature or (non bug related) change to the program.

Comments

@kalekje
Copy link

kalekje commented Aug 27, 2024

When entering a command, I see a nice list of suggested commands from packages (see image). I use shared sty and cls files (on a network drive) and would like to have the commands defined in these files appear in the drop-down code completion list. Any insight on how to get this working?

image

@kalekje kalekje added the untriaged Issue type still needs to be triaged or verified. label Aug 27, 2024
@PHPirates
Copy link
Collaborator

How does LaTeX know where these files are? TeXiFy will check TEXINPUTS, for example.

@kalekje
Copy link
Author

kalekje commented Aug 29, 2024

@PHPirates hey thanks for the follow-up!

I use a package that I wrote called addtoluatexpath, which adds paths to \input@path during runtime, i.e. the path where my shared sty and cls files reside.

FWIW, I prefer not to modify the TEXINPUTS variable as I like to utilize the shared template sty and cls files while writing a report (and modify that master template files if need be), and then once the report is done, I copy the template files over to the project dir (to make a standalone folder). I believe if I modify TEXINPUTS, this workflow could get sticky. (I hope this makes sense). Open to other ideas, though.

@PHPirates
Copy link
Collaborator

Then TeXiFy should simply look up all the \addtoluatexpath commands and add those paths to the paths to search. That should be relatively easy, it will be more tricky to handle the case of two sty files with the same name in different locations that are included with different \addtoluatexpath commands in different file sets, so let's ignore that edge case for now.

I indeed don't understand, when you copy the template files to the project then you would need to remove the \addtoluatexpath commands to make sure it uses the local ones? So that would be similar to setting texinputs in the run configuration.
Not sure if setting texinputs works for lua though.

@kalekje
Copy link
Author

kalekje commented Sep 5, 2024

That would be great. I agree that ignoring the edge cases should be fine, the document author should know to avoid name conflicts.

And yes, I basically do this:

\RequirePackage[S:/SharedLatexTemplateFilesOnNetworkDrive]{addtoluatexpath} % use this while editing the document
% \RequirePackage[TemplateFiles]{addtoluatexpath} % this is commented out while working on the document, but "SharedLatexTemplateFilesOnNetworkDrive" is copied over to the local folder "TemplateFiles", the above line is commented out, and this line is activated for "freezing" the template files into the project folder

AFAIK, settings texinputs should be avoided for luatex? I'm not too privy on that, though.

The two commands that would be chechked are:

\RequirePackage[path1,path2]{addtoluatexpath} and \addtoluatexpath{path1,path2}, where the paths can be absolute or local

@PHPirates PHPirates changed the title [Question] Enable code completion for files stored outside of texmf Support addtoluatexpath package Nov 9, 2024
@PHPirates PHPirates added enhancement New feature or (non bug related) change to the program. and removed untriaged Issue type still needs to be triaged or verified. labels Nov 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or (non bug related) change to the program.
Projects
None yet
Development

No branches or pull requests

2 participants