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

Reuse precompiled files in different document #306

Open
rpspringuel opened this issue Mar 10, 2023 · 3 comments
Open

Reuse precompiled files in different document #306

rpspringuel opened this issue Mar 10, 2023 · 3 comments

Comments

@rpspringuel
Copy link
Collaborator

rpspringuel commented Mar 10, 2023

I have a project where a particular piece of music (contained in an external ly file) is used in several different documents. Is there a way to setup lyluatex so that all the documents share a common compilation of the music? I.e. If after putting together document_A.tex which uses sample.ly, I create document_B.tex, which also uses sample.ly (exactly as it was in document_A.tex), document_B.tex will use the precompiled version of the music from document_A.tex rather than compiling it for itself.

This would be a significant timesaver in compilations times.

@jperon
Copy link
Owner

jperon commented Mar 10, 2023

If document_A.tex and document_B.tex are in the same folder, I think it should already be the case: the hash of cached files doesn’t depend on the document’s name. If a recompilation is triggered, please send me a (double) mwe, so that I can test and debug it.

If they are in two different folders, I’d suggest symlinking tmp-ly from document_A’s folder into document_B’s.

@rpspringuel
Copy link
Collaborator Author

The files are decidedly in different folders.

Is there a way to set the location of tmp-ly as an option? These documents are stored in a git repository to which I don't normally commit the intermediate files (including the contents of the tmp-ly directory). To get a symlink based system working on another computer that checks out the repository, I'd either have to commit all the symlinks or set them up independently on each computer.

@jperon
Copy link
Owner

jperon commented Mar 10, 2023

There is a tmpdir option that should fit your need. That said, with separate folders, I fear you’ll encounter issues with openout security.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants