I have these lines
\documentclass[../main.tex]{subfiles}
\usepackage{float}
\usepackage[font=small,skip=2pt]{caption}
\usepackage{graphicx}
\graphicspath{{Images}{../Images/}}
\input{commands} % global vars and fucntions
\begin{document}
...
when I try to compile this with texmaker using MiKTeX Windows 10, I get the error that lines 3, 4 and 5 (the ones with \usepackage) should be in the preamble. Aren't they? These are the only errors in the project, my commands.tex is getting recognized just fine.