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

\include and sub-aux_file #7

Open
user202729 opened this issue Mar 28, 2023 · 6 comments
Open

\include and sub-aux_file #7

user202729 opened this issue Mar 28, 2023 · 6 comments

Comments

@user202729
Copy link
Owner

No description provided.

@user202729
Copy link
Owner Author

Maybe a good idea to use TEXINPUTS instead https://tex.stackexchange.com/questions/482578/latextools-sublime-windows-texinputs

note that it may be : on Linux but ; on Windows.

@user202729
Copy link
Owner Author

Another problem is it's necessary to create auxiliary directories in output_directory for \include to work.

@antshar
Copy link

antshar commented May 1, 2024

Is there any workaround for \include to work? Looks like changes are not detected

@user202729
Copy link
Owner Author

@antshar This issue is irrelevant to the fact that subfiles are not detected by default, but there is a workaround by explicitly specifying the dependencies.

$ tex_fast_recompile --help
usage: A Python module to speed up TeX compilation. Usually prepending `tex_fast_recompile` to your 
pdflatex command is enough.

[...]

  --extra-watch EXTRA_WATCH
                        Extra files to watch (default: [])
  --extra-watch-preamble EXTRA_WATCH_PREAMBLE
                        Extra files to watch -- when these files change then recompile from the
                        preamble (default: [])

@antshar
Copy link

antshar commented May 1, 2024

I'm ok with any workaround, glad one exist. However I have some questions regarding it

  • What is the correct syntax for this flag?
  • Is it comma separated list? Should it be wrapped with [ ]?
  • Does it respect relative path from current directory?
  • Can I specify * wildcard or something to watch all files in subdirectory?

@user202729
Copy link
Owner Author

I thought the autogenerated documentation by argparse library would be descriptive enough... in retrospect it obviously isn't.

Anyway the correct syntax is --extra-watch file1.tex --extra-watch file2.tex.

The * wildcard is a feature supported by bash, not the program themselves. But the need to repeat --extra-watch makes --extra-watch *.tex not work properly unless there's exactly one file.

There is https://unix.stackexchange.com/questions/592982/expanding-item-one-two-three-with-a-wildcard anyway. If you try hard enough:

tmparray=(file*.tex)
tex_fast_recompile "${tmparray[@]/#/--extra-watch=}" main.tex

is equivalent to

tex_fast_recompile --extra-watch=file1.tex --extra-watch=file2.tex main.tex

assume wildcard file*.tex matches file1.tex file2.tex.

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