Select Your Language

Infrastructure and Management

Cloud Computing

Storage

Runtimes

Integration and Automation

  • Comments
  • Missing whitespace formatting for pre elements in ePub documents

    Posted on

    The ePub version of documentation doesn't contain any whitespace formatting for

    pre
    elements, which by default don't apply any line wrapping. This results in code snippets overflow out of the screen on a ebook reader. The only way to display full snippet is to decrease font size and change page orientation to landscape.

    To remedy this a single rule needs to be added to epub.css file to apply wrapping:

    pre {
      white-space: pre-wrap;
    }
    

    The XSLT used to produce the ePub version of docs needs to be adjusted to incorporate that formatting.

    by

    points

    Responses

    Red Hat LinkedIn YouTube Facebook X, formerly Twitter

    Quick Links

    Help

    Site Info

    Related Sites

    © 2026 Red Hat