You can write a class:
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{MyProject}[2018/03/10 v1.0 Class for my project]
\LoadClass[<options>]{<class name>}% former: \documentclass[...]{...}
\RequirePackage[<options>]{<package name>}% former: \usepackage[...]{...}
% other stuff from the preamble
\endinput
\documentclass and \usepackage need other names, see above.
Also, remove \makeatletter/\makeatother pairs, because \makeatletter is automatically active in class and package files.
Then use the class:
\documentclass{MyProject}
\begin{document}
...
\end{document}
A class or package have advantages over a simple \input:
- Options can be added.
Some version support by LaTeX:
\documentclass{<class>}[2018/03/10]
\usepackage{<package>}[2018/03/10]
Then, LaTeX will warn, if the class or package are older than specified.
mypreamble.texand then use\input{mypreamble}. No real need to make a package. – Alan Munn Mar 10 '18 at 04:32\bibliographystylein there as well? – Vass Mar 10 '18 at 04:45