-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnotes.tex
196 lines (151 loc) · 7.89 KB
/
notes.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
\documentclass[a4paper,12pt]{article}
\usepackage{tma}
\myname{Peter McFarlane}
\mypin{A1234567}
\mycourse{L101}
\mytma{01}
\lhead{tma.sty notes}
\chead{}
\begin{document}
\hfill\fbox{Update for 2016/10/26 v1.03b}
\section*{Notes}
\thispagestyle{empty}
This document describes Peter McFarlane's \verb|tma| package. In order to use it, the \verb|tma.sty| file should be in the
same directory/folder as your main \verb|.tex| source file, or in the filepath for your compiler. Using MiKTeX v2.9
on Windows this would be (you need to add the tma folder):\\
\verb|C:\Program Files\MiKTex 2.9\tex\latex\tma|
Once you have added \verb|tma.sty| to the directory, it is necessary to let MiKTeX know that it is there. So
load MiKTeX, go to MiKTeX Settings and press the `Refresh FNDB' (\textbf{F}ile \textbf{N}ame \textbf{D}ata\textbf{B}ase) button that tells \LaTeX\ to remake the
database of all the files, then it will find \verb|tma.sty|. See:\\
\verb|http://docs.miktex.org/manual/configuring.html#fndbupdate|.
Other \TeX\ installations will have similar centralised file storage settings for style files.
The contents of the file in which you write a TMA should look like this:
\begin{verbatim}
\documentclass[a4paper,12pt]{article}
\usepackage{tma}
%% or include options [roman] or [alph]:
% \usepackage[roman]{tma} % For Roman numerals in subparts
% \usepackage[alph]{tma} % For the default alphabetical letters in subparts
\myname{Nosmo King}
\mypin{A1234567}
\mycourse{L101}
\mytma{01}
\begin{document}
\include{question_01}
\include{question_02}
\end{document}
\end{verbatim}
It is not necessary to use \verb|\include| and write your questions in separate files. But do start each
question with \verb|\begin{question}| and end it with \verb|\end{question}|, whether or not you use
separate files for each question or write all the questions in the main text.
If you wish to have margin notes, then include \verb|\marginnotes| in your preamble, whereupon
\verb|\marginnote{}| is equivalent to \verb|\marginpar{}| and places the context of the brackets in the margin.
The question numbers and question parts appear in the margin.
The normal sequence for numbering of questions is Arabic numerals for the main question numbers; letters for
the parts; and Roman numerals for the subparts. If you are on a module that uses Roman numerals for the part,
such as M381, then you can pass the option \verb|[roman]| to the \verb|\usepackage| command to vary the numbering
system. See below for further details of options.
If you want to skip a question (ie jump straight from question 1 to question 3, then use (for example)
\verb|\begin{question}[3]|. To get parts of questions (a), (b), (c) etc, use \verb|\qpart|. To skip part
question numbers \verb|\qqpart[3]| would force a (c). For subparts (i), (ii), (iii) etcetera then use \verb|\qsubpart|.
There is a slight gap between paragraphs and no indent, although as mentioned, the
question numbers are in the left hand margin.
\subsection*{Options}
When requesting the \verb|tma| package with the \verb|\usepackage| command, it is possible to also pass one or
more optional parameters to influence the way that the package will operate. Just as it is typical to let the
\verb|\documentclass| have options specifying the paper and font size, so can many other packages being given options.
\begin{tabular}[2]{lp{0.8\textwidth}}
\hline
\textbf{Option} & \textbf{Effect} \\
\hline
\noalign{\vskip 3pt}
\verb|[alph]| & (default) question numbering as 1(b)(iii) \\
\verb|[roman]| & varies question numbering to sequence used by M381 i.e. 1(ii)(c) \\
\verb|[cleveref]| & question numbering creates automatic referencing for use with \verb|cleveref| package \\
\verb|[pdfbookmark]| & add pdf bookmarks for each question using \verb|hyperref| package \\
\hline
\end{tabular}
To use a package option, place the option(s) before the package name in square brackets, for example:\\
\verb|\usepackage[roman,cleveref]{tma}|
\subsection*{New commands}
New commands provided by the package include the following:
\hfil\verb|\R|\qquad\R\hfil\verb|\N|\qquad\N\hfil\verb|\Z|\qquad\Z\hfil\verb|\Q|\qquad\Q\hfil\verb|\C|\qquad\C
In typeset mathematics, constants such as \e , \ii \ $(\sqrt{-1})$, and $\uppi$ should be not be italic,
nor should \dd \ (as in $\deriv{y}{x}$ or $\int \e^x \,\dd x$). Hence:
\hfil\verb|\dd|\qquad\dd\hfil\verb|\e|\qquad\e\hfil\verb|\ii|\qquad\ii\hfil\verb|\uppi|\qquad$\uppi$
(\verb|\d| produces a dot over the following character. \verb|\i| produces a dotless i to enable accents
over a na\"\i ve \i. \verb|\uppi| is in fact provide by the upgreek package (and can be used for all Greek
letters). \verb|\dd| also adds a small space before the $\dd x$ so that it is slightly separated from the
integral's equation instead of being part of it.
\qquad \qquad \verb|\deriv{y}{x}|\qquad $\genfrac{}{}{}{0}{\dd y}{\dd x}$ %
\qquad \qquad \verb|\pderiv{y}{x}|\qquad $\genfrac{}{}{}{0}{\partial y}{\partial x}$
\qquad \qquad \verb|\psderiv{z}{x}{y}|\qquad $\genfrac{}{}{}{0}{\partial ^2z}{\partial y\partial x}$ %
Other commands, some of which have been plagiarised from other peoples' style files include mathematical
functions for the principle logarithm, and various group theory and complex analysis functions. Also a
\verb|\rect| is included for M208 people (other shapes are included by virtue of the \verb|wasysym| package).
\begin{table}[ht]
\centering
\begin{tabular}[3]{lll}
\hline
\verb|\Rr| & \Rr & (for a region) \\
\verb|\ve{j}| & $\ve{j}$ & for emboldened vectors \\
\verb|\vec{AB}| & $\vec{AB}$ & for traditional vectors \\
\verb|1\st| & $1\st$ & also \verb|\nd|, \verb|\rd|, \verb|\nth| \\
\verb|\rect| & \rect \\
\verb|\comb{3}{5}| & \comb{3}{5} \\
\verb|\perm{3}{5}| & \perm{3}{5} \\
\verb|\re| & $\re $ & \verb|\Re| will produce the traditional $\Re$ \\
\verb|\im| & $\im $ & \verb|\Im| will produce $\Im$ \\
\verb|\Log| & $\Log $ \\
\verb|\Arg| & $\Arg $ \\
\verb|\Wnd| & $\Wnd $ \\
\verb|\Res| & $\Res $ \\
\verb|\Ker| & $\Ker $ \\
\verb|\Res| & $\Res $ \\
\verb|\Orb| & $\Orb $ \\
\verb|\Stab| & $\Stab $ \\
\verb|\Fix| & $\Fix $ \\
\hline
\end{tabular}
\end{table}
\newpage
\subsection*{Packages automatically loaded}
Some packages are automatically loaded when the \verb|tma| package is used. These are shown in the table below:
\begin{table}[ht]
\centering
\begin{tabular}{cl}
\hline
\textbf{\sc Package} & \textbf{\sc Notes} \\
\hline
\noalign{\vskip 3pt}
\texttt{amsfonts} & \\
\texttt{amsmath} & \\
\texttt{amssymb} & \\
\texttt{amsthm} & \\
\texttt{bm} & \begin{minipage}[t]{0.8\textwidth}
This allows you to embolden maths formulae: \\
\verb|$\bm{\int \e^x \dd x}$| \\
$$\int \e^x \dd x=\bm{\int \e^x \dd x}$$
\end{minipage}\\
\texttt{fancyhdr} & \\
\texttt{geometry} & \\
\texttt{graphicx} & \\
\texttt{lastpage} & \\
\texttt{upgreek} & \\
\texttt{verbatim} & \\
\texttt{wasysym} & \\
\texttt{xifthen} & \\[4pt]
\hline
\noalign{\vskip 4pt}
\texttt{cleveref} & {This is only loaded if the \verb|cleveref| option is given to the style.} \\
\texttt{hyperref} & {This is only loaded if the \verb|pdfbookmark| option is given to the style.} \\
\hline
\end{tabular}
\end{table}
Note that the latter two packages are conditionally loaded only when the appropriate option is specified.
\vskip 1in
\subsection*{\dots and finally}
Any comments, ideas, or suggestions (either of style, or for more macros) are welcomed.
\vskip 1in
$$\dots\quad\infty\quad\maltese\quad\infty\quad\dots$$
\end{document}