\documentclass{report}
\usepackage{hyperref}
% WARNING: THIS SHOULD BE MODIFIED DEPENDING ON THE LETTER/A4 SIZE
\oddsidemargin 0cm
\evensidemargin 0cm
\marginparsep 0cm
\marginparwidth 0cm
\parindent 0cm
\setlength{\textwidth}{\paperwidth}
\addtolength{\textwidth}{-2in}


% Conditional define to determine if pdf output is used
\newif\ifpdf
\ifx\pdfoutput\undefined
\pdffalse
\else
\pdfoutput=1
\pdftrue
\fi

\ifpdf
  \usepackage[pdftex]{graphicx}
\else
  \usepackage[dvips]{graphicx}
\fi

% Write Document information for pdflatex/pdftex
\ifpdf
\pdfinfo{
 /Author     (Pasdoc)
 /Title      ()
}
\fi


% definitons for warning and note tag
\usepackage[most]{tcolorbox}
\newtcolorbox{tcbwarning}{
 breakable,
 enhanced jigsaw,
 top=0pt,
 bottom=0pt,
 titlerule=0pt,
 bottomtitle=0pt,
 rightrule=0pt,
 toprule=0pt,
 bottomrule=0pt,
 colback=white,
 arc=0pt,
 outer arc=0pt,
 title style={white},
 fonttitle=\color{black}\bfseries,
 left=8pt,
 colframe=red,
 title={Warning:},
}
\newtcolorbox{tcbnote}{
 breakable,
 enhanced jigsaw,
 top=0pt,
 bottom=0pt,
 titlerule=0pt,
 bottomtitle=0pt,
 rightrule=0pt,
 toprule=0pt,
 bottomrule=0pt,
 colback=white,
 arc=0pt,
 outer arc=0pt,
 title style={white},
 fonttitle=\color{black}\bfseries,
 left=8pt,
 colframe=yellow,
 title={Note:},
}

\begin{document}
\label{toc}\tableofcontents
\newpage
% special variable used for calculating some widths.
\newlength{\tmplength}
\chapter{Unit ok{\_}markdown}
\label{ok_markdown}
\index{ok{\_}markdown}
\section{Description}
\textbf{This is a test of Markdown syntax}\hfill\vspace*{1ex}

 Correct lists

\begin{itemize}
\item list item {\#}1.1
\item list item {\#}1.2
\end{itemize}end list

\begin{itemize}
\item list item {\#}2.1
\item list item {\#}2.2
\end{itemize}end list

\begin{itemize}
\item list item {\#}3
\end{itemize}end list

\begin{itemize}
\item list item {\#}4
\end{itemize}\begin{enumerate}
\setcounter{enumi}{0} \setcounter{enumii}{0} \setcounter{enumiii}{0} \setcounter{enumiv}{0} 
\item list item {\#}5.1
\setcounter{enumi}{1} \setcounter{enumii}{1} \setcounter{enumiii}{1} \setcounter{enumiv}{1} 
\item list item {\#}5.2
\setcounter{enumi}{2} \setcounter{enumii}{2} \setcounter{enumiii}{2} \setcounter{enumiv}{2} 
\item list item {\#}5.10
\end{enumerate}Simple list with multiline text

\begin{itemize}
\item item 6.1 text text text
\item item 6.2

item text
\end{itemize}end list

List with nested list

\begin{itemize}
\item item 7.1 text \begin{itemize}
\item item 7.1.1 text
\end{itemize} text2
\end{itemize}List with more nesting

\begin{itemize}
\item item 8.1 \begin{itemize}
\item item 8.1.1 \begin{itemize}
\item item 8.1.1.1
\end{itemize} text 8.1.1
\item item 8.1.2 \begin{itemize}
\item item 8.1.2.1
\end{itemize}
\end{itemize} text 8.1
\end{itemize}end list

You can even mix markdown and PasDoc tags

\begin{itemize}
\item list item {\#}8.1
\item list item {\#}8.2
\end{itemize}

Incorrect lists

\textit{not a list}

1not a list

1 not a list

1.not a list

Emphasis, aka italics, with \textit{asterisks} or \textit{underscores}.

Strong emphasis, aka bold, with \textbf{asterisks} or \textbf{underscores}.

Some \textbf{bold text}.

Some \textbf{\textit{bold and italic text}}.

Some \textbf{some bold and \textit{italic} and \textit{italic} and \textit{italic once again} text}.

Some \textit{italic text}.

Some \textbf{bold text with some tags: My name is \begin{ttfamily}ok{\_}markdown\end{ttfamily}, some \begin{ttfamily}begin end\end{ttfamily} and a link to me: \begin{ttfamily}ok{\_}markdown\end{ttfamily}(\ref{ok_markdown})}.

{\textbackslash}*markers could be escaped

\textit{and also escaped at end{\textbackslash}* of a word}

or placed inside{\_}word or placed{\_}inside{\_}word{\_}multiple{\_}times or at the end{\_}

Multiplications are OK: A*B*C*D and with spaces too: A * B * C * D

underscore {\_} is used to name some deprecated thing: something{\_}

Some \begin{ttfamily}inline code\end{ttfamily}, some \begin{ttfamily}\textbf{formatting} \textit{inside} code\end{ttfamily}

Some preformatted code:

\begin{verbatim}
program Foo;
  Some long code
  with
  syntax highlight\end{verbatim}

Some Pascal code:

\texttt{\\\nopagebreak[3]
}\textbf{program}\texttt{~Foo;\\\nopagebreak[3]
~~Some~long~code\\\nopagebreak[3]
~~}\textbf{with}\texttt{\\\nopagebreak[3]
~~syntax~highlight\\
}

Correct URLs:

\href{http://example}{Some one-line descr}

\href{http://example}{Some multi-line
   descr}

\href{http://example}{Escaped [] descr}

\href{http://example}{{\textbackslash}}

\href{http://example}{a{\textbackslash}}

\href{http://example/(foo)}{Bracket URL}

Incorrect URLs:

(\href{http://example}{http://example})

[Some descr] (\href{http://example}{http://example})

[Some descr](\href{http://example}{http://example}
\end{document}
