Wrapping of source code depending on output format

Uwe Peuker's Avatar

Uwe Peuker

02 Sep, 2013 08:04 PM

The code formatting using the github flavor is a great thing for my manual writings.

But the horizontal scrollbar in wide code segments naturally doesn't work in PDF, RTF, ... output.

Is there a switch to wrap wide lines of code for printable output.

Thanks
Uwe

  1. Support Staff 1 Posted by Brett on 02 Sep, 2013 08:14 PM

    Brett's Avatar

    You can do this by adding some custom CSS.

    pre {
                white-space: pre-wrap;
                white-space: pre-line;
            }

  2. 2 Posted by Uwe Peuker on 02 Sep, 2013 08:39 PM

    Uwe Peuker's Avatar

    Thanks for the fast reply.
    So easy! It will help me to understand and adjust the output to my needs!

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac