This is a preamble that I've built up over years of using LaTeX to draft homework assignments, research papers, and other mathematical documents. It imports a large number of packages and defines a lot of custom commands for typesetting common mathematical notation. A demo TeX file is also included to show how these commands are used.
You can import this preamble into your own files by including the line \input{math_preamble.tex}
in your preamble (replacing the argument with the appropriate file path to the math_preamble.tex
file). You can also simply copy and paste the entire contents of the file into your own preamble, or simply pick out a few custom macros to copy and paste.