Opened 9 years ago

# If code block is larger than page left alignment is more readable than a centered one.

Reported by: Owned by: Sébastien GISSINGER Diorgenes Felipe Grzesiuk normal TracWikiToPdfPlugin normal Ryan J Ollos 0.11

### Description

Everything is in the summary.

### Changed 9 years ago by Sébastien GISSINGER

Without the beginning of the sentences it's very difficult to understand.

### comment:1 Changed 9 years ago by anonymous

Summary: If code block is larger than page left alignement is more readable than a centered one. → If code block is larger than page left alignment is more readable than a centered one.

### comment:2 Changed 9 years ago by Ryan J Ollos

Cc: Ryan J Ollos added; anonymous removed

### comment:3 Changed 9 years ago by Ryan J Ollos

Just wanted to mention that the Email Processor macro works well in this situation if you want to force the code block to wrap to fit the page.

### comment:4 follow-up:  5 Changed 7 years ago by gregmac

Seems a bit obscure to have to add #!email to code blocks while editing code on wiki pages that you (or someone else, unbeknownst to you) intends to create PDFs from.

I think the only way around this might be to have wikitopdf do a couple things:

• replace the <pre> tag with something else, <div class="pre"> and then define some css for .pre that makes it act a lot like regular pre, but with word wrapping
• replace all newlines inside the <pre> with <br/>'s

Not sure if there is entirely a way to allow wraps without also ignoring extra whitespace though, so it may also be necessary to replace all spaces with &nbsp; or even to wrap each line in its own <pre> tag, and then adjust the css rules so it doesn't look like several individual boxes.

### comment:5 in reply to:  4 Changed 7 years ago by Ryan J Ollos

Seems a bit obscure to have to add #!email to code blocks while editing code on wiki pages that you (or someone else, unbeknownst to you) intends to create PDFs from.

It was just meant as a workaround since no one has produced a patch yet and the plugin is unmaintained. If someone produces a working patch I will make sure it gets applied to the codebase in the repository.

### Modify Ticket

Change Properties