2

I'm on TexStudio 2.11.2, working on both Debian (Linux) and windows PCs. I have a common preamble/macro Tex file I like to include in my papers in order to save me some copy-pasting, so I add it to the relevant path. On Windows this is in the MikTex roots. This works fine on the latex side, but TexStudio fails to 'see' the commands and packages defined/imported in this file, though compilation is fine - resulting in syntax error and no autocompletion - annoying.

Goal: have TexStudio recognize and autocomplete commands from stuff included from user Tex file existing on Tex search path.

Reproduce:

  1. Create tex file in random folder defining some commands. It can't be the root tex installation, and please don't offer that as a solution. Add a whole root, so in /random/path add /random/path/tex/latex/common/newfile.tex

  2. On Windows, add /random/path to the MikTex root.

  3. Open TexStudio, make a small article, include the newfile.tex and use a command from within.

The included file will appear non-existing in the structure (red), and any command will be red (so no auto-completion for stuff included), but the Tex will compile fine.

Thing's I've tried:

  1. Mark "Automatically load included files" in Settings->Editor

  2. Check path options in Adv. Editor and build.

so far no luck. Thanks in advance.

PS: I don't want to use absolute/relative paths, that was the whole point of making a user root so the file may be included using only \include{newfile.tex}.

1

Files in a central tex root directory are currently not supported by TeXstudio.

  • Bummer, thanks. Still works though, you just have to remember what you have, which is usually fine. – kabanus Nov 17 '16 at 14:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.