Tell me more ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am trying to show the text literally in verbatim environment with line breaking automatically. I Googled this and people recommended using the listings package. I am following the instructions in the help and figure out the code as follows

\begin{lstlisting}[breaklines=true, breakatwhitespace=true, breakindent=0pt, basicstyle=\ttfamily]
   Here is some text I type to test if the listing environment could give me what I expect. I like this way pretty much because everything goes just like what I expected except for that the text alginment ...
\end{lstlisting}

It almost solve all my problem except that all text justify left now. Is that any way to make it break the line automatically while show all text to justify left and right?

share|improve this question
2  
verbatim environments tend to use monospace fonts with word space fixed to the character width, so there are no possibilities for justification, each line is just as long as the number of characters in the line. If you do not need that, perhaps you could say what features of verbatim/listings you do need? – David Carlisle Jan 27 at 11:17
Any feedback would be kind. Or can we close this question? – Marco Daniel Mar 9 at 19:47

closed as too localized by David Carlisle, percusse, lockstep, egreg, Kurt Apr 7 at 0:02

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, see the FAQ.

Browse other questions tagged or ask your own question.