Hide the \chapter{} with subfile in article docs, from report docs

I've got a little problem, I have to submit an assignment almost every week to our tutor, but we have to submit only one document to our prof. So I was thinking to use the article class document for my tutor, and using the report class for the final assignment.

I'm using the subfile package, so in the main for my tutor, I just "link" my file for the current assignment, but because I use the exact same file also to do the reportclass document for my professor, thus using \chapter{} at the beginning of every assignment I always get a little "title" with the chapter name, before the whole document.

So far I've found very little documentation on the if condition in LaTeX, can you suggest me some complete guide?? Or maybe any other solutions??

Thanks.

Use the memoir class which is a superset of the book, report, and article classes.

% memartprob.tex  SE 539895

\documentclass[
%  article % uncomment this to get article class output
]{memoir} % default book/report output

\begin{document}
\tableofcontents

\chapter{Divisional title}
\section{Subsidiary title}

\end{document}


Enter the text using \chapter, etc. With the article class option these will be treated as \section, without the option they are standard chapters. (texdoc memoir).

• Ok thanks @Peter Wilson, it's a nice option, but if I would totally get rid of the \chapter{}, are there any options? As I usually use the chapter name on the cover of my tutor's assignement such as a title for the whole document. Because when I try this on the "book" cover I also get my \fancyhead and my \fancyfoot, which shouldn't be on this page...
– Fr3d
Sep 27, 2020 at 19:52