DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23796>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23796 [PATCH] docs pages containing <source> are sometimes too wide Summary: [PATCH] docs pages containing <source> are sometimes too wide Product: Cocoon 2 Version: 2.1.1 Platform: All URL: http://cocoon.apache.org/2.1/userdocs/concepts/modules.h tml OS/Version: All Status: NEW Severity: Enhancement Priority: Other Component: general components AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] The document2html.xsl stylesheet renders <source> elements as HTML <pre> elements, which can make the resulting pages too wide to see on screen or print. This stylesheet appears not to have changed for ages.The "modules" page in the URL field shows the problem. This page is too wide for display on most screens. A web page that is wider than the screen is a complete bastard to read - you have to scroll left and right all the time. And printing in landscape orientation is not very nice either. The problem is: 1) Browsers usually render <pre> elements in a fixed-width font, which are always wider than normal fonts. 2) There is no line-wrapping in a <pre> element, so a single long line of source can make the web page very wide. The patched stylesheet includes an extra template to render simple <source> elements (i.e. those which contain only text content) as a <div> containing a sequence of <p> elements. The font itself is not specified, so it will generally be a proportional font. The font size is reduced anyway ("smaller"). The template uses CSS "style" attributes to retain the original indentation while allowing line-wrapping. A single space of indentation is rendered as a 4pt indent. Where a line of source wraps, the subsequent line is further indented by 8pt (i.e. equivalent to 2 spaces). This new XSL code treats the content of the <source> element as a single string, so I have left the old template in place to handle <source> elements that contain extra markup. CHeers Con
