My code is here,
\documentclass{article}
\usepackage{listings,xcolor}
\lstnewenvironment{code}
{\lstset{language={Matlab},
lineskip=-1pt,
belowskip=3pt,
breaklines=true,
xleftmargin=2.2em,%
showstringspaces=false,
showspaces=false,%
basicstyle=\bf\tt\color{black},%
keywordstyle=\bf\tt\color{black},%
identifierstyle=\bf\tt\color{black},%
commentstyle=\bf\tt\color{black},%
%backgroundcolor=\color{gray!3},
tabsize=2,
columns=flexible}}
{}
\begin{document}
This is example of listings.
\begin{code}
/ sqrt(5) 1 \
| ------- + - |
| 2 2 |
| |
| 1 sqrt(5) |
| - - ------- |
\ 2 2 /
\end{code}
This is verbatim example.
\begin{verbatim}
/ sqrt(5) 1 \
| ------- + - |
| 2 2 |
| |
| 1 sqrt(5) |
| - - ------- |
\ 2 2 /
\end{verbatim}
\end{document}
Using XelaTeX but the result is
I want to get the same result. How to do?