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

Add support for aux_dir for latexmk #2677

Closed
wants to merge 6 commits into from
Closed

Add support for aux_dir for latexmk #2677

wants to merge 6 commits into from

Conversation

lervag
Copy link
Owner

@lervag lervag commented Mar 28, 2023

See discussion in #2534.

This adds a breaking change: build_dir is changed to out_dir throughout. Thus, anyone who changes the build_dir key of e.g. g:vimtex_compiler_latexmk will need to update their configuration!

The term "build_dir" is not really used in any of the backend compiler tools, so it was probably a mistake to add a new term here. Therefore, as a step towards adding support for aux_dir for the latexmk backend, we change build_dir to out_dir. out_dir (or similar variants) is a specific "concept" in both latexmk, latexrun and tectonic.

@lervag lervag changed the title [Draft] Add support for aux_dir for latexmk Add support for aux_dir for latexmk Mar 28, 2023
@doronbehar
Copy link
Contributor

Hey, I am also experiencing perhaps related issues with build_dir. I was about to suggest the following PR:

commit 823c8f4152fb86e549355f401e44ae356b1ded49
Author: Doron Behar <doron.behar@gmail.com>
Date:   Sat May 20 17:48:37 2023 +0300

    Document the real default build_dir compiler option

diff --git a/doc/vimtex.txt b/doc/vimtex.txt
index 0a6bff4e..7fb6b01a 100644
--- a/doc/vimtex.txt
+++ b/doc/vimtex.txt
@@ -962,7 +962,7 @@ OPTIONS                                                        *vimtex-options*
   Default value: >vim
 
     let g:vimtex_compiler_latexmk = {
-        \ 'build_dir' : '',
+        \ 'build_dir' : {-> expand("%:p:h")},
         \ 'callback' : 1,
         \ 'continuous' : 1,
         \ 'executable' : 'latexmk',

I took the empty build_dir option when I set my g:vimtex_compiler_tectonic suggested by the docs and I noticed that VimtexClean doesn't work for me because it attempts to clean files in my root directory /. Hence the minimum is for the documentation to be correct :).

@lervag
Copy link
Owner Author

lervag commented May 23, 2023

I took the empty build_dir option when I set my g:vimtex_compiler_tectonic suggested by the docs and I noticed that VimtexClean doesn't work for me because it attempts to clean files in my root directory /. Hence the minimum is for the documentation to be correct :).

I agree we should update the docs if they are wrong. However, I don't understand why you claim the docs are wrong. I may just be a tad slow, but as far as I understand, the 'build_dir' value is an empty string unless it is changed.

Although I see why you find this related, I still find it to be a separate issue. I would therefore prefer if we can continue this discussion in a new thread if you should still think the docs are wrong.

@tertsdiepraam
Copy link

tertsdiepraam commented Jun 1, 2023

I'm just passing by, but I ran into a similar problem as mentioned in the issue and wanted to confirm that it was indeed fixed on this branch. Thank you!

@lervag
Copy link
Owner Author

lervag commented Jun 1, 2023

Great, I'm glad to hear it! I'm tempted to just merge this. I believe it should be fine, and I'm just waiting for some testing and comments from the community at large and from @tyalie who wrote the original issue #2534.

I'll fix the current merge conflict and then aim to merge this in a week or so unless I get feedback that suggests otherwise.

As a step towards supporting aux_dir for latexmk I first want to
consolidate on the out_dir name which is used for several backends. The
term "build_dir" is not really used in these tools, so no need to add
a new term here. Instead, we revert to out_dir, which is a specific
concept in both latexmk, latexrun and tectonic. Further, the current
implementation of these things is really quite similar to the
"build_dir" concept.

refer: #2534
@lervag
Copy link
Owner Author

lervag commented Jun 1, 2023

I've updated the branch with a force push. Let me know if you need help checking out the updated branch.

@lervag
Copy link
Owner Author

lervag commented Jun 12, 2023

I'm merging this now. It is a breaking change and I'll make a release to explain necessary steps for those who may be impacted.

@lervag
Copy link
Owner Author

lervag commented Jun 12, 2023

This is now merged - I forgot to tag the merge commit: b7690c2.

@lervag lervag closed this Jun 12, 2023
@lervag lervag deleted the feat/outdir branch June 12, 2023 19:59
@tyalie
Copy link

tyalie commented Jun 13, 2023

Hi sorry for not answering. Needed to recover medically and I found myself in the situation that I wasn't to do what I initially planned to do.

But I've been able to successfully test this PR on the paper that inspired the original issue #2534. Thank you so much for this and investing the time for it

@lervag
Copy link
Owner Author

lervag commented Jun 13, 2023

Hi sorry for not answering. Needed to recover medically and I found myself in the situation that I wasn't to do what I initially planned to do.

I'm sorry to hear that and I hope you are doing well, or at least that the outlook is good! <3

But I've been able to successfully test this PR on the paper that inspired the original issue #2534. Thank you so much for this and investing the time for it

Thank you for the feedback and thank you for pushing me to do this. I believe the changes you've inspired are good and are very sensible.

All the best!

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

Successfully merging this pull request may close these issues.

4 participants