Sie sind auf Seite 1von 3

%NOTE: This has a ".txt" file extension for upload reasons, change it to ".

tex" for
it to open with your latex compiler

% This is a quick begginers guide to using latex.


% Copy and paste this into your compiler - and work with it and the compiled pdf
together
%
%Enjoy,
%Ben

%websites:
% http://www.latex-project.org/ftp.html - to get latex
% http://tobi.oetiker.ch/lshort/lshort.pdf - 'not so short...' the best refernece
% http://en.wikibooks.org/wiki/LaTeX - another good refernce

\documentclass[a4paper]{article}
\usepackage{a4wide}
\usepackage{amsmath}
\usepackage{enumerate}
%========================================================
%========================================================
%========================================================
\begin{document}
\begin{center} \textbf{\large Ben's Intro guide to \LaTeX}
\end{center}
\section{Start}
This is just a very brief introduction to \LaTeX. The best sources are the `Not So
Short Introduction to \LaTeXe' and the wikibooks web pages.
It doesn't look pretty - just designed to show you the main features.
--It was made to be read alongside the actual code - or else it's pretty useless.
\section{Useful things}
\begin{enumerate}
\item you can make lists with `enumerate'
\begin{enumerate}
\item like this
\begin{enumerate}
\item and this
\end{enumerate}
\end{enumerate}
\item A double backslash forces a new line\\ like this.
\item Leaving a blank line in the code signmals a new paragraph
if
you just
type on the next line, nothing
will
happen. This is usefull for neatly setting out code. (new paragraphs by default
have no line spacing, but are indented..you can change this, but there's no point)
\item If you need more space between the lines, use `vspace'
\vspace{10pt} like that.
\item anything after a \% sign, is a comment (i.e. not compiled) %this is a comment
- they help you organise your code etc.
\end{enumerate}
\section{Maths}
\subsection{three types of equations}
\subsubsection{Inline equations}
You can use the \$ symbol to write equation, such as $E=mc^2$ in the text.
\subsubsection{equations}
Using these will make you equations appear on their own line \[3x^2+2=5\]
And by you can use this to auto-number the equations,
\begin{equation}3x^2+2=5\end{equation}
If we put a `label' in our equation, we can reference it, by the label name.
\begin{equation}
3x^2+2=5
\label{myequation}
\end{equation}
you can now also use the `ref' command to reference equation \ref{myequation}
\subsubsection{Aligned equations}
Use this to align your equations
\begin{align}
y&=3x^2+2\\
&= 17z\\
&=3
\end{align}
Note that the \& symbol tells \LaTeX where to align the equations, and the two
back-slashes puts a new line.
If you don't want them numbered use the starred version
\begin{align*}
y&=3x^2+2\\
&= 17z\\
&=3
\end{align*}
Or if you want to chose which lines to number use the `notag' command
\begin{align}
y&=3x^2+2\\
&= 17z\notag\\
&=3
\end{align}
We can reference these in the same way as we referenced equation \ref{myequation}
\subsection{random stuff}
a matrix:
\[
\begin{pmatrix}
1&2&3\\
4&5&6\\
7&8&9
\end{pmatrix}
\]
up $x^2$ and down $x_2$ or $x^{whatever\;you\;want} x_{whatever\;you\;want}$
\[ \int \qquad \sum \qquad \sqrt{\text{i'm rooted!}}\qquad \sqrt[n]{n^{th}}\]
spacing; (and maths text)
\[x^2 \; a \: b \, \text{those are very small}
\quad \text{bigger} \qquad \text{biggest} \]
fractions:
\[ \frac{numerator}{denominator}\]
some characters
\[\alpha \beta \delta \Delta \nabla \partial\] etc. etc.
\section{packages}
To use certain aspects, you need to load a package containing that code etc.
See the top of the document (the preamble).
The ones there already should be fine for most things.
\section{bye}
That should be enough to to get you started - anything else, look to the two
references!
\end{document}

Das könnte Ihnen auch gefallen