\documentclass[a4paper,notitlepage]{article}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\newcommand{\strongemph}[1]{\textbf{#1}}
\newcommand{\litfmt}[1]{\texttt{#1}}
\title{}
\author{}
\date{}
\usepackage{alltt}
\begin{document}
\maketitle
\tableofcontents

\section{headline 1}
\subsection{headline 2}
\subsubsection{headline 3}
\paragraph{headline 4}

\subsection{miscellaneous inline}

end of line, ``quoted stuff''
end of line, \emph{emphasised stuff}
end of line, \strongemph{strongly emphasised stuff}
end of line, \litfmt{literal-formatted stuff}.

``quoted stuff'', at the beginning of line\footnote{this is a footnote}
/emphasised / not, \emph{another try}; \emph{nested \strongemph{emphasis} for kiddies}--
\litfmt{literal-formatted stuff \\
spanning multiple lines}, \emph{emphasis}
improperly \emph{nested \strongemph{emphasis markers}
spanning multiple lines} for fun

very ``long quoted string
with \strongemph{/inner/ emphasis} and other
way \emph{*around* for them} if you please and
goodies'' to try (\strongemph{thank you})

Emphasis ``\emph{within}'' quotes
Quotes \emph{``within''} emphasis
Strongem ``\strongemph{within}'' quotes
Quotes \strongemph{``within''} strongem
Literal ``\litfmt{within}'' quotes
Quotes \litfmt{``within''} literal
Literal \emph{''within''} emphasis
Emphasis \litfmt{_within_} literal
Literal \strongemph{''within''} strongem
Strongem \litfmt{*within*} literal
Quoted "quotes" for you
Quoted _emphasis_ for you
Quoted *strongem* for you
Quoted ''litfmt'' for you

unmatched end-of-emphasis/ marker
"Different * emphasis / characters "" out '' of ''' context '''' j

proper /path/to/file and its literal cousin,
\litfmt{/path/to/file}

Some */random mixed** ``\emph{emphasis}'' mark*ers \footnote{and a footnote
that \emph{has
multiple lines}}

*strongemph*broken by* char
/emphasis/broken by/ char
\litfmt{literal'not broken by} char
''literal''broken by'' char

\litfmt{literal'with quotes} not broken anymore

\litfmt{literal'spanning multiple
lines} not broken by char

*strongemph * broken by* space-sep char
/emphasis / broken by/ space-sep char
One char \emph{c} emph
One char \strongemph{c} strongemph

(underscores)

\emph{emphasis} type 1
an underscore _ by \emph{itself}; between_words
double _nested \emph{emphasis} for_ convenience
This _should_not_ work

(line breaking)

// begin
in the // middle
end-line \\
end-paragraph \\

\subsection{footnotes}

footnotes\footnote{footnote 1 for your pleasure} should be
properly // numbered.\footnote{footnote 2}  Does it not seem to be\footnote{a word
with very many meanings} so?

This\footnote{footnote 4} is bad practice
\subsubsection{\footnote{footnote} in heading}

text

\subsection{section breaking}

Paragraph followed by adjacent
\subsubsection{headline}
Paragraph in between
\subsubsection{another headline}

Some text

\subsubsection{headline followed by}
normal text

\subsubsection{two adjacent}
\subsubsection{headlines}

Paragraph followed by 

\begin{center}\rule{0.5\textwidth}{0.02em}\end{center}

section marker


\begin{center}\rule{0.5\textwidth}{0.03em}\end{center}

both section markers here are adjacent

\begin{center}\rule{0.5\textwidth}{0.04em}\end{center}


Some text


\begin{center}\rule{0.5\textwidth}{0.05em}\end{center}

Once more


\begin{center}\rule{0.5\textwidth}{0.06em}\end{center}


\begin{center}\rule{0.5\textwidth}{0.07em}\end{center}


\subsection{preformatted}

{{{Block}}}

Another block:
\begin{alltt}
content
 content
  content
\end{alltt}

And then:

\begin{alltt}
  content
 content

content [empty line above]
\end{alltt}
followed by an explanation.


\begin{itemize}
\item this one is within a list, I reckon:
\begin{alltt}

 /emphasis/
  *strong emphasis*
   line breaking //
    "quoted text" AFAIK

 multi-"line
   span stuff"
\end{alltt}

\begin{itemize}
\item embedded list and literal block:

\begin{alltt}
foo /bar/
\end{alltt}

\end{itemize}
\end{itemize}
\subsection{special characters}

Hello World!\texttrademark{} is a common program \ensuremath{\rightarrow{}} stupid.  stupid \ensuremath{\leftarrow{}} me, also.

This is a range in January--February of 2004.  There are some special
considerations---such as the em dash here.  How many test do you need
for changing a light bulb?---I guess 6--8.

\begin{quotation}
---blockquote ends this thing---
\end{quotation}
\end{document}
