Docbook: programlisting and screen

Randy Pratt bsd-unix at embarqmail.com
Mon Sep 30 14:07:50 UTC 2013


I've noticed that trying to copy content from the rendered Handbook
from a browser does not retain the line breaks in some places.  This
occurs for material that are contained within a <programlisting> or
<screen> elements.
 
As an example, try to copy and paste some content from the section
30.6.5.5. for "An Example Stateful Ruleset" into a text editor.
(http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/firewalls-ipfw.html)
 
The result is the entire copied content is a single line which would
require a lot of tedious editing.  I've tried different browsers with
the same result.  I finally ended using the xml source to do the
copy.

I seem to remember being able to do a copy but it was probably
when sgml was used.  Is there some way to make it easier to copy
these sections?

Thanks,

Randy



More information about the freebsd-doc mailing list