I use the subfiles package to compile several files in a main document.
I have for example a document file1.tex in 12 pt, and another file2.tex in 10 pt both in article class( in preamble : \documentclass[12pt]{article}, and \documentclass[10pt]{article}).
I want to compile them in the file main.tex :
\documentclass[12pt]{article}
\usepackage{subfiles}
\makeatletter
\let\org@subfile\subfile
\renewcommand*{\subfile}[1]{%
\filename@parse{#1}% LaTeX's file name parser
\expandafter
\graphicspath\expandafter{\expandafter{\filename@area}}%
\org@subfile{#1}%
\newpage
}
\makeatother
\begin{document}
\subfile{file1}
\subfile{file2}
\end{document}
But how to tell LaTeX to compile file1.tex in 12 pt and file2.tex in 10 pt ?
I'm searching a way to pass the fontsize of the files.tex files as an argument to the main.tex file, something which looks like {\fontsize{"fontsizeoffile1.tex"}\selectfont\subfile{file1}} maybe ?
I want to do this for many files, so the need to take automatically the font size in the file for each file.
Thank of help.
\inputcommands in the subfiles. – Alan Munn May 15 '15 at 15:03geometrypackage), and it's tedious to put in each file this code, more than put[12pt]in class option. But thanks for your answer. – math45 May 15 '15 at 15:57