% The beginning of every LaTeX document is the a preamble which gives some basic instructions to the LaTeX compiler.
% Lines beginning with % are ignored by the compiler.
% I recommend using article format or the American Mathematical Society format (amsart):
%\documentclass{amsart} % Default font size is small
\documentclass[12pt]{article} % This specifies that we want an article with 12pt font
% Now we tell the LaTeX compiler that we want access to math symbols and theorem environments.
\usepackage{amsmath, amssymb, amsthm}
% Add links (within documents and to the outside)
\usepackage{hyperref}
% We can also set margin sizes (and other things) using the geometry package
\usepackage[margin=1in]{geometry}
% Define some theorem environments.
\newtheorem{proposition}{Proposition}
\theoremstyle{definition}
\newtheorem{definition}{Definition}
% Define some convenient symbols
\newcommand{\ZZ}{\mathbb{Z}}
\newcommand{\NN}{\mathbb{N}}
\newcommand{\RR}{\mathbb{R}}
% Tell the compiler your name and the portfolio entry title
\author{Your Name Here}
\title{Sample portfolio entry}
% We're done with the preamble: begin the actual document.
\begin{document}
% Have the compiler make a title
\maketitle
If you want to write something you can just type like this.
\LaTeX{} will automatically indent and space as appropriate to the document.
Quotes are tricky; some programs will automatically replace regular quotation marks with the correct symbols, but it looks like the online editors aren't doing that.
Instead you'll have to use the single quote (twice) at the upper left of the keyboard to open a quotation: ``It is required to find the Fluxion of $a + x +y -z$'' (from l'Hospital's \href{https://archive.org/details/methodfluxionsb00stongoog}{\textbf{Treatise on Fluxions}}).
If you want a new paragraph, you'll need to skip a line.
You can put each sentence on its own line and put as many spaces in as you want: \LaTeX{} ignores most whitespace.
\begin{definition} \label{not-really-a-definition}
% Labels make it easy to refer back to something.
A definition could go here if you wanted.
\end{definition}
Right now Definition \ref{not-really-a-definition} isn't really a definition.
But we can still talk about it using the ref command and the reference is a link to the definition (which is useful for bigger documents).
You can also produce links like this: \url{http://web02.gonzaga.edu/faculty/axon/301/portfolio.html}.
\begin{proposition} \label{quadratic}
% Math goes between dollar signs or \[ in here \]
The equation $x^2 - 4y - 2 = 0$ has no integer solutions.
\end{proposition}
You may want to include some discussion before beginning the proof.
For example, Proposition \ref{quadratic} translated into symbols is \[
(\forall x \in \ZZ) (\forall y \in \ZZ) [x^2 -4y - 2 \neq 0 ].
\]
\begin{proof}
Suppose (by way of contradiction) the equation $x^2 - 4y- 2 = 0$ has an integer solution.
Let $a, b \in \ZZ$ be that solution.
Hence $a^2 - 4b - 2 = 0$.
Consequently $a^2 = 4b + 2 = 2(2b + 1)$.
Thus $a^2$ is even.
It then follows from earlier work that $a$ is even.
By definition (of even) there is an integer $c$ such that $a = 2c$.
Hence $a^2 = (2c)^2 =4c^2 = 2(2b + 1)$.
Dividing by $2$ shows that $2c = 2b+1$.
This is a problem because $2c$ is even but $2b+1$ is odd.
We have reached a contradiction; our starting assumption must have been false.
Therefore the equation $x^2 - 4y - 2 = 0$ has no integer solutions.
\end{proof}
% Everything that begins also has to end, including this document
\end{document}