# Proper spaces with verbatim

there is following code:

\begin{verbatim}
pc:~$ls folder1 Documents folder2 New Folder folder3 folder4444 Downloads folder5 Pictures Templats \end{verbatim}  And the output is: folder1 Documents folder2 New Folder folder3 folder4444 Downloads folder5 Pictures Templats  The thing is, that words in output are shifted. However when I use verbatim*, everything is all right, but there is ␣ character. It seems like spaces are not the same width as letters. How to output text with proper spaces? Or is there some other good method to print terminal output? Edited: Full code: \documentclass[12pt,openany]{report} \usepackage{xltxtra} \usepackage{fontspec} \usepackage{xunicode} \usepackage{color} \usepackage{polski} \usepackage{titlesec} \usepackage{listings} \usepackage{hyperref} \setromanfont[Mapping=tex-text]{Linux Libertine O} \begin{document} \begin{verbatim} pc:~$ ls
fffffff                Documents         gggggggggggg   New Folder  hhhhh
jjjjjjjjjjjjjjj        eeeeeeeee         kkkk           Pictures    Templates
Desktop                xxxxx             ccccccccccccc  Public      dddddd
bbbbbbbbbbbbbbbbbbbbb  fffffffffeeeeeee  jjjjj          qqqqqqqqqq  sssww
\end{verbatim}

\end{document}

-
Don't see the problem in my testing. Can you provide a more complete example? – Justin Bailey Jun 16 '11 at 20:27

## 1 Answer

The output lines are too wide for the page. You will get warnings about overfull hboxes. I can see the shifting, but it goes away for example after making margins smaller for a quick test, so adjust font or line width.

Original example output:

With \usepackage[hmargin=2cm]{geometry} warnings go away and it changes:

-