Ticket #4283 (new enhancement)

Opened 3 years ago

Last modified 9 months ago

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

Reported by: sgissinger Assigned to: diorgenes
Priority: normal Component: TracWikiToPdfPlugin
Severity: normal Keywords:
Cc: rjollos Trac Release: 0.11

Description

Everything is in the summary.

Attachments

large-code-block.jpg (59.3 kB) - added by sgissinger on 12/15/08 14:37:42.
Without the beginning of the sentences it's very difficult to understand.

Change History

12/15/08 14:37:42 changed by sgissinger

  • attachment large-code-block.jpg added.

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

06/30/09 00:18:23 changed by anonymous

  • summary changed from If code block is larger than page left alignement is more readable than a centered one. to If code block is larger than page left alignment is more readable than a centered one..

06/30/09 00:48:35 changed by rjollos

  • cc set to rjollos.

06/30/09 01:03:20 changed by rjollos

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.

(follow-up: ↓ 5 ) 05/04/11 16:57:08 changed 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.

(in reply to: ↑ 4 ) 05/04/11 22:36:44 changed by rjollos

Replying to 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.

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.


Add/Change #4283 (If code block is larger than page left alignment is more readable than a centered one.)




Change Properties
Action