forked from liantze/usmthesis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchap-intro.tex
122 lines (95 loc) · 5.32 KB
/
chap-intro.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
\chapter{Introduction: Samples of Basic \LaTeX{}}\label{chap:intro}
Hello and welcome, \ac{USM} research postgrad! The \verb|usmthesis| package and template files were written in the hope that they may help you prepare your research thesis using \LaTeX, based on the latest \ac{IPS} requirements (as indicated in usmthesis.tex and usmthesis.cls headers).
\LaTeX{} is powerful and produces beautiful documents. However, there is definitely a learning curve to it -- one that is worth the effort. %This is also a learning process for the author, so
If you find any errors in these templates or documents, or have any suggestions or feedback, do e-mail me about it (\path{wnarifin@gmail.com}).
%(\path{liantze@gmail.com}). -- Please do not disturb her anymore, OK :-)
The author cannot always guarantee prompt response, however. \Smiley
MiK\TeX{}, my recommended \LaTeX{} distribution for Windows, is available on the CSPC'07 CD. A step-by-step installation walkthrough is available at \citep{lim:latextypesetting}.
\section{Some Simple Command Usages.}
There are plenty of free \LaTeX{} tutorials online, some of which are listed in the bibliographies or available at \url{http://e-office.cs.usm.my}. This sample thesis includes some examples to do some common tasks. We start with some examples for lists (both bulleted and numbered), highlighting texts in bold and italic, and URLs:
\lstset{breaklines=true, basicstyle=\small\ttfamily, language=[LaTeX]TeX, columns=fullflexible, framesep=10pt, xleftmargin=16pt, keywordstyle={\mdseries}}
\begin{figure}[htb!]
\begin{lstlisting}
\begin{enumerate}
\item bulleted and numbered lists,
\item footnotes\footnote{This is a footnote. However note that footnotes are not encouraged for the sciences.},
\item font effects such as
\begin{itemize}
\item \textbf{bold},
\item \emph{italic}, and
\item \texttt{typewriter-like}
\end{itemize}
\item URLs and e-mail addresses: \url{http://www.cs.usm.my/~llt/}, \url{dummy.add@hotmail.com};
\item citations: see Chapter \ref{chap:review}.
\end{enumerate}
\end{lstlisting}
\caption{Common Layout and Formatting Tasks. Note how this long title wraps around I hope it works anyway. Look it needs more, so here's some more longer text. Is that enough? I hope it is.}\label{fig:simple}
\end{figure}
\begin{enumerate}
\item bulleted and numbered lists,
\item footnotes\footnote{This is a footnote. However note that footnotes are not encouraged for the sciences.},
\item font effects such as
\begin{itemize}
\item \textbf{bold},
\item \emph{italic}, and
\item \texttt{typewriter-like}
\end{itemize}
\item URLs and e-mail addresses: \url{http://www.cs.usm.my/~llt/}, \url{dummy@hotmail.com};
\item citations: see Chapter \ref{chap:review}
\end{enumerate}
Incidentally, if you feel that the lists above are too far apart vertically, you can customise them using the \texttt{enumitem} package. The effect is then like the following:
\begin{figure}[htb!]
\begin{lstlisting}
\begin{enumerate}[nosep]
\item item one,
\item item two,
\item item three.
\end{enumerate}
\begin{itemize}[nosep]
\item item one,
\item item two,
\item item three.
\end{itemize}
\end{lstlisting}
\caption{Compact Lists}\label{fig:enumitem}
\end{figure}
\begin{enumerate}[nosep]
\item item one,
\item item two,
\item item three.
\end{enumerate}
\begin{itemize}[nosep]
\item item one,
\item item two,
\item item three.
\end{itemize}
Granted, the lists are still wide, but this is because we need to honour the requirement for double line-spacing.
\section{Special Characters}
Bear in mind that certain characters are special \LaTeX{} symbols and need to be escaped, as shown in Table~\ref{tab:special:char}.
\begin{table}[htb!]
\caption{Special Characters in \LaTeX}\label{tab:special:char}
\centering
\begin{singlespace}\begin{tabular}{|c | l | l|}
\hline
Symbol & Name & Escape code \\\hline\hline
\# & \normalsize{hash, pound} & \verb|\#| \\
\$ & \normalsize{dollar} & \verb|\$| \\
\% & \normalsize{percent} & \verb|\%| \\
\^{} & \normalsize{``hat''} & \verb|\^{}| \\
\& & \normalsize{ampersand} & \verb|\&| \\
\_ & \normalsize{underscore} & \verb|\_| \\
\{ & \normalsize{left brace} & \verb|\{| \\
\} & \normalsize{right brace} & \verb|\}| \\
\~{} & \normalsize{tilde} & \verb|\~{}| \\
$\sim$ & \normalsize{wide tilde} & \verb|$\sim$| \\
`` & \normalsize{open double quotes} & \verb|``| \\
'' & \normalsize{close double quotes} & \verb|''| \\
\hline
\end{tabular}\end{singlespace}
\end{table}
Note that for quotation marks, you might prefer \verb|``this'' and `that'| (``this'' and `that')
instead of \verb|"this" and 'that'| ("this" and 'that').
If you need to typeset special characters (such as \Stopsign, \Biohazard, \Smiley, $\curvearrowright$, etc), take a look at the Comprehensive \LaTeX\ Symbol List. It should be under \path|C:\Program Files\MiKTeX 2.9\doc\info\symbols\comprehensive\symbols-a4.pdf| if you installed MiKTeX on a Windows machine.
\section{Useful Resources}\label{sec:resources}
\citep{latex:companion} is a \emph{very} useful book --- but it's quite an investment at RM180++. A worthy one, nevertheless. \citet{roberts} has a website with very good \LaTeX{} tutorials at \url{http://www.comp.leeds.ac.uk/andyr/misc/latex/}, too. Don't forget the famous \texttt{lshort} tutorial \citep{lshort}.
I've also compiled a list that I find useful at \url{http://liantze.penguinattack.org/latextypesetting} \citep{lim:latextypesetting}.