I am using the package subfiles with the main document as main.tex and inside the main.tex there are:
\subfile{file1.tex}
\subfile{file2.tex}
and I defined some commands inside main.tex
\usepackage{todonotes}
\newcommand{\todoiteminline}[3]{
\todoitemtemplate{#1}{#2}{#3}{inline}{red}
}
but when I compile the whole project, these commands are not recognized in subfile. The error is undefined control sequence where I used the command todoiteminline.
How can I use this command in each subfile?
\input{file.tex}orinclude{file.tex}. – Pietro D'Antuono Jan 04 '17 at 10:29main? – Sigur Jan 04 '17 at 10:30