Since I learnt to use LaTeX 1 month ago, I have never used other software. But every time I begin to write a latex file, I will have to type:
\documentclass{article}
\usepackage{geometry}
\geometry{left=2.5cm,right=2.5cm,top=1.0cm,bottom=2.0cm}
\usepackage{graphicx}
\usepackage{subfigure}
\usepackage{color}
\usepackage{amsmath}
...
So when you are writing C++ code, you just need to include some head files like parameter.h. So is there a way to write those \usepackages in a file and then include it?
\documentclassin a file calledmypreamble.styand then load it with\usepackage{mypreamble}. (Note, though, that there are slightly 'better' ways to do this.) – jon Feb 25 '15 at 16:33subfigureis obsolete for about 10 years. I recommend to usesubcaptioninstead. – Johannes_B Feb 25 '15 at 16:58