% If there are typographic effects you want to achieve in your thesis, the
% most sensible way to achieve them is via macros.  TeX, the typesetting
% engine that underlies LaTeX, provides a powerful macro facility which you
% can use in addition to the standard LaTeX macro mechanisms.

% First, we define a simple macro with no arguments in the conventional LaTeX
% way.  This typesets the word "role" with the correct accent.  You enter it
% in your LaTeX input file as "\role{}"; note the use of the braces after the
% macro to prevent TeX from eating up the spaces that follow the macro
% invocation.

\newcommand{\role}{r\^ole}

% You can define macros that expand to mathematical quantities too.  For
% example, I can never remember the command to produce the symbol that means
% "of the order of" (it looks like "~").  I could use
%   \newcommand{order}{\sim}
% but this would only work in maths mode.  Instead, the following definition
% ensures that \sim appears in maths mode, adding its own delimiters if
% needed.  Note that the character spacing (and even the font, depending on
% how your document is set up) differs slightly in maths and text modes.

\newcommand{\order}{\ifmmode \sim \else $\sim$\fi}

% Here is the definition of a macro that takes a single argument, which it
% typesets in emphasis.  This is intended to be used for foreign words, as in
% "\foreign{viva voce}" and mimics good typesetting practice.

\newcommand{\foreign}[1]{\emph{#1}}

% You can also define macros to produce your own enviroments.  For example, the
% following environment can be used for setting off detail or remarks; the use
% of a custom-named environment means that _all_ occurrences of it can be
% changed simply by editing the definition.

\newenvironment{aside}{\begin{quote}\small}{\end{quote}}


% The remainder of this file contains further, but more hairy, definitions
% that might be of use to you; or describe ways to use TeX's macro mechanism
% in ways other than the standard LaTeX mechanism supports.

% Here is another example of a macro that expands to a fixed piece of text.
% It contains more than one paragraph of material, so we have to tell TeX this;
% otherwise, we would get an error message at the end of its first paragraph.
% The "\long" at the beginning does this.  We use this macro to provide some
% text in the chapters so that the reader can see how the pages look without
% concentrating on reading the text.  This definition is done using the a
% command provided by the TeX typesetting engine rather than the LaTeX macro
% package, so you won't find a description of it in books on LaTeX.

\long\def\randomtext{Duis autem vel eum iriure dolor in henderit in vulputate
  velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis
  at vero eros et accumsan et iusto odio dignissim qui blandit praesent
  luptatum zzril delenit augue duis dolore te feugat nulla facilisi.  Nam
  liber tempor cum soluta nobis eleifend optio congue nihil imperdiet doming
  id quod mazim placerat facer possim assum.
  \begin{equation}
    \tau = \sqrt{a^2 + o^2}
  \end{equation}
  Accumsan et iusto odio dignissik qui blandit praesent luptatum zzril delenit
  augue duis dolore te feugat nulla facilisi.  Eros et accumsan dignissim qui
  blandit praesent luptatum zzril delenit augue duis dolore te feugat nulla
  facilisi.  Nam liber tempor cum soluta nobis eleifend optio congue nihil
  imperdiet doming id quod mazim placerat facer possim assum.  Iusto odio
  dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te
  feugat nulla facilisi.}

% If your thesis is in an area that employs a lot of jargon (what what isn't,
% these days?), then you will probably end up with many acronyms in the text.
% The capitalizaton can make the text look a little unsightly if used to
% excess; and you will also probably want to explain the acronym when it is
% first used.  The following macro lets you define an acronym so that:
%   -- it is typeset in small capitals when it appears in the thesis;
%   -- on the first invocation, it includes the expansion in the text.
% It can also be used if you include a glossary or list of definitions at the
% front of your thesis.  You use the macro as in
%   \acronym{\tla}{tla}{three-letter acronym}
% after which "\tla" generates the correct text in your document.

\def\acronym#1#2#3{\def#1{#3 (\textsc{#2})\gdef#1{\textsc{#2}}}}

% As you write your thesis, there will inevitably be parts that you will need
% to return to later to complete or tidy up.  Rather than relying on memory or,
% worse, pieces of paper, use the following macro to leave yourself notes in
% the margin of the thesis.  They are immediately visible when you read the
% thesis and can be searched for using your favourite text editor.

\def\NB#1{\marginpar{\small\raggedright#1}}

% Finally, we make a couple of tweaks to the internals of the report style.
% This is because the default style sets section titles with justified text,
% which is crazy: when did you last see a hyphenated word in a section title
% typeset by a human compositor?  Hence, we re-define the sectioning macros to
% set their arguments ragged-right.  The only complication is that, as these
% macros are not meant to be seen by people other than style designers, they
% include "@"-signs in their names; LaTeX turns "@"-signs into letters in style
% files but they are not regarded as letters in ordinary text.  We have to
% wrap the modifications inside "\makeatletter".."\makeatother" to avoid
% the definitions producing serious error messages here.



\makeatletter

\def\section{\@startsection {section}{1}{\z@}{-3.5ex plus -1ex minus 
 -.2ex}{2.3ex plus .2ex}{\Large\bf\raggedright}}

\def\subsection{\@startsection{subsection}{2}{\z@}{-3.25ex plus -1ex minus 
 -.2ex}{1.5ex plus .2ex}{\large\bf\raggedright}}

\def\subsubsection{\@startsection{subsubsection}{3}{\z@}{-3.25ex plus
 -1ex minus -.2ex}{1.5ex plus .2ex}{\normalsize\bf\raggedright}}

\makeatother
