There is some kind of workaround one can use. You can write a small macro to run a single file using the
subfiles class in TeXstudio. Actually it the macro doesn't care about the documentclass.
Suppose you have the following two files
My main file text.
Some subfile text
Now you can define a macro in TeXstudio using Script.
var filename = app.getCurrentFileName();
var dir = filename.substring(0, filename.lastIndexOf("/"));
var proc = system("pdflatex " + filename, dir);
The macro does the following:
- Get the current select filename
- Extract the directory path
pdflatex <filename> inside the
cmd and passes the correkt directory to the command line
TeXstudio uses keybindings for macros by default Shift + F1 but you are able to remap them. The number of the Fx key depend on the number of macros you have defined.
Now you can run the only the subfile by
- Select the
- Press Shift + F1 to run the macro. (TeXstudio might ask you for futherer privileges)
EDIT: I've created an issue asking about how to load a pdf file using a macro script on https://github.com/texstudio-org/