You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on a latex project with a multi-files structure using the subfiles package. I have some .tex files, which contains some new commands and new environments defined for the project, input in the main.tex by the marco \input. However, I find that intellisense offers auto-completion for these newly defined commands and citations only in the main file main.tex. It offers nothing about these new commands and citations when I'm editing subfiles, which are included in the main.tex using \subfile.
For the reference \ref and \eqref the intellisense works in the subfiles. The projects structure looks like this: main.tex:
\documentclass[A4,12pt,twoside]{book}
\input{mystyle.tex}
\input{theorems.tex}
\input{mathcommand.tex}
\begin{document}
% %--------------------------------------------------------------------------
% % Core of the document
% %--------------------------------------------------------------------------
\part{part1}
\subfile{files/part1/chapter1}
\subfile{files/part1/chapter2}
\part{part2}
\subfile{files/part2/chapter1}
\subfile{files/part2/chapter2}
\nocite{*} % to cite evey things, else cite each on using : \cite{ifrs17}.
\printbibliography %to print bibliographie
\end{document}
I tried adding the announcement % !TEX root = ../main.tex in the first line in subfiles, and tried the configuration variables latex-workshop.latex.texDirs and latex-workshop.latex.bibDirs. None of them makes intellisense work in subfiles
Thank you for your reply! I found that I misused .../main.tex, for which I should use ../../main.tex. It should be the reason why intellisense didn't find the root file. It's also interesting that the project could be compiled successfully without correctly setting the path for main.tex in subfiles.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm working on a latex project with a multi-files structure using the
subfiles
package. I have some.tex
files, which contains some new commands and new environments defined for the project, input in themain.tex
by the marco\input
. However, I find that intellisense offers auto-completion for these newly defined commands and citations only in the main filemain.tex
. It offers nothing about these new commands and citations when I'm editing subfiles, which are included in themain.tex
using\subfile
.For the reference
\ref
and\eqref
the intellisense works in the subfiles. The projects structure looks like this:main.tex
:subfiles like
chapter1.tex
:I tried adding the announcement
% !TEX root = ../main.tex
in the first line in subfiles, and tried the configuration variableslatex-workshop.latex.texDirs
andlatex-workshop.latex.bibDirs
. None of them makes intellisense work in subfilesBeta Was this translation helpful? Give feedback.
All reactions