Feedback wanted: wrapping long lines in HTML docs
Warren Block
wblock at wonkity.com
Thu Aug 22 12:43:32 UTC 2013
HTML versions of our documents show long lines in <screen> and
<programlisting> elements. At present, these lines run right out of
the boxes they are in. Some lines are very long. An example in the FDP
Primer is 473 characters:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/fdp-primer/xml-primer-elements.html
(search for "example.xml:5")
We have at least two ways of improving this. Long lines can be treated
as they are in the PDF versions: the line is wrapped and an indicator
character shows where it has been wrapped. Cut and paste will still
copy it as a single line. Advantage: the entire contents of long lines
are shown. Disadvantage: readers may misunderstand the wrapping or wrap
indicator as literal.
Another option is to add "overflow: auto" in the CSS. Scroll bars will
be added to the bottom of screen and programlisting elements with long
lines. Advantage: long lines are shown without wrapping.
Disadvantage: the reader has to scroll to see the hidden part of long
lines.
Which method should be preferred for HTML documents, and why?
More information about the freebsd-doc
mailing list