\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{\_}helpinsight{\_}comments}
\label{ok_helpinsight_comments}
\index{ok{\_}helpinsight{\_}comments}
\section{Description}
Test of handling help insight comments, in the form "/// {$<$}tag{$>$} ... {$<$}/tag{$>$}". See \href{http://delphi.wikia.com/wiki/Help_insight}{http://delphi.wikia.com/wiki/Help{\_}insight}, example snippet with \begin{ttfamily}Parse\end{ttfamily}(\ref{ok_helpinsight_comments-Parse}) function is straight from there. See \href{https://sourceforge.net/tracker/?func=detail&atid=304213&aid=3485263&group_id=4213}{https://sourceforge.net/tracker/?func=detail{\&}atid=304213{\&}aid=3485263{\&}group{\_}id=4213}.
\section{Overview}
\begin{description}
\item[\texttt{Parse}]parses the commandline
\item[\texttt{PascalCodeSample}]Pascal code sample.
\item[\texttt{MultilineCodeSample}]Multiline code sample.
\item[\texttt{MultilineSummaryExample}] Multiline summary example. This is the second line of the summary. 
\end{description}
\section{Functions and Procedures}
\ifpdf
\subsection*{\large{\textbf{Parse}}\normalsize\hspace{1ex}\hrulefill}
\else
\subsection*{Parse}
\fi
\label{ok_helpinsight_comments-Parse}
\index{Parse}
\begin{list}{}{
\settowidth{\tmplength}{\textbf{Description}}
\setlength{\itemindent}{0cm}
\setlength{\listparindent}{0cm}
\setlength{\leftmargin}{\evensidemargin}
\addtolength{\leftmargin}{\tmplength}
\settowidth{\labelsep}{X}
\addtolength{\leftmargin}{\labelsep}
\setlength{\labelwidth}{\tmplength}
}
\item[\textbf{Declaration}\hfill]
\ifpdf
\begin{flushleft}
\fi
\begin{ttfamily}
procedure Parse(const {\_}CmdLine: string);\end{ttfamily}

\ifpdf
\end{flushleft}
\fi

\par
\item[\textbf{Description}]
parses the commandline\hfill\vspace*{1ex}

 \par
\item[\textbf{Parameters}]
\begin{description}
\item[CmdLine] is a string giving the commandline. NOTE: Do not pass System.CmdLine since it contains the program's name as the first "parameter". If you want to parse the commandline as passed by windows, call the overloaded Parse method without parameters. It handles this.
\end{description}


\end{list}
\ifpdf
\subsection*{\large{\textbf{PascalCodeSample}}\normalsize\hspace{1ex}\hrulefill}
\else
\subsection*{PascalCodeSample}
\fi
\label{ok_helpinsight_comments-PascalCodeSample}
\index{PascalCodeSample}
\begin{list}{}{
\settowidth{\tmplength}{\textbf{Description}}
\setlength{\itemindent}{0cm}
\setlength{\listparindent}{0cm}
\setlength{\leftmargin}{\evensidemargin}
\addtolength{\leftmargin}{\tmplength}
\settowidth{\labelsep}{X}
\addtolength{\leftmargin}{\labelsep}
\setlength{\labelwidth}{\tmplength}
}
\item[\textbf{Declaration}\hfill]
\ifpdf
\begin{flushleft}
\fi
\begin{ttfamily}
procedure PascalCodeSample;\end{ttfamily}

\ifpdf
\end{flushleft}
\fi

\par
\item[\textbf{Description}]
Pascal code sample.\hfill\vspace*{1ex}

 \texttt{}\textbf{var}\texttt{\\\nopagebreak[3]
~~~A:~Integer;\\\nopagebreak[3]
~}\textbf{begin}\texttt{\\\nopagebreak[3]
~~~A~:=~1~+~2~+~3;\\\nopagebreak[3]
~}\textbf{end}\texttt{;\\
}

\end{list}
\ifpdf
\subsection*{\large{\textbf{MultilineCodeSample}}\normalsize\hspace{1ex}\hrulefill}
\else
\subsection*{MultilineCodeSample}
\fi
\label{ok_helpinsight_comments-MultilineCodeSample}
\index{MultilineCodeSample}
\begin{list}{}{
\settowidth{\tmplength}{\textbf{Description}}
\setlength{\itemindent}{0cm}
\setlength{\listparindent}{0cm}
\setlength{\leftmargin}{\evensidemargin}
\addtolength{\leftmargin}{\tmplength}
\settowidth{\labelsep}{X}
\addtolength{\leftmargin}{\labelsep}
\setlength{\labelwidth}{\tmplength}
}
\item[\textbf{Declaration}\hfill]
\ifpdf
\begin{flushleft}
\fi
\begin{ttfamily}
procedure MultilineCodeSample;\end{ttfamily}

\ifpdf
\end{flushleft}
\fi

\par
\item[\textbf{Description}]
Multiline code sample.\hfill\vspace*{1ex}

 \begin{verbatim}# Sample bash script
 echo "Hello, World!"
 echo "This is a multiline code sample."\end{verbatim}

\end{list}
\ifpdf
\subsection*{\large{\textbf{MultilineSummaryExample}}\normalsize\hspace{1ex}\hrulefill}
\else
\subsection*{MultilineSummaryExample}
\fi
\label{ok_helpinsight_comments-MultilineSummaryExample}
\index{MultilineSummaryExample}
\begin{list}{}{
\settowidth{\tmplength}{\textbf{Description}}
\setlength{\itemindent}{0cm}
\setlength{\listparindent}{0cm}
\setlength{\leftmargin}{\evensidemargin}
\addtolength{\leftmargin}{\tmplength}
\settowidth{\labelsep}{X}
\addtolength{\leftmargin}{\labelsep}
\setlength{\labelwidth}{\tmplength}
}
\item[\textbf{Declaration}\hfill]
\ifpdf
\begin{flushleft}
\fi
\begin{ttfamily}
procedure MultilineSummaryExample;\end{ttfamily}

\ifpdf
\end{flushleft}
\fi

\par
\item[\textbf{Description}]
 Multiline summary example. This is the second line of the summary. 

\end{list}
\end{document}
