On Tuesday 15 September 2009 09:22:45 elaine wrote:
> hi there --
>
> i think what i have is a reST question and am hoping for a reST or
> sphinx solution:
>
> lines of regular text in reST wrap automatically. however, if i have
> a very long line in a code block, it does not wrap automatically (e.g.
> results in a scroll bar in an html representation, or is simply cut
> off the page in the pdf build of a latex representation). is there a
> quick fix for this, or do i have to format this by hand?
>
> thanks very much!
There is no possible "correct" solution for this.
Since it's code, it can't be automatically wrapped, because it breaks[1].
In rst2pdf I offer a "shrink" fit where the font size is decreased until it
fits the page, but it's not meant for production usage (you can end with
completely unreadable blocks!)
So, I expect the answer is "yes, you need to format it by hand".
And the really bad news: you probably need to format it by hand again for
printing, if you want to print.
[1] Ok, if you know the language you *could* wrap it in some cases. But in
arbitrary code blocks you don't.
--
("\''/").__..-''"`-. . Roberto Alsina
`9_ 9 ) `-. ( ).`-._.`) KDE Developer (MFCH)
(_Y_.)' ._ ) `._`. " -.-' http://lateral.netmanagers.com.ar
_..`-'_..-_/ /-'_.' The 6,855th most popular site of Slovenia
(l)-'' ((i).' ((!.' according to alexa.com (27/5/2007)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sphinx-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sphinx-dev?hl=en
-~----------~----~----~----~------~----~------~--~---