Modify

Opened 6 years ago

Last modified 3 years ago

#4283 new enhancement

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

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

Description

Everything is in the summary.

Attachments (1)

large-code-block.jpg (59.3 KB) - added by sgissinger 6 years ago.
Without the beginning of the sentences it's very difficult to understand.

Download all attachments as: .zip

Change History (6)

Changed 6 years ago by sgissinger

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

comment:1 Changed 5 years ago 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.

comment:2 Changed 5 years ago by rjollos

  • Cc rjollos added

comment:3 Changed 5 years ago 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.

comment:4 follow-up: Changed 3 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 3 years ago 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 Comment

Modify Ticket

Action
as new .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.