\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[brazilian]{babel}
\usepackage{xcolor}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{mathrsfs}
\newcommand\Thanos{\textsc{Thanos Tsouanas}}
\newcommand\IMD{Instituto Metr\'opole Digital}
\newcommand\nametag[1]{\textbf{#1:}}

\input{mathsets}

%\newcommand\louise[1]{\noindent \nametag{Louise} {\itshape\color{red}#1}\\}
%\newcommand\daniel[1]{\noindent \nametag{Daniel} {\itshape\color{green}#1}\\}
%\newcommand\bianca[1]{\noindent \nametag{Bianca} {\itshape\color{orange}#1}\\}
\newcommand\person[3]{\noindent \nametag{#1}     {\itshape\color{#2}#3}\\}
\newcommand\thanos[1]{\person{Thanos}{blue}{#1}}
\newcommand\louise[1]{\person{Louise}{red}{#1}}
\newcommand\bianca[1]{\person{Bianca}{orange}{#1}}
\newcommand\daniel[1]{\person{Daniel}{green}{#1}}
\newenvironment
    {secintro}      % name of environment
    {$\spadesuit$ \bgroup\color{gray}}  % what to put before
    {\hspace{\stretch 1}\egroup$\clubsuit$} % what to put after
% thanks to amsthm
\newtheorem {theorem}                   {Teorema}           [section]
\newtheorem {definition}                {Defini\c c\~ao}    [section]
\newtheorem {lemma}        [theorem]    {Lema}
\newtheorem {axiom}        [theorem]    {Axioma}

\author{Thanos}
\title{2a sess\c ao}

\begin{document}

\maketitle

\newpage

\tableofcontents

\newpage

\section{Introduction}

In this session we learn a bit more\ldots

Notice also the space after periods.
This is nice.
Era pra ser assim.
Era pra ser assim.
Era pra ser assim.
Era pra ser assim.
Era pra ser assim.
Era pra ser assim.
Era pra ser assim.
Era pra ser assim.
What a \emph{bad}\/ Bull. % italic correction
{\itshape diffef{}fential}
i{}f{}f
What W afunction $f$ by.
Era pra ser assim.

\begin{theorem}
    Sejam $a, b, c \in \reals$.  Ent\~ao $a\in\reals$.
\end{theorem}

\begin{proof}
Left for the reader.
\end{proof}

\begin{theorem}
    Bla bla
\end{theorem}

\begin{theorem}
    Bla bla bla
\end{theorem}

\begin{definition}
Seja $n\in\nats$.  $n$ \'e primo sse bla.
\end{definition}

\begin{center}
Era pra ser assim.
Era pra ser assim.
\end{center}

\begin{flushright}
Era pra ser assim.
Era pra ser assim.
\end{flushright}

\begin{quote}
You should always define commands semantically.
You should always define commands semantically.
You should always define commands semantically.
You should always define commands semantically.
You should always define commands semantically.
\end{quote}

We sa w this in fig.~3, which was explained in
Theorem~2.2.

Isso seria errado...

\section{Scene 3}
\begin{secintro}
A Louise, a Bianca, o \Thanos\ do \IMD.
e Daniel, {\color{red}at some place}.
Louise and \Thanos\ start talking:
\textbf {TH\-ANO\-S} is eating.
\end{secintro}

\begin{definition}
    Sejam $a, b\in\nats$.  O produto $ab$ e aquilo.
\end{definition}

\thanos{Hello \ldots {Hello.}}
\louise{Yo, what's up?}
\thanos{All fine, what's up with Bianca?}
\louise{She looks weird today.}
\thanos{Totally, and look at Daniel!}
\louise{Meu deus.}
\bianca{We're right here you know!}
\daniel{Pois \'e.}
\thanos{Que que que?}
\person{Marcell}{purple}{Hello guys.}

\section{Math is nice}

\ldots about math.

$$
\mathrm{Re}
\mathit{Im}
\mathsf{Bu}
\mathbf{seg}
\mathcal{ABC}
\mathscr{ABC}
\mathbb{ABC}
\mathfrak{ABCabc}
$$

Defina $f(x) = \frac123 x_1^2$ para todo $x\in\reals$.
$\continuum$
Seja $A = \set{x\in A \st x + y = z}$.
$$
f(k) \iff f : \reals\to \pset{\bools}
$$

Computamos o valor da $f(x+y):$
\begin{align*}
    f(x + y) &= f(x) + f(y) && \text{(por def.~de blah)}\\
             &\leq 5 + 12   && \text{(trivial)}\\
             &= 10
\end{align*}

\[
    f(x) =
    \begin{cases}
        0,      &\text{se $x > 0$} \\
        x^2,    &\text{se $x < -12$} \\
        \frac{x^4}5,    &\text{caso contrario}
    \end{cases}
\]


\section*{This is neat}

Yeap; it is.

\section{Another math mistake}
Compare this:
\[
    mdc(2,3) = 1
\]
with this
\[
    \mathit{mdc}(2,3) = 1
\]
or this
\[
    \mathrm{mdc}(2,3) = 1.
\]
O primeiro eh como se fosse um produto de $g$, $c$, e $d$.
Dos dois segundos, dependendo do caso um estilo pode ser melhor que o outro.
de qualquer forma isso é apenas como ``desenhar'' mesmo esse símbolo; ou seja,
vamos definir nosso comando e ficar usando:
\newcommand\mdc{\mathrm{mdc}}
\[
    \mdc (2,3) = 1
\]
ou, até melhor
\newcommand\MDC[2]{\mathrm{mdc}\left(#1,#2\right)}
\[
    \MDC 2 3 = 1
\]
(Veja o \texttt{more.tex}!)

\vspace{\stretch1}

\begin{center}
    \Large
    Happy \TeX ing!
\end{center}

\vspace{\stretch1}

\end{document}
