1

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?

Gonzalo Medina
  • 505,128
Taitai
  • 235
  • If you are not careful, it leads to great inflexibility, but try putting everything below \documentclass in a file called mypreamble.sty and then load it with \usepackage{mypreamble}. (Note, though, that there are slightly 'better' ways to do this.) – jon Feb 25 '15 at 16:33
  • 1
    FYI: subfigure is obsolete for about 10 years. I recommend to use subcaption instead. – Johannes_B Feb 25 '15 at 16:58

0 Answers0