% ---- The rntz class ----
% Based on extarticle, and supports most of its options. Notable differences:
%
% 1. Section & sub-section numbers go into the left margin. Option `nomarginums'
%    disables this. Option `ribbons' puts these numbers on purple-colored
%    ribbons extending from page left.
%
% 2. Sections & sub-sections headings are smaller.
%
% 3. Sub-sub-sections are unnumbered.
%
% 4. Redefines \maketitle and the `abstract' environment.
%
% It also has a somewhat random grab-bag of other features I happen to use:
%
% 5. Requires and configures hyperref, url, and cleveref.
%
% 6. Requires amsmath & amsthm, and defines theorem, conjecture, lemma,
% definition, and corollary environments. It sets them to share a single running
% counter.
%
% 7. Defines some colors, taken from acmart.cls:
% ACM{Blue,Yellow,Orange,Red,LightBlue,DarkBlue,Green,Purple}.
\documentclass{rntz}

%% %% Alternatively, the following suffices for this document, if you just wish
%% %% to see the effect of the other packages in this repo:
%% \documentclass{article}
%% \usepackage{amsmath,amsthm}
%% \usepackage{hyperref,cleveref}
%% \theoremstyle{definition}
%% \newtheorem{theorem}{Theorem}
%% \newtheorem{conjecture}[theorem]{Conjecture}
%% \newtheorem{lemma}[theorem]{Lemma}
%% \theoremstyle{definition}
%% \newtheorem{definition}[theorem]{Definition}
%% \theoremstyle{remark}
%% \newtheorem*{corollary}{Corollary}
%% \theoremstyle{plain}            %back to default


% ---- rntzgeometry and narrow ----
%
% \usepackage{rntzgeometry} chooses a paper size and sets up reasonable margins
% for it. Options: a5, b5, a4, and letter.
%
% \usepackage{narrow} produces a single narrow column of text. The figure* and
% fullwidth environments expand to a larger width. Options:
%
% width=LEN
%   Text width. Default is 345pt.
% fullwidth=LEN
%   Width for figure* and fullwidth environments. Default is \textwidth, i.e.
%   whatever the text width was before you used narrow.sty.
\usepackage[b5]{rntzgeometry}
\usepackage{narrow}


% ---- rntzfont ----
%
% rntzfont chooses from a set of paired fonts, with appropriate scalings and
% line spacings.
%
% Text font options are alegreya, baskervald, charter, cochineal, libertine,
% librebaskerville, palatino, pt, and source. Math font options are euler,
% newmath, and nomath (which doesn't change the math font). Default is charter
% with euler.
\usepackage{rntzfont}

% Some small typographic improvements.
\usepackage[T1]{fontenc}
\usepackage[spacing,tracking,letterspace=20]{microtype}
\frenchspacing

\usepackage{lipsum} % for example text.

\title{Towards Better Typography in \LaTeX{}}
\author{Lore M. Ipsum}
\date{\today}


\begin{document}
\maketitle

\begin{abstract}
  Nam dui ligula, fringilla a, euismod sodales, sollicitudin vel, wisi. Nam
  lacus libero, pretium at, lobortis vitae, ultricies et, tellus. Donec aliquet,
  tortor sed accumsan bibendum, erat ligula aliquet magna, vitae ornare odio
  metus a mi. And on the \emph{n}\textsuperscript{th} day, Knuth created \TeX,
  and all was woe.
\end{abstract}

\section{Mostly fonts}\label{sec:one}

\newcommand{\testtext}{\textsc{This text} is ``meaningless''. \emph{[Quite
      `thoroughly' so! \textsc{-Ed.}]} {\bfseries \{Do you \textsc{disagree}?\}} I
  know 18--57 (\textsc{count 'em}) badgers --- who'd like a 9"
  {\bfseries\itshape rather \textsc{long}} word.}

\begingroup
\testtext\setlength\parskip{1em}\setlength\parindent{0em}

{\sffamily\testtext}

{\ttfamily It's "meaningless". \textbf{But it's monospace!}
  {\itshape
    Is it italic?} \textsc{Unlikely.}\\
  (Braces) [are] \{rather\} <important> \& so 'are' "quotes".
  Il1, O0.}
\endgroup

\subsection{Some mathematics, with references}

Nulla malesuada porttitor diam. Donec felis erat, congue non, volutpat at,
tincidunt tristique, libero.\footnote{Latin latin latin, latin latin latin.
  Greek.} Morbi auctor lorem non justo.\footnote{Another footnote, much like the
  first, a little bit longer --- okay, a lot longer --- and consequently more
  likely to wrap.\par Also, multiple paragraphs! How about that.}

\begin{theorem}[Binomial]\label{thm:binomial}
  Lorem ipsum dolor sit amet, consectetuer:
  %
  \[ (x+y)^n = \sum_{k=0}^n \binom{n}{k} x^{n-k} y^k \]
\end{theorem}

\begin{corollary} Adipiscing $n=4$, elit
  \( (x+y)^4 = x^4 + 4x^3y + 6x^2y^2 + 4xy^3 + y^4 \). Moreover, if $f(x) =
  x^2$, then it follows that $f = \mathit{id} \cdot \mathit{id}$, et cetera, et
  cetera.
\end{corollary}

Vivamus viverra fermentum felis. Donec nonummy pellentesque ante. Pha\-sellus
adipiscing semper elit. Proin fermentum \cref{thm:binomial} massa ac quam:
\nopagebreak[2]
\[ \sum_{i=1}^n n = \frac{n(n+1)}{2} \]

%% %
%% \begin{eqnarray}
%%   e^{i\tau} &=& 0\\
%%   (x+y)^n &=& \sum_{k=0}^n \binom{n}{k} x^{n-k} y^k
%% \end{eqnarray}

Sed diam turpis, molestie vitae, placerat a, molestie nec, leo. Maecenas
lacinia. \Cref{sec:two} nam ipsum ligula, eleifend at, accumsan nec, suscipit a,
ipsum. Morbi blandit ligula feugiat magna. Nunc eleifend consequat lorem. Sed
lacinia nulla vitae enim. Pellentesque tincidunt purus vel magna. Integer non
enim. Praesent euismod nunc eu purus. Donec bibendum quam in tellus. Nullam
cursus pulvinar lectus. Donec et mi. Nam vulputate metus eu enim. Vestibulum
pellentesque felis eu massa.

\section{Another section}\label{sec:two}
\subsection{Immediately followed by a subsection}\label{sec:two-one}

\lipsum[6]

\begin{conjecture}
  Morbi luctus, wisi viverra faucibus pretium, nibh est placerat odio, nec
  commod wisi enim egat quam \cref{sec:two-one}.
\end{conjecture}

\subsubsection{Sub-subsections (like this one) are always unnumbered}

\lipsum[7]


\section{Many sections of lorem ipsum}
\lipsum[8]

\section{Many sections of lorem ipsum}
\lipsum[9]

\section{Many sections of lorem ipsum}
\lipsum[10]

\section{Many sections of lorem ipsum}
\lipsum[11]

\section{Many sections of lorem ipsum}
\lipsum[12]

\section{Many sections of lorem ipsum}
\lipsum[13]

\section{Many sections of lorem ipsum}
\lipsum[14]

\section{Many sections of lorem ipsum}
\lipsum[15]

\subsection{Many subsections}
\lipsum[16]

\subsection{Many subsections}
\lipsum[17]

\subsection{Many subsections}
\lipsum[18]

\subsection{Many subsections}
\lipsum[19]

\subsection{Many subsections}
\lipsum[20]

\subsection{Many subsections}
\lipsum[21]

\subsection{Many subsections}
\lipsum[22]

\subsection{Many subsections}
\lipsum[23]

\subsection{Many subsections}
\lipsum[24]

\subsection{Many subsections}
\lipsum[25]

\subsection{Many subsections}
\lipsum[26]


\section{Unbroken lorem ipsum for many pages}
\lipsum\lipsum[1]\lipsum\lipsum[2]\lipsum\lipsum[3]\lipsum\lipsum[4]
\lipsum\lipsum[5]\lipsum\lipsum[6]\lipsum\lipsum[7]\lipsum\lipsum[8]
\lipsum\lipsum[1]\lipsum\lipsum[2]\lipsum\lipsum[3]\lipsum\lipsum[4]
\lipsum\lipsum[5]\lipsum\lipsum[6]\lipsum\lipsum[7]\lipsum\lipsum[8]


\end{document}
