Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Can someone provide me an example of a nice preamble to write a math thesis? I am currently using

 \documentclass[12pt]{article} 
\topmargin -15mm

\textheight 24truecm   
\textwidth 16truecm    
\oddsidemargin 5mm
\evensidemargin 5mm   
\setlength\parskip{10pt}
\pagestyle{empty}          

\usepackage{boxedminipage}
\usepackage{amsfonts}
\usepackage{amsmath} 
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{amsthm}
\usepackage{t1enc}
\usepackage{subfig}

\newtheorem{theorem}{Theorem}[section]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{example}[theorem]{Example}
share|improve this question
9  
The best preamble is the preamble, that does contain only these packages and definitions you are using. BTW: You should read l2tabu to avoid obsolete packages like t1enc (use \usepackage[T1]{fontenc} instead). And it would be better to use packages like geometry or typearea to setup text area and margins. At least better use \setlength to set lengths instead of using low level TeX. –  Schweinebacke Nov 8 '11 at 16:00
1  
Paper and page dimensions are better set up by the geometry package. The t1enc package is obsolete and should be replaced by the fontenc package. –  Thorsten Donig Nov 8 '11 at 16:02
2  
See Kevin Klement's (@frabjous') comments here on why a standard preamble is not optimal. charlietanksley.net/philtex/another-sample-preamble –  Seamus Nov 8 '11 at 16:07
    
@Seamus Couldn't agree with you more on this one, although there is value not to add too many packages until you have written 100 or so pages, as by then you know what you need. –  Yiannis Lazarides Nov 8 '11 at 16:52

3 Answers 3

In general, I suggest to start with a preamble that is as small as possible and to add packages and/or custom commands as the need for them arises.

With regard to your code sample:

  • Don't fiddle with \topmargin, \textheight and similar commands. If you want to change the margins of your document, use the geometry or typearea packages.

  • If you really must denote new paragraphs by additional spacing instead of indentation, replace \setlength\parskip{10pt} with the parskip package. See this answer for details.

  • The t1enc package is obsolete -- use \usepackage[T1]{fontenc} instead. See l2tabu for other obsolete packages/commands.

share|improve this answer
1  
Better yet, don't use parskip either, and keep the standard intentation. :) –  egreg Nov 8 '11 at 16:09
    
@egreg: I've qualified my statement. :-) –  lockstep Nov 8 '11 at 16:12

Just to add to the comments of the other posters. Just add packages as you need. A thesis preamble is bound to expand fast. Divide it into sections such as General, Typography, Mathematics, Commands etc. As the preamble grows some of these you will pass to a package say moremath.sty.

Keep the style simple, no fancy fonts. Under typography you can include microtype and stmarysd. Under mathematics you have included the basis and I will second Mico's suggestion of mathtools. Under commands put all your specials. For example under theorems you should include all your formatting decisions as well. As a bonus, here is some styling for theorems.

%% Theorems formatting 
\newtheoremstyle{itheorem}{}{}{\itshape}{}{\bfseries}{.}{ }{#1\if!#3!\else\ \fi\thmnote{#3}}
\newtheoremstyle{icorollary}{}{}{}{}{\itshape}{.---}{0pt}{#1}
\newtheoremstyle{numcorollary}{}{}{}{}{\itshape}{.}{ }{#1\if!#3!\else\ \fi\thmnote{#3}}
\newtheoremstyle{idefinition}{}{}{}{}{\bfseries}{.---}{0pt}{}
\newtheoremstyle{ilemma}{}{}{\itshape}{}{\bfseries}{.---}{0pt}{#1\if!#3!\else\ \fi\thmnote{#3}}
\newtheoremstyle{iother}{}{}{\itshape}{}{\bfseries}{.---}{0pt}{\thmnote{#3}}
\theoremstyle{ilemma}
\newtheorem*{lemma}{Lemma}
\theoremstyle{itheorem}
\newtheorem{theorem}{Theorem}
\theoremstyle{iother}
\newtheorem{other}{}
\theoremstyle{icorollary}
\newtheorem{corollary}{Corollary}
\theoremstyle{numcorollary}
\newtheorem{ncorollary}{Corollary}
\theoremstyle{idefinition}
\newtheorem*{definition}{Definition}
\newtheorem*{definitions}{Definitions}
\newtheorem*{defnorder}{Definition of Order}

%% Proof environment
\renewcommand{\proofname}{\upshape\bfseries Proof}

enter image description here

Keep the style simple and clean with minimal bold and don't use the standard LaTeX class.

share|improve this answer

In addition to the math-related packages you're already loading, you may want to take a look at the mathtools package, which is a part of the mh bundle of packages. You seem to be comfortable with Computer Modern/Latin Modern fonts. If this assumption is correct, you may want to load the lmodern package instead of the t1enc package. (The Latin Modern fonts are already encoded in T1.)

You should take a look at the geometry package and its margin-setting commands, to let you simplify the setup of the page layout. (As of now, the collection of commands looks like it was thrown together haphazardly.)

What I'd really want to question about your preamble is the use of \pagestyle{empty}. Does your school require this? If not, please do your readers a favor and delete this command, so that LaTeX can print page numbers.

share|improve this answer
    
Thanks to you all. Stackexchange is the best. –  Nadori Nov 10 '11 at 16:55

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.