I want to have breaklines with verbatim. For this I use:



And I set my environment like this:

\begin{verbatim}[breaklines=true, breakanywhere=true]

But my problem is that the option of verbatim is always interpreted as a text:

[breaklines=true, breakanywhere=true] 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

I do not understand what I am doing wrong... Can someone help me please? I also tried with spverbatim, but it does not work...


  • 2
    These options apply to \begin{Verbatim} (with upper case V), not to \begin{verbatim}.
    – Marijn
    Oct 30, 2022 at 12:35
  • So simple... Thanks a lot!
    – Guillaume
    Oct 30, 2022 at 13:35

1 Answer 1


The package fancyvrb doesn't touch verbatim. The options can be given to Verbatim or any environment you define with \DefineVerbatimEnvironment or \RecustomVerbatimEnvironment.

You might do in your preamble


and verbatim will behave exactly as Verbatim.

You might also take advantage of this features and do

  breaklines=true, breakanywhere=true

so you can do


in the document for those verbatim parts that need line breaks.

Or you can do


and all fancyvrb environments will allow line breaks anywhere.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .