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

\input@path change not parsed by latextools #1408

Open
payoto opened this issue May 14, 2019 · 2 comments
Open

\input@path change not parsed by latextools #1408

payoto opened this issue May 14, 2019 · 2 comments

Comments

@payoto
Copy link

payoto commented May 14, 2019

Summary

Is there an option to manually add directories for LatexTools to search for figures/tex files? Or how can I set the \input@path and \graphicspath values for LatexTools' internal commands?

Context

I am using subfiles to write a large document this lets me build chapters in standalone and still build the entire document. The build process works flawlessly for both the main and subfiles. My issue is that features of LatexTools don't work: the TOC is empty, figures don't get detected when parsing, bib files are not necessarily found, etc...

This is because the main document relies on setting latex input and graphics paths manually with the commands below.

\makeatletter
\@ifundefined{SUBFILECOMPILE}{
\def\input@path{
	{./}
	{chapters/1_background/}
	{chapters/2_2DRSVS/}
	}
	\newcommand{\MAINFILECOMPILE}{}
}{}
\makeatother
\appendtographicspath{
	{chapters/1_background}
	{chapters/2_2DRSVS}
}

How can these changes be propagated to LatexTools?

@r-stein
Copy link
Member

r-stein commented May 14, 2019

If you enable the prereleases you will get support for \graphicspath in general, however not for the \appendtographicspath command. (it is impossible to support every LaTeX command).

A workaround would be to include the comments package and use the corresponding include commands inside the comment environment or after \end{document}. Adding additional input parts is as far I know not supported.

@payoto
Copy link
Author

payoto commented May 15, 2019

Ok, thanks using the comment package does allow me to add graphics paths and define the bibliography in a way LaTeXTools understands, bringing back those lovely fuzzy search functionalities.

It would be nice if there was a setting to manually extend the path in which latextools looks for all types of sources (.tex, .bib, .sty, images...) when parsing rather than simply using the latex path. Do you have any idea how realistic would that be?

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