Putting this back on the list...

At 08:44 13.06.2002, allan juul wrote:
why is there a more than one pre for one single article?

Well, this isn't because of Pod, the problem is with the PDF generation: too long pre-sections caused them to stay on the same page in the PDF, but getting smaller and smaller. This was bad... So Stas changed it this way. It clearly annoys me too, but if there's no other way out... Stas, what do you think.. is there a way to make many pre sections only for the PDF version? It would clearly be best.


you haven't really solved the problem [though its looks better] by embracing
that div because we still have the visual line break. so i think the pod-
source should be rectified

Well, the visual line break wasn't there on IE or Mozilla... On Opera there seems to be problems handling 0 padding etc... But there might still be problems on other browsers.


Quoting Per Einar Ellefsen <[EMAIL PROTECTED]>:

> Hi,
>
> I was annoyed by the left border on pre sections being cut when it gets too
>
> long. So I changed the code and stylesheet to wrap it all inside a <div>
> tag which sets the border. It works on all browsers I have, and even
> removes the annoying white space between the pre sections, except on Opera.
>
> Preview here:
> http://users.skynet.be/pereinar/mod-
perl/outstanding/success_stories/etoys.com.html
>
>
> (before, the border would break just after
> capacity planning for Christmas 2000 was for three times the traffic
> ), and that's where I get a newline now on Opera.
>
> Here's the patch, please tell me what you think before I commit:
>
> Allan, will you make sure you incorporate the stylsheet changes into your
> current design work, to avoid conflicts when we merge?
>
> Index: lib/DocSet/Doc/Common.pm
> ===================================================================
> RCS file: /home/cvs/modperl-docs/lib/DocSet/Doc/Common.pm,v
> retrieving revision 1.12
> diff -u -r1.12 Common.pm
> --- lib/DocSet/Doc/Common.pm    12 Jun 2002 02:53:46 -0000      1.12
> +++ lib/DocSet/Doc/Common.pm    12 Jun 2002 20:04:45 -0000
> @@ -157,11 +157,12 @@
>
>       # if the <pre> section is too long ps2pdf fails to generate pdf,
>       # so split it into 40 lines chunks.
> -    my $result = '';
> +    my $result = qq{<div class="pre-section">\n};
>       while ($text =~ /((?:[^\n]*\n?){1,40})/sg) {
>           next unless length($1); # skip empty matches
> -        $result .= qq{<pre class="pre-section">$1</pre>\n};
> +        $result .= qq{<pre class="pre-section">$1</pre>};
>       }
> +    $result .= qq{</div>\n};
>
>       return $result;
>   }
> Index: src/style.css
> ===================================================================
> RCS file: /home/cvs/modperl-docs/src/style.css,v
> retrieving revision 1.70
> diff -u -r1.70 style.css
> --- src/style.css       14 May 2002 05:24:57 -0000      1.70
> +++ src/style.css       12 Jun 2002 20:04:45 -0000
> @@ -21,13 +21,20 @@
>       font-size: 1.0em;
>   }
>
> -.pre-section {
> -    font-family: courier new, courier, monospace;
> -    font-size: 1.0em;
> +div.pre-section {
>       border-style: solid;
>       border-width: 0px 0px 0px 1px;
> -    white-space: pre;
>       border-color: #004080; /* same color as quotation */
> +}
> +
> +pre.pre-section {
> +    font-family: courier new, courier, monospace;
> +    font-size: 1.0em;
> +    white-space: pre;
> +    margin-top: 0px;
> +    margin-bottom: 0px;
> +    padding-top: 0px;
> +    padding-bottom: 0px;
>       /* width: 100%;  might be needed for konqueror?*/
>   }
>
>
> --
> Per Einar Ellefsen
> [EMAIL PROTECTED]
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--

-- Per Einar Ellefsen [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to