doxygenforced-unwrapping

Doxygen : How to avoid text wrapping inside code block


I am writing notes using doxygen. Sometimes I include a code block in it with very long lines

\code
    I don't want the next line to wrap
    this is a quite long long long long long long long long long long long long long long long long long long long long long long long long line
\endcode

As you can see, the stack overflow don't wrap my line and provide a horizon scrolling bar here. However if I generate html using doxygen, the line will get wrapped.

Is there any option in doxyfile or css to make text inside \code...\endcode not wrapping?


Solution

  • There are a few possibilities:

       div.line {
          white-space: nowrap;
       }
    

    on some systems this doesn't work, some good results have also been obtained with:

       div.line {
          white-space: pre;
       }