jlelong / LaTeX-Workshop-wiki

Public repo for contributing to https://github.com/James-Yu/LaTeX-Workshop/wiki
6 stars 35 forks source link

Feature request: option to set root file through a workspace setting #106

Closed cascremers closed 1 year ago

cascremers commented 1 year ago

When working with multi-file projects that have multiple alternate root files that include the same sub-files, the current root file detection can be hard to switch. For example:

Using the current root file setup, it is cumbersome to switch between A1 and A2, especially when editing Cx, as the root file to compile needs to be either hardcoded in all these files B,C1..CN, or one needs to switch back to A1/A2 to trigger the build.

Requested feature:

A generic solution that would probably work for many other use cases, is to introduce a workspace setting that, if present, overrides the root file detection (https://github.com/James-Yu/LaTeX-Workshop/wiki/Compile#the-root-file). This could be called something like, e.g., latex-workshop.latex.rootfile or latex-workshop.latex.forceRootfile.

(Note that I tried to simulate this behavior with include/exclude lists for the root file search, but this didn't yield the override I wanted in all cases.)

cascremers commented 1 year ago

Hmm, actually, this should not be in the wiki part. Opening a related issue in the main LaTeX-Workshop repo and closing this one.